SQL Explore 2012 - Aviad Deri: Spatial

  • 599 views
Uploaded on

 

More in: Technology
  • Full Name Full Name Comment goes here.
    Are you sure you want to
    Your message goes here
    Be the first to comment
    Be the first to like this
No Downloads

Views

Total Views
599
On Slideshare
0
From Embeds
0
Number of Embeds
1

Actions

Shares
Downloads
2
Comments
0
Likes
0

Embeds 0

No embeds

Report content

Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

Cancel
    No notes for slide

Transcript

  • 1. Spatial
  • 2. Spatial-
  • 3. • • – • – – • Tessellation • Spatial Aggregations •SQL 2012- •
  • 4. • – – –₪ – • - •
  • 5. • - DBA •MS SQL 2000-2012 – Oracle 9i-11g – SQL Anywhere 10 – Sybase –
  • 6. - • • Reporting Services – Integration Services – Spatial – PowerShell – Mirroring, Replication – • • •
  • 7. GIS • •Y X – Y X – Y X – – •
  • 8. •– •– •–
  • 9. DB- SQL- • • – x,y,z – – • –WGS84- – –
  • 10. Point – • •M- z x,y • POINT(10 10) / POINT(10 10 10 1) • Linestring – LINESTRING(0 0, 10 10) • • • •
  • 11. Polygon • • • Collection – • • GeomCollection •MultiPoints,MultiPolygon,MultiLineString •
  • 12. • –STGeomFromText •SET @g = Geometry::STGeomFromText(LINESTRING(0 0, 10 10, 21 2),0) – STEnvelope • – STConvexHull • – STDifference() • – STIntersection() • – STUnion() •
  • 13. latitude- longitude - • •WGS84 GPS
  • 14. •- – –
  • 15. Spatial indexes • – – –O(n)O(logn)
  • 16. • <>= •- •
  • 17. •Fixed quadtree • index •
  • 18. • –•• –•
  • 19. B-trees- SQL- • - •four-level grid - SQL- B- hierarchy •
  • 20. • Level Grid configuration Number of cells Low 4x4 16 Medium 8x8 High 16x16 256 •• CREATE SPATIAL INDEX SIndx_SpatialTable_geography_col3 ON SpatialTable2(object) WITH ( GRIDS = ( LEVEL_3 = HIGH, LEVEL_2 = HIGH ) );
  • 21. Tessellation • • touched cells •
  • 22. Tessellation Rules • tessellation rules The covering rule • – – – –
  • 23. The cells-per-object rule •
  • 24. The deepest-cell rule •
  • 25. Spatial Aggregation •• SELECT Geography::UnionAggregate(geog) FROM Counties WHERE name = Washington;• SELECT Geography::EnvelopeAggregate(geog) FROM Counties WHERE name = Washington;•
  • 26. • SELECT Geography::CollectionAggregate(geog) FROM Counties WHERE name = Washington;• SELECT Geography::ConvexHullAggregate(geog) FROM Counties WHERE name = Washington;
  • 27. SQL 2012 - Circular Arc- • – CircularString – CompoundCurve – CurvePolygon – –DECLARE@CircularSegmentGEOGRAPHY=GEOGRAPHY::STGeomFromText(CIRCULARSTRING(0 -30, 0 0, 0 30),4326);SELECT @CircularSegmentAS Shape;
  • 28. Full Globe Support SQL 2008 • • – EnvelopeAngle() method returns 180 for objects larger than a logical hemisphere and < 90 for smaller objects – ReorientObject() reverses the ring orientationDECLARE @Globe GEOGRAPHY=GEOGRAPHY::STGeomFromText(FULLGLOBE,4326);SELECT @Globe.STArea();-- calculate the area of the WGS84 ellipsoid-- Result: 510,065,621,710,996 square meters
  • 29. Spatial Index Enhancements - • Auto-grid • GRIDS – - – – • - – Hints •
  • 30. • • •- • • - •