Presentation is loading. Please wait.

Presentation is loading. Please wait.

Isaac Kunen Senior Program Manager Microsoft SQL Server BB24.

Similar presentations


Presentation on theme: "Isaac Kunen Senior Program Manager Microsoft SQL Server BB24."— Presentation transcript:

1 Isaac Kunen Senior Program Manager Microsoft SQL Server BB24

2

3

4

5

6

7 -- this one! if * = + * +

8

9

10

11

12 f(...)

13

14 ?

15 Great Circles Nice properties Geodesics Usually unique......not always ? ? ?

16 Geodesics? Ambiguous Unnatural (?) Great Elliptic Arcs Usually unique Natural (?) Very nice computationally Usually close to a geodesic

17

18

19

20

21 IGeometrySink { void SetSrid(int srid) void BeginGeometry(OpenGisGeometryType type) void BeginFigure(double x, double y, double? z, double? m) void AddLine(double x, double y, double? z, double? m) void EndFigure() void EndGeometry() }

22 0: BeginGeometry(Polygon)BeginFigure(0,0,null,null)AddLine(0,10,null,null)AddLine(10,0,null,null)AddLine(0,0,null,null)EndFigure()BeginFigure(2,2,null,null)AddLine(2,8,null,null)AddLine(8,2,null,null)AddLine(2,2,null,null)EndFigure()EndGeometry() Polygon: SetSrid(0)

23

24

25

26

27 N O I N D E X I N D E X !

28 WITH(INDEX(T_g_idx))

29 geometry = 'POINT (0 0)' SELECT * FROM T WHERE = 1 SELECT * FROM T WHERE T.g.STIntersects('POINT (0 0)') = 1 EXEC sp_executesql N'SELECT * FROM T WHERE = 1', geometry', N'POINT (0 0)'

30

31

32

33

34 Please fill out your evaluation for this session at: This session will be available as a recording at:

35

36 © 2008 Microsoft Corporation. All rights reserved. Microsoft, Windows, Windows Vista and other product names are or may be registered trademarks and/or trademarks in the U.S. and/or other countries. The information herein is for informational purposes only and represents the current view of Microsoft Corporation as of the date of this presentation. Because Microsoft must respond to changing market conditions, it should not be interpreted to be a commitment on the part of Microsoft, and Microsoft cannot guarantee the accuracy of any information provided after the date of this presentation. MICROSOFT MAKES NO WARRANTIES, EXPRESS, IMPLIED OR STATUTORY, AS TO THE INFORMATION IN THIS PRESENTATION.

37

38

39 Flattens to a plane Projects from the center Edges are projected exactly to lines Now operate in the plane! Distortion grows with distance......so the useful area is limited

40 Use more planes Start with half a tetrahedron Introduce “fake” vertices on the folds Flatten the tetrahedron to a single plane Now, operate on the plane!

41

42

43

44 Naive Algorithm: geography = 'POINT (0 45)' geography geometry = geometry geography =

45

46

47

48

49 Create a pipeline, last sink first: public static SqlGeometry SwapXY(SqlGeometry source) { SqlGeometryBuilder b = new SqlGeometryBuilder(); SwapXYSink swap = new SwapXYSink(b); // Could chain more sinks... source.Populate(swap); return b.ConstructedGeometry; } This can now be registered and used in SQL Server

50


Download ppt "Isaac Kunen Senior Program Manager Microsoft SQL Server BB24."

Similar presentations


Ads by Google