SlideShare una empresa de Scribd logo
1 de 37
Spatial
Spatial-
•
                             •
                         –
                             •
                         –
                         –
                             •
                Tessellation •
       Spatial Aggregations •
SQL 2012-                    •
•

            –
            –
            –
₪   –           •
        -       •
•
     -         DBA •
MS SQL 2000-2012 –

    Oracle 9i-11g –

 SQL Anywhere 10 –

          Sybase –
-                                •
                                 •
       Reporting Services    –
     Integration Services    –
                   Spatial   –
               PowerShell    –
    Mirroring, Replication   –
                                 •
                                 •
                                 •
GIS                   •


                           •
Y     X                –
 Y             X       –
           Y       X   –
                       –

                           •
•
–

    •
–

    •
–
DB-

                 SQL-   •
                        •
                    –
         x,y,z      –
                    –
                        •
                    –
WGS84-              –
                    –
Point           –
                                                         •
                                                         •
M-   z                  x,y                              •
         POINT(10 10) / POINT(10 10 10 1)
                                                         •


                                            Linestring       –
           LINESTRING(0 0, 10 10)                        •
                                                         •
                                                         •
                                                         •
Polygon
                                                   •
                                                   •
                                                   •

                                      Collection        –
                                                   •
                                                   •
            GeomCollection                         •
MultiPoints,MultiPolygon,MultiLineString           •
•
                                                         –STGeomFromText        •
SET @g = Geometry::STGeomFromText('LINESTRING(0 0, 10 10, 21 2)',0)
                                                               – STEnvelope     •
                                                             – STConvexHull •
                                                            – STDifference()    •
                                                           – STIntersection()   •
                                                                 – STUnion()    •
latitude- longitude -   •
                                •


WGS84    GPS
•
-   –

    –
Spatial indexes
                            •
                        –

                        –


                        –
O(n)O(logn)
•
    <>=

          •


-         •
•


Fixed quadtree           •
                 index
                         •
•
    –
•

•

    –
•
B-trees-                              SQL-     •
                    -                           •
four-level grid -       SQL-   B-
                                    hierarchy
                                                •
•
      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 ) );
Tessellation

                 •




                 •


 touched cells   •
Tessellation Rules
                                   •
                tessellation rules
                 The covering rule •
                                 –
                                 –
                                 –
                                 –
The cells-per-object rule •
The deepest-cell rule •
Spatial Aggregation
                                                                                      •
•   SELECT Geography::UnionAggregate(geog) FROM Counties WHERE name = 'Washington';




•   SELECT Geography::EnvelopeAggregate(geog) FROM Counties WHERE name = Washington';

•
•   SELECT Geography::CollectionAggregate(geog) FROM Counties WHERE name = 'Washington';




•   SELECT Geography::ConvexHullAggregate(geog) FROM Counties WHERE name = 'Washington';
SQL 2012 -
                                                    Circular Arc-          •
      – CircularString
      – CompoundCurve
      – CurvePolygon
                                                                       –

                                                                       –
DECLARE@CircularSegmentGEOGRAPHY
=GEOGRAPHY::STGeomFromText('CIRCULARSTRING(0 -30, 0 0, 0 30)',4326);
SELECT @CircularSegmentAS Shape;
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 orientation


DECLARE @Globe GEOGRAPHY=GEOGRAPHY::STGeomFromText('FULLGLOBE',4326);
SELECT @Globe.STArea();-- calculate the area of the WGS84 ellipsoid
-- Result: 510,065,621,710,996 square meters
Spatial Index Enhancements
                          -                 •
                                  Auto-grid •
              GRIDS                      –
                              -          –
                                         –
                                            •
                      -                  –
                                      Hints •
•
        •
        •
-       •
        •
    -   •
SQL Explore 2012 - Aviad Deri: Spatial

Más contenido relacionado

Similar a SQL Explore 2012 - Aviad Deri: Spatial

Le projet “Canadian Spatial Data Foundry”: Introduction à PostGIS WKT Raster
Le projet “Canadian Spatial Data Foundry”: Introduction à PostGIS WKT RasterLe projet “Canadian Spatial Data Foundry”: Introduction à PostGIS WKT Raster
Le projet “Canadian Spatial Data Foundry”: Introduction à PostGIS WKT Raster
ACSG Section Montréal
 
使用.NET构建轻量级分布式框架
使用.NET构建轻量级分布式框架使用.NET构建轻量级分布式框架
使用.NET构建轻量级分布式框架
jeffz
 
Postgres Plus Advanced Server 9.2新機能ご紹介
Postgres Plus Advanced Server 9.2新機能ご紹介Postgres Plus Advanced Server 9.2新機能ご紹介
Postgres Plus Advanced Server 9.2新機能ご紹介
Yuji Fujita
 
DevLOVE Beautiful Development - 第一幕 陽の巻
DevLOVE Beautiful Development - 第一幕 陽の巻DevLOVE Beautiful Development - 第一幕 陽の巻
DevLOVE Beautiful Development - 第一幕 陽の巻
都元ダイスケ Miyamoto
 
hbstudy@bpstudy#50 配布用
hbstudy@bpstudy#50 配布用hbstudy@bpstudy#50 配布用
hbstudy@bpstudy#50 配布用
Toshiaki Baba
 
スマートフォン勉強会@関東 #11 どう考えてもdisconなものをiPhoneに移植してみた
スマートフォン勉強会@関東 #11 どう考えてもdisconなものをiPhoneに移植してみたスマートフォン勉強会@関東 #11 どう考えてもdisconなものをiPhoneに移植してみた
スマートフォン勉強会@関東 #11 どう考えてもdisconなものをiPhoneに移植してみた
Taro Matsuzawa
 

Similar a SQL Explore 2012 - Aviad Deri: Spatial (18)

09_Practical Multicore programming
09_Practical Multicore programming09_Practical Multicore programming
09_Practical Multicore programming
 
20110126 azure table in mono meeting
20110126 azure table in mono meeting20110126 azure table in mono meeting
20110126 azure table in mono meeting
 
Polaris Company Presentation
Polaris Company PresentationPolaris Company Presentation
Polaris Company Presentation
 
I20191007
I20191007I20191007
I20191007
 
Foilsを使ってみた。
Foilsを使ってみた。Foilsを使ってみた。
Foilsを使ってみた。
 
Polaris company Presentation
Polaris company  PresentationPolaris company  Presentation
Polaris company Presentation
 
Le projet “Canadian Spatial Data Foundry”: Introduction à PostGIS WKT Raster
Le projet “Canadian Spatial Data Foundry”: Introduction à PostGIS WKT RasterLe projet “Canadian Spatial Data Foundry”: Introduction à PostGIS WKT Raster
Le projet “Canadian Spatial Data Foundry”: Introduction à PostGIS WKT Raster
 
使用.NET构建轻量级分布式框架
使用.NET构建轻量级分布式框架使用.NET构建轻量级分布式框架
使用.NET构建轻量级分布式框架
 
14 spatial analyst
14   spatial analyst14   spatial analyst
14 spatial analyst
 
Postgres Plus Advanced Server 9.2新機能ご紹介
Postgres Plus Advanced Server 9.2新機能ご紹介Postgres Plus Advanced Server 9.2新機能ご紹介
Postgres Plus Advanced Server 9.2新機能ご紹介
 
Shader EXAM.
Shader EXAM.Shader EXAM.
Shader EXAM.
 
introduction to computer in arabic class 1
introduction to computer in arabic class 1introduction to computer in arabic class 1
introduction to computer in arabic class 1
 
『繋がり』を見る: Cytoscapeと周辺ツールを使ったグラフデータ可視化入門
『繋がり』を見る: Cytoscapeと周辺ツールを使ったグラフデータ可視化入門『繋がり』を見る: Cytoscapeと周辺ツールを使ったグラフデータ可視化入門
『繋がり』を見る: Cytoscapeと周辺ツールを使ったグラフデータ可視化入門
 
DevLOVE Beautiful Development - 第一幕 陽の巻
DevLOVE Beautiful Development - 第一幕 陽の巻DevLOVE Beautiful Development - 第一幕 陽の巻
DevLOVE Beautiful Development - 第一幕 陽の巻
 
Processing Large Graphs
Processing Large GraphsProcessing Large Graphs
Processing Large Graphs
 
Identifying and Visualizing Spatiotemporal Clusters on Map Tiles
Identifying and Visualizing Spatiotemporal Clusters on Map TilesIdentifying and Visualizing Spatiotemporal Clusters on Map Tiles
Identifying and Visualizing Spatiotemporal Clusters on Map Tiles
 
hbstudy@bpstudy#50 配布用
hbstudy@bpstudy#50 配布用hbstudy@bpstudy#50 配布用
hbstudy@bpstudy#50 配布用
 
スマートフォン勉強会@関東 #11 どう考えてもdisconなものをiPhoneに移植してみた
スマートフォン勉強会@関東 #11 どう考えてもdisconなものをiPhoneに移植してみたスマートフォン勉強会@関東 #11 どう考えてもdisconなものをiPhoneに移植してみた
スマートフォン勉強会@関東 #11 どう考えてもdisconなものをiPhoneに移植してみた
 

Más de sqlserver.co.il

Windows azure sql_database_security_isug012013
Windows azure sql_database_security_isug012013Windows azure sql_database_security_isug012013
Windows azure sql_database_security_isug012013
sqlserver.co.il
 
Things you can find in the plan cache
Things you can find in the plan cacheThings you can find in the plan cache
Things you can find in the plan cache
sqlserver.co.il
 
Sql server user group news january 2013
Sql server user group news   january 2013Sql server user group news   january 2013
Sql server user group news january 2013
sqlserver.co.il
 
SQL Explore 2012: P&T Part 3
SQL Explore 2012: P&T Part 3SQL Explore 2012: P&T Part 3
SQL Explore 2012: P&T Part 3
sqlserver.co.il
 
SQL Explore 2012: P&T Part 2
SQL Explore 2012: P&T Part 2SQL Explore 2012: P&T Part 2
SQL Explore 2012: P&T Part 2
sqlserver.co.il
 
SQL Explore 2012: P&T Part 1
SQL Explore 2012: P&T Part 1SQL Explore 2012: P&T Part 1
SQL Explore 2012: P&T Part 1
sqlserver.co.il
 
SQL Explore 2012 - Tzahi Hakikat and Keren Bartal: Extended Events
SQL Explore 2012 - Tzahi Hakikat and Keren Bartal: Extended EventsSQL Explore 2012 - Tzahi Hakikat and Keren Bartal: Extended Events
SQL Explore 2012 - Tzahi Hakikat and Keren Bartal: Extended Events
sqlserver.co.il
 
SQL Explore 2012 - Michael Zilberstein: ColumnStore
SQL Explore 2012 - Michael Zilberstein: ColumnStoreSQL Explore 2012 - Michael Zilberstein: ColumnStore
SQL Explore 2012 - Michael Zilberstein: ColumnStore
sqlserver.co.il
 
SQL Explore 2012 - Meir Dudai: DAC
SQL Explore 2012 - Meir Dudai: DACSQL Explore 2012 - Meir Dudai: DAC
SQL Explore 2012 - Meir Dudai: DAC
sqlserver.co.il
 
Bi303 data warehousing with fast track and pdw - Assaf Fraenkel
Bi303 data warehousing with fast track and pdw - Assaf FraenkelBi303 data warehousing with fast track and pdw - Assaf Fraenkel
Bi303 data warehousing with fast track and pdw - Assaf Fraenkel
sqlserver.co.il
 
Fast transition to sql server 2012 from mssql 2005 2008 for developers - Dav...
Fast transition to sql server 2012 from mssql 2005 2008 for  developers - Dav...Fast transition to sql server 2012 from mssql 2005 2008 for  developers - Dav...
Fast transition to sql server 2012 from mssql 2005 2008 for developers - Dav...
sqlserver.co.il
 

Más de sqlserver.co.il (20)

Windows azure sql_database_security_isug012013
Windows azure sql_database_security_isug012013Windows azure sql_database_security_isug012013
Windows azure sql_database_security_isug012013
 
Things you can find in the plan cache
Things you can find in the plan cacheThings you can find in the plan cache
Things you can find in the plan cache
 
Sql server user group news january 2013
Sql server user group news   january 2013Sql server user group news   january 2013
Sql server user group news january 2013
 
DAC 2012
DAC 2012DAC 2012
DAC 2012
 
Query handlingbytheserver
Query handlingbytheserverQuery handlingbytheserver
Query handlingbytheserver
 
Adi Sapir ISUG 123 11/10/2012
Adi Sapir ISUG 123 11/10/2012Adi Sapir ISUG 123 11/10/2012
Adi Sapir ISUG 123 11/10/2012
 
Products.intro.forum version
Products.intro.forum versionProducts.intro.forum version
Products.intro.forum version
 
SQL Explore 2012: P&T Part 3
SQL Explore 2012: P&T Part 3SQL Explore 2012: P&T Part 3
SQL Explore 2012: P&T Part 3
 
SQL Explore 2012: P&T Part 2
SQL Explore 2012: P&T Part 2SQL Explore 2012: P&T Part 2
SQL Explore 2012: P&T Part 2
 
SQL Explore 2012: P&T Part 1
SQL Explore 2012: P&T Part 1SQL Explore 2012: P&T Part 1
SQL Explore 2012: P&T Part 1
 
SQL Explore 2012 - Tzahi Hakikat and Keren Bartal: Extended Events
SQL Explore 2012 - Tzahi Hakikat and Keren Bartal: Extended EventsSQL Explore 2012 - Tzahi Hakikat and Keren Bartal: Extended Events
SQL Explore 2012 - Tzahi Hakikat and Keren Bartal: Extended Events
 
SQL Explore 2012 - Michael Zilberstein: ColumnStore
SQL Explore 2012 - Michael Zilberstein: ColumnStoreSQL Explore 2012 - Michael Zilberstein: ColumnStore
SQL Explore 2012 - Michael Zilberstein: ColumnStore
 
SQL Explore 2012 - Meir Dudai: DAC
SQL Explore 2012 - Meir Dudai: DACSQL Explore 2012 - Meir Dudai: DAC
SQL Explore 2012 - Meir Dudai: DAC
 
מיכאל
מיכאלמיכאל
מיכאל
 
נועם
נועםנועם
נועם
 
עדי
עדיעדי
עדי
 
מיכאל
מיכאלמיכאל
מיכאל
 
Bi303 data warehousing with fast track and pdw - Assaf Fraenkel
Bi303 data warehousing with fast track and pdw - Assaf FraenkelBi303 data warehousing with fast track and pdw - Assaf Fraenkel
Bi303 data warehousing with fast track and pdw - Assaf Fraenkel
 
DBCC - Dubi Lebel
DBCC - Dubi LebelDBCC - Dubi Lebel
DBCC - Dubi Lebel
 
Fast transition to sql server 2012 from mssql 2005 2008 for developers - Dav...
Fast transition to sql server 2012 from mssql 2005 2008 for  developers - Dav...Fast transition to sql server 2012 from mssql 2005 2008 for  developers - Dav...
Fast transition to sql server 2012 from mssql 2005 2008 for developers - Dav...
 

Último

CNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of ServiceCNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of Service
giselly40
 
Histor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slideHistor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slide
vu2urc
 
Artificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsArtificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and Myths
Joaquim Jorge
 

Último (20)

GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationGenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day Presentation
 
GenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdfGenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdf
 
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
 
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
 
Presentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreterPresentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreter
 
presentation ICT roal in 21st century education
presentation ICT roal in 21st century educationpresentation ICT roal in 21st century education
presentation ICT roal in 21st century education
 
Automating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps ScriptAutomating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps Script
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
 
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemkeProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
 
CNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of ServiceCNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of Service
 
Boost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfBoost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdf
 
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
 
Histor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slideHistor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slide
 
How to convert PDF to text with Nanonets
How to convert PDF to text with NanonetsHow to convert PDF to text with Nanonets
How to convert PDF to text with Nanonets
 
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
 
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
 
Handwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsHandwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed texts
 
2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...
 
Artificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsArtificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and Myths
 
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
 

SQL Explore 2012 - Aviad Deri: Spatial

  • 3.
  • 4. • – • – – • Tessellation • Spatial Aggregations • SQL 2012- •
  • 5. – – – ₪ – • - •
  • 6. - DBA • MS SQL 2000-2012 – Oracle 9i-11g – SQL Anywhere 10 – Sybase –
  • 7. - • • Reporting Services – Integration Services – Spatial – PowerShell – Mirroring, Replication – • • •
  • 8. GIS • • Y X – Y X – Y X – – •
  • 9. • – • – • –
  • 10. DB- SQL- • • – x,y,z – – • – WGS84- – –
  • 11. Point – • • M- z x,y • POINT(10 10) / POINT(10 10 10 1) • Linestring – LINESTRING(0 0, 10 10) • • • •
  • 12. Polygon • • • Collection – • • GeomCollection • MultiPoints,MultiPolygon,MultiLineString •
  • 13. –STGeomFromText • SET @g = Geometry::STGeomFromText('LINESTRING(0 0, 10 10, 21 2)',0) – STEnvelope • – STConvexHull • – STDifference() • – STIntersection() • – STUnion() •
  • 14.
  • 15. latitude- longitude - • • WGS84 GPS
  • 16. • - – –
  • 17. Spatial indexes • – – – O(n)O(logn)
  • 18. <>= • - •
  • 19. • Fixed quadtree • index •
  • 20. – • • – •
  • 21. B-trees- SQL- • - • four-level grid - SQL- B- hierarchy •
  • 22.
  • 23.
  • 24. 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 ) );
  • 25. Tessellation • • touched cells •
  • 26. Tessellation Rules • tessellation rules The covering rule • – – – –
  • 27.
  • 30.
  • 31. Spatial Aggregation • • SELECT Geography::UnionAggregate(geog) FROM Counties WHERE name = 'Washington'; • SELECT Geography::EnvelopeAggregate(geog) FROM Counties WHERE name = Washington'; •
  • 32. SELECT Geography::CollectionAggregate(geog) FROM Counties WHERE name = 'Washington'; • SELECT Geography::ConvexHullAggregate(geog) FROM Counties WHERE name = 'Washington';
  • 33. SQL 2012 - Circular Arc- • – CircularString – CompoundCurve – CurvePolygon – – DECLARE@CircularSegmentGEOGRAPHY =GEOGRAPHY::STGeomFromText('CIRCULARSTRING(0 -30, 0 0, 0 30)',4326); SELECT @CircularSegmentAS Shape;
  • 34. 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 orientation DECLARE @Globe GEOGRAPHY=GEOGRAPHY::STGeomFromText('FULLGLOBE',4326); SELECT @Globe.STArea();-- calculate the area of the WGS84 ellipsoid -- Result: 510,065,621,710,996 square meters
  • 35. Spatial Index Enhancements - • Auto-grid • GRIDS – - – – • - – Hints •
  • 36. • • - • • - •