SlideShare a Scribd company logo
1 of 33
The Business Opportunity



Increased                           Ubiquitous geographical
user-sophistication                 technology
• More data sources                 • GPS
• More kinds of data                • Online mapping services
• Integrated systems and mash-ups   • Availability of geographical data
Customer-base
                         management
        Real-estate          and
       development       development      Environmental-
       and analysis                         related data
                                         impact, analysis,
                                           and planning
   Scientific
research study                              Financial and
  design and                                  economic
   analysis                                   analysis in
                                            communities


           Market             Government-based
        segmentation            planning and
         and analysis           development
                                   analysis
Tree, Pole, Hydrant,
     POINT       MULTIPOINT
                               Valve


                               Road, River,
LINESTRING   MULTILINESTRING
                               Railway, Pipeline


                               Cadastre, Park,
  POLYGON     MULTIPOLYGON     Administrative
                               Boundary


COLLECTION                     Graphics, Markups
To match geometry


MakeValid will convert them to valid objects


FULLGLOBE spatial object is available
“small” holes can be created
Point




STBuffer
geo STDistance




geo STIntersects
geography data type                                             geometry data type
•Geodetic (“Round Earth”) geospatial model:                    •Planar (“Flat Earth”) geospatial model
 •Ellipsoidal coordinates (Lat, Long, Z, M)                     •projected „flat map‟ (X, Y, Z, M)
•Define points, lines, and areas with longitude and latitude   •Define points, lines, and areas with coordinates
•Account for planetary curvature and obtain accurate “great    •Use for localized areas or non-projected surfaces such as
 circle” distances                                              interior spaces
The Mercator projection did not come out until 1569. Please play along 
Well-Known-Binary:
 0x0103000000010000000500000000000000004CDDC
 000000000004C0D4100000000004CDD40000000000
 04CDD4000000000C07A104100000000004CDD4000
 00000000BD0F41000000000088134100000000004CD
 DC000000000004C0D41

  Well-Known-Text:
  'POLYGON(( -30000 240000, 30000 30000, 270000
  30000, 260000 320000, -30000 240000))'

  GML:
  <Polygon xmlns="http://www.opengis.net/gml">
    <exterior><LinearRing><posList>
     -30000 240000 30000 30000 270000 30000
260000
     320000 -30000 240000
    </posList></LinearRing></exterior>
  </Polygon>
GEOMETRYCOLLECTION (POLYGON ((228869.875 314609.75,
228870.82875722542 314611.91763005778, 228852.73214285716
314634.03571428568, 228869.875 314609.75)), LINESTRING
(218999.875 310799.75, 218890.89169195751 310666.54817905917),
POLYGON ((214987.51136363635 305790.84090909094, 215609.875
305879.75, 215639.875 306329.75, 214987.51136363635
305790.84090909094)), POLYGON ((214949.875 305759.75,
214987.51136363635 305790.84090909094, 214922.60227272729
305781.56818181818, 214949.875 305759.75)), …..
CIRCULARSTRING
(0 50, 90 50, 180 50, 270 50, 0 50)

  If a circular linestring encloses an area,
  curve polygon can be created

CURVEPOLYGON (CIRCULARSTRING
 (0 50, 90 50, 180 50, 270 50, 0 50))

  Coordinate pair order is important
  for the geography type. This set
  of coordinates is ordered according
  to the “left foot rule” for exterior
  rings.
Both types provide static and instance methods
      Calculate distances, find intersections, etc.




Find streets that intersect the Microsoft campus
       SELECT StreetName
       FROM Streets
       WHERE Streets.StreetGeo.STIntersects(@ms) = 1
STUnion
                      STIntersection
BOOLEAN OPERATIONS    STDifference
                      STSymDifference

                      STIntersects
                      STContains
RELATION OPERATIONS   STWithin
                      STTouches
                      STOverlaps
                      STConvexHull
                      STBuffer
CONSTRUCTIONS         STReduce
                      BufferWithCurves

                      STDistance
                      STLength
NUMERICAL
                      STArea
OPERATIONS
                      ShortestLineTo
geometrygeography STCurveN(int n)
Int STNumCurves()
geometrygeography STCurveToLine()
geometrygeography CurveToLineWithTolerance(int tolerance, bool relative)
geometrygeography BufferWithCurves(double range)
geometrygeography ShortestLineTo(geometrygeography other)
Bool CompatibleWithDbCompatibilityLevel(int compatLevel)



Bool STIsValid()
Geography MakeValid()
Bool STContains(geography other)
Bool STWithin(geography other)
Bool STOverlaps(geography other)
Geography STConvexHull()
Bool ReorientObject(geography other)
BufferWithCurves()

This method will construct the
resulting polygon with circular
arcs, often resulting in a
dramatically smaller spatial
object.
DECLARE @g GEOGRAPHY =
GEOGRAPHY::STGeomFromText('CIRCULARSTRING(0 50, 45 50,
90 50)',4326)
DECLARE @b GEOGRAPHY = @g.BufferWithCurves(500000)
SELECT @b.STNumPoints()
--Number of vertices: 11

DECLARE @g GEOGRAPHY =
GEOGRAPHY::STGeomFromText('CIRCULARSTRING(0 50, 45 50,
90 50)',4326)
DECLARE @b GEOGRAPHY = @g.STBuffer(500000)
SELECT @b.STNumPoints()
--Number of vertices: 257
ReorientObject

• This method will reverse the
  order of coordinates which
  define polygon rings.

• This method is a NoOp on
  line strings, circular arcs and
  points.

• This method does only work
  with the GEOGRAPHY type.
geography::Point(lat, lon, 4326)




geography::Point(lat, lon, 4326)
geocoder




  webgis.usc.edu/Services/Geocode/About/GeocoderList.aspx
www.idvsolutions.com/products_spatialW
iki.aspx
aggregates
www.geodata.gov
                 www.openstreetmap.org
                    www.census.gov/geo/www/cob




datamarket.azure.com
Shape2SQL




MapPoint Add-in for SQL Server


SAFE FME

ESRI ArcGIS
Pitney Bowes EasyLoader
Take advantage of       • geometry and geography
comprehensive spatial       data types
       support            • Methods for spatial operations


                          • Store spatial data with business data
Build high performance
                       • Spatial indexing
    spatial solutions


                          • Industry-standards compatibility
 Extend and integrate
                          • Comprehensive programmatic library
geospatial applications

More Related Content

What's hot

Unique methods of GIS in Transportation
Unique methods of GIS in TransportationUnique methods of GIS in Transportation
Unique methods of GIS in Transportation
Andrew Harrison
 
Application of gis and remote sensing in modern transport system
Application of gis and remote sensing in modern transport systemApplication of gis and remote sensing in modern transport system
Application of gis and remote sensing in modern transport system
Sabhapathy Civil
 
Spatial Analysis for Urban development between “1990-2010” in city of Sulaim...
Spatial Analysis for Urban development between “1990-2010” in  city of Sulaim...Spatial Analysis for Urban development between “1990-2010” in  city of Sulaim...
Spatial Analysis for Urban development between “1990-2010” in city of Sulaim...
International Journal of Engineering Inventions www.ijeijournal.com
 
Statistical techniques in geographical analysis
Statistical techniques in geographical analysisStatistical techniques in geographical analysis
Statistical techniques in geographical analysis
akida mbugi
 

What's hot (20)

Unique methods of GIS in Transportation
Unique methods of GIS in TransportationUnique methods of GIS in Transportation
Unique methods of GIS in Transportation
 
Applications of GIS to Logistics and Transportation
Applications of GIS to Logistics and TransportationApplications of GIS to Logistics and Transportation
Applications of GIS to Logistics and Transportation
 
Geographical Information System(GIS) in Urban Design
Geographical Information System(GIS) in Urban DesignGeographical Information System(GIS) in Urban Design
Geographical Information System(GIS) in Urban Design
 
Application of gis and remote sensing in modern transport system
Application of gis and remote sensing in modern transport systemApplication of gis and remote sensing in modern transport system
Application of gis and remote sensing in modern transport system
 
2014 Ministerial Press Briefing by the Office The Surveyor-General Of The Fe...
2014 Ministerial  Press Briefing by the Office The Surveyor-General Of The Fe...2014 Ministerial  Press Briefing by the Office The Surveyor-General Of The Fe...
2014 Ministerial Press Briefing by the Office The Surveyor-General Of The Fe...
 
Themating maping
Themating mapingThemating maping
Themating maping
 
Introduction to Digital Maps
Introduction to Digital MapsIntroduction to Digital Maps
Introduction to Digital Maps
 
Determining the Absolute Height of the Ground using the Global Mapper Program...
Determining the Absolute Height of the Ground using the Global Mapper Program...Determining the Absolute Height of the Ground using the Global Mapper Program...
Determining the Absolute Height of the Ground using the Global Mapper Program...
 
Texture Generation for Expressive Rock Drawing
Texture Generation for Expressive Rock DrawingTexture Generation for Expressive Rock Drawing
Texture Generation for Expressive Rock Drawing
 
Field move clino
Field move clinoField move clino
Field move clino
 
Spatial Analysis for Urban development between “1990-2010” in city of Sulaim...
Spatial Analysis for Urban development between “1990-2010” in  city of Sulaim...Spatial Analysis for Urban development between “1990-2010” in  city of Sulaim...
Spatial Analysis for Urban development between “1990-2010” in city of Sulaim...
 
GIS - Topology
GIS - Topology GIS - Topology
GIS - Topology
 
QGIS training class 3
QGIS training class 3QGIS training class 3
QGIS training class 3
 
2012 Architecture Portfolio
2012 Architecture Portfolio2012 Architecture Portfolio
2012 Architecture Portfolio
 
Mapping Cyberspace
Mapping CyberspaceMapping Cyberspace
Mapping Cyberspace
 
Expressive Map Design: OGC SLD/SE extension for expressive mapstyles
Expressive Map Design: OGC SLD/SE extension for expressive mapstylesExpressive Map Design: OGC SLD/SE extension for expressive mapstyles
Expressive Map Design: OGC SLD/SE extension for expressive mapstyles
 
Practical work in geography
Practical work in geographyPractical work in geography
Practical work in geography
 
Statistical techniques in geographical analysis
Statistical techniques in geographical analysisStatistical techniques in geographical analysis
Statistical techniques in geographical analysis
 
Jones Et Al Gisruk 2008
Jones Et Al  Gisruk 2008Jones Et Al  Gisruk 2008
Jones Et Al Gisruk 2008
 
Analysis of suggested Sites for Construction of a Shopping Mall at Banepa,Kavre
Analysis of suggested Sites for Construction of a Shopping Mall at Banepa,KavreAnalysis of suggested Sites for Construction of a Shopping Mall at Banepa,Kavre
Analysis of suggested Sites for Construction of a Shopping Mall at Banepa,Kavre
 

Similar to SQLBits X SQL Server 2012 Spatial

Geographic information system
Geographic information systemGeographic information system
Geographic information system
Sumanta Das
 
Application of gis & rs in urban planning
Application of gis & rs in urban planning Application of gis & rs in urban planning
Application of gis & rs in urban planning
sathish1446
 
Introduction to GIS systems
Introduction to GIS systemsIntroduction to GIS systems
Introduction to GIS systems
Vivek Srivastava
 

Similar to SQLBits X SQL Server 2012 Spatial (20)

Geographic information system
Geographic information systemGeographic information system
Geographic information system
 
What is Geography Information Systems (GIS)
What is Geography Information Systems (GIS)What is Geography Information Systems (GIS)
What is Geography Information Systems (GIS)
 
Geographic information system(GIS) and its applications in agriculture
Geographic information system(GIS) and its applications in agricultureGeographic information system(GIS) and its applications in agriculture
Geographic information system(GIS) and its applications in agriculture
 
gis.pdf
gis.pdfgis.pdf
gis.pdf
 
gis.pdf
gis.pdfgis.pdf
gis.pdf
 
Info Grafix
Info GrafixInfo Grafix
Info Grafix
 
Deploma
DeplomaDeploma
Deploma
 
Exploratory Spatial Analytics (ESA)
Exploratory Spatial Analytics (ESA)Exploratory Spatial Analytics (ESA)
Exploratory Spatial Analytics (ESA)
 
Introduction of GIS & Remote Sensing (RS)
Introduction of GIS & Remote Sensing (RS)Introduction of GIS & Remote Sensing (RS)
Introduction of GIS & Remote Sensing (RS)
 
Spatial Computing and the Future of Utility GIS
Spatial Computing and the Future of Utility GISSpatial Computing and the Future of Utility GIS
Spatial Computing and the Future of Utility GIS
 
Application of gis & rs in urban planning
Application of gis & rs in urban planning Application of gis & rs in urban planning
Application of gis & rs in urban planning
 
Gis
GisGis
Gis
 
What is GIS
What is GISWhat is GIS
What is GIS
 
MODS_Training_January_2015.pptx
MODS_Training_January_2015.pptxMODS_Training_January_2015.pptx
MODS_Training_January_2015.pptx
 
Introduction to GIS systems
Introduction to GIS systemsIntroduction to GIS systems
Introduction to GIS systems
 
PIAS 2013-GIS.pptxfskjczjsbchdbfscnnND dHSA
PIAS 2013-GIS.pptxfskjczjsbchdbfscnnND  dHSAPIAS 2013-GIS.pptxfskjczjsbchdbfscnnND  dHSA
PIAS 2013-GIS.pptxfskjczjsbchdbfscnnND dHSA
 
Big Geo Data: Open Source and Open Standards
Big Geo Data: Open Source and Open StandardsBig Geo Data: Open Source and Open Standards
Big Geo Data: Open Source and Open Standards
 
Introduction to gis and arc gis
Introduction to gis and arc gis Introduction to gis and arc gis
Introduction to gis and arc gis
 
Geographic inf system
Geographic inf systemGeographic inf system
Geographic inf system
 
Introduction and Application of GIS
Introduction and Application of GISIntroduction and Application of GIS
Introduction and Application of GIS
 

More from Michael Rys

More from Michael Rys (20)

Big Data and Data Warehousing Together with Azure Synapse Analytics (SQLBits ...
Big Data and Data Warehousing Together with Azure Synapse Analytics (SQLBits ...Big Data and Data Warehousing Together with Azure Synapse Analytics (SQLBits ...
Big Data and Data Warehousing Together with Azure Synapse Analytics (SQLBits ...
 
Big Data Processing with .NET and Spark (SQLBits 2020)
Big Data Processing with .NET and Spark (SQLBits 2020)Big Data Processing with .NET and Spark (SQLBits 2020)
Big Data Processing with .NET and Spark (SQLBits 2020)
 
Running cost effective big data workloads with Azure Synapse and ADLS (MS Ign...
Running cost effective big data workloads with Azure Synapse and ADLS (MS Ign...Running cost effective big data workloads with Azure Synapse and ADLS (MS Ign...
Running cost effective big data workloads with Azure Synapse and ADLS (MS Ign...
 
Running cost effective big data workloads with Azure Synapse and Azure Data L...
Running cost effective big data workloads with Azure Synapse and Azure Data L...Running cost effective big data workloads with Azure Synapse and Azure Data L...
Running cost effective big data workloads with Azure Synapse and Azure Data L...
 
Big Data Processing with Spark and .NET - Microsoft Ignite 2019
Big Data Processing with Spark and .NET - Microsoft Ignite 2019Big Data Processing with Spark and .NET - Microsoft Ignite 2019
Big Data Processing with Spark and .NET - Microsoft Ignite 2019
 
Bringing the Power and Familiarity of .NET, C# and F# to Big Data Processing ...
Bringing the Power and Familiarity of .NET, C# and F# to Big Data Processing ...Bringing the Power and Familiarity of .NET, C# and F# to Big Data Processing ...
Bringing the Power and Familiarity of .NET, C# and F# to Big Data Processing ...
 
Building data pipelines for modern data warehouse with Apache® Spark™ and .NE...
Building data pipelines for modern data warehouse with Apache® Spark™ and .NE...Building data pipelines for modern data warehouse with Apache® Spark™ and .NE...
Building data pipelines for modern data warehouse with Apache® Spark™ and .NE...
 
Modernizing ETL with Azure Data Lake: Hyperscale, multi-format, multi-platfor...
Modernizing ETL with Azure Data Lake: Hyperscale, multi-format, multi-platfor...Modernizing ETL with Azure Data Lake: Hyperscale, multi-format, multi-platfor...
Modernizing ETL with Azure Data Lake: Hyperscale, multi-format, multi-platfor...
 
Best Practices and Performance Tuning of U-SQL in Azure Data Lake (SQL Konfer...
Best Practices and Performance Tuning of U-SQL in Azure Data Lake (SQL Konfer...Best Practices and Performance Tuning of U-SQL in Azure Data Lake (SQL Konfer...
Best Practices and Performance Tuning of U-SQL in Azure Data Lake (SQL Konfer...
 
Bring your code to explore the Azure Data Lake: Execute your .NET/Python/R co...
Bring your code to explore the Azure Data Lake: Execute your .NET/Python/R co...Bring your code to explore the Azure Data Lake: Execute your .NET/Python/R co...
Bring your code to explore the Azure Data Lake: Execute your .NET/Python/R co...
 
Best practices on Building a Big Data Analytics Solution (SQLBits 2018 Traini...
Best practices on Building a Big Data Analytics Solution (SQLBits 2018 Traini...Best practices on Building a Big Data Analytics Solution (SQLBits 2018 Traini...
Best practices on Building a Big Data Analytics Solution (SQLBits 2018 Traini...
 
U-SQL Killer Scenarios: Custom Processing, Big Cognition, Image and JSON Proc...
U-SQL Killer Scenarios: Custom Processing, Big Cognition, Image and JSON Proc...U-SQL Killer Scenarios: Custom Processing, Big Cognition, Image and JSON Proc...
U-SQL Killer Scenarios: Custom Processing, Big Cognition, Image and JSON Proc...
 
Introduction to Azure Data Lake and U-SQL for SQL users (SQL Saturday 635)
Introduction to Azure Data Lake and U-SQL for SQL users (SQL Saturday 635)Introduction to Azure Data Lake and U-SQL for SQL users (SQL Saturday 635)
Introduction to Azure Data Lake and U-SQL for SQL users (SQL Saturday 635)
 
U-SQL Killer Scenarios: Taming the Data Science Monster with U-SQL and Big Co...
U-SQL Killer Scenarios: Taming the Data Science Monster with U-SQL and Big Co...U-SQL Killer Scenarios: Taming the Data Science Monster with U-SQL and Big Co...
U-SQL Killer Scenarios: Taming the Data Science Monster with U-SQL and Big Co...
 
The Road to U-SQL: Experiences in Language Design (SQL Konferenz 2017 Keynote)
The Road to U-SQL: Experiences in Language Design (SQL Konferenz 2017 Keynote)The Road to U-SQL: Experiences in Language Design (SQL Konferenz 2017 Keynote)
The Road to U-SQL: Experiences in Language Design (SQL Konferenz 2017 Keynote)
 
Introducing U-SQL (SQLPASS 2016)
Introducing U-SQL (SQLPASS 2016)Introducing U-SQL (SQLPASS 2016)
Introducing U-SQL (SQLPASS 2016)
 
Tuning and Optimizing U-SQL Queries (SQLPASS 2016)
Tuning and Optimizing U-SQL Queries (SQLPASS 2016)Tuning and Optimizing U-SQL Queries (SQLPASS 2016)
Tuning and Optimizing U-SQL Queries (SQLPASS 2016)
 
Taming the Data Science Monster with A New ‘Sword’ – U-SQL
Taming the Data Science Monster with A New ‘Sword’ – U-SQLTaming the Data Science Monster with A New ‘Sword’ – U-SQL
Taming the Data Science Monster with A New ‘Sword’ – U-SQL
 
Killer Scenarios with Data Lake in Azure with U-SQL
Killer Scenarios with Data Lake in Azure with U-SQLKiller Scenarios with Data Lake in Azure with U-SQL
Killer Scenarios with Data Lake in Azure with U-SQL
 
ADL/U-SQL Introduction (SQLBits 2016)
ADL/U-SQL Introduction (SQLBits 2016)ADL/U-SQL Introduction (SQLBits 2016)
ADL/U-SQL Introduction (SQLBits 2016)
 

Recently uploaded

Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Safe Software
 
Artificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsArtificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and Myths
Joaquim Jorge
 
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
?#DUbAI#??##{{(☎️+971_581248768%)**%*]'#abortion pills for sale in dubai@
 

Recently uploaded (20)

Boost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityBoost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivity
 
Top 10 Most Downloaded Games on Play Store in 2024
Top 10 Most Downloaded Games on Play Store in 2024Top 10 Most Downloaded Games on Play Store in 2024
Top 10 Most Downloaded Games on Play Store in 2024
 
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
 
Artificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : UncertaintyArtificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : Uncertainty
 
Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)
 
Polkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin WoodPolkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin Wood
 
Real Time Object Detection Using Open CV
Real Time Object Detection Using Open CVReal Time Object Detection Using Open CV
Real Time Object Detection Using Open CV
 
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...
 
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
 
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
 
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
 
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...
 
🐬 The future of MySQL is Postgres 🐘
🐬  The future of MySQL is Postgres   🐘🐬  The future of MySQL is Postgres   🐘
🐬 The future of MySQL is Postgres 🐘
 
Artificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsArtificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and Myths
 
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
 
A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?
 
Scaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationScaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organization
 
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
 
Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonData Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt Robison
 

SQLBits X SQL Server 2012 Spatial

  • 1.
  • 2.
  • 3. The Business Opportunity Increased Ubiquitous geographical user-sophistication technology • More data sources • GPS • More kinds of data • Online mapping services • Integrated systems and mash-ups • Availability of geographical data
  • 4.
  • 5. Customer-base management Real-estate and development development Environmental- and analysis related data impact, analysis, and planning Scientific research study Financial and design and economic analysis analysis in communities Market Government-based segmentation planning and and analysis development analysis
  • 6. Tree, Pole, Hydrant, POINT MULTIPOINT Valve Road, River, LINESTRING MULTILINESTRING Railway, Pipeline Cadastre, Park, POLYGON MULTIPOLYGON Administrative Boundary COLLECTION Graphics, Markups
  • 7.
  • 8. To match geometry MakeValid will convert them to valid objects FULLGLOBE spatial object is available “small” holes can be created
  • 11. geography data type geometry data type •Geodetic (“Round Earth”) geospatial model: •Planar (“Flat Earth”) geospatial model •Ellipsoidal coordinates (Lat, Long, Z, M) •projected „flat map‟ (X, Y, Z, M) •Define points, lines, and areas with longitude and latitude •Define points, lines, and areas with coordinates •Account for planetary curvature and obtain accurate “great •Use for localized areas or non-projected surfaces such as circle” distances interior spaces
  • 12. The Mercator projection did not come out until 1569. Please play along 
  • 13. Well-Known-Binary: 0x0103000000010000000500000000000000004CDDC 000000000004C0D4100000000004CDD40000000000 04CDD4000000000C07A104100000000004CDD4000 00000000BD0F41000000000088134100000000004CD DC000000000004C0D41 Well-Known-Text: 'POLYGON(( -30000 240000, 30000 30000, 270000 30000, 260000 320000, -30000 240000))' GML: <Polygon xmlns="http://www.opengis.net/gml"> <exterior><LinearRing><posList> -30000 240000 30000 30000 270000 30000 260000 320000 -30000 240000 </posList></LinearRing></exterior> </Polygon>
  • 14. GEOMETRYCOLLECTION (POLYGON ((228869.875 314609.75, 228870.82875722542 314611.91763005778, 228852.73214285716 314634.03571428568, 228869.875 314609.75)), LINESTRING (218999.875 310799.75, 218890.89169195751 310666.54817905917), POLYGON ((214987.51136363635 305790.84090909094, 215609.875 305879.75, 215639.875 306329.75, 214987.51136363635 305790.84090909094)), POLYGON ((214949.875 305759.75, 214987.51136363635 305790.84090909094, 214922.60227272729 305781.56818181818, 214949.875 305759.75)), …..
  • 15.
  • 16. CIRCULARSTRING (0 50, 90 50, 180 50, 270 50, 0 50) If a circular linestring encloses an area, curve polygon can be created CURVEPOLYGON (CIRCULARSTRING (0 50, 90 50, 180 50, 270 50, 0 50)) Coordinate pair order is important for the geography type. This set of coordinates is ordered according to the “left foot rule” for exterior rings.
  • 17. Both types provide static and instance methods Calculate distances, find intersections, etc. Find streets that intersect the Microsoft campus SELECT StreetName FROM Streets WHERE Streets.StreetGeo.STIntersects(@ms) = 1
  • 18. STUnion STIntersection BOOLEAN OPERATIONS STDifference STSymDifference STIntersects STContains RELATION OPERATIONS STWithin STTouches STOverlaps STConvexHull STBuffer CONSTRUCTIONS STReduce BufferWithCurves STDistance STLength NUMERICAL STArea OPERATIONS ShortestLineTo
  • 19. geometrygeography STCurveN(int n) Int STNumCurves() geometrygeography STCurveToLine() geometrygeography CurveToLineWithTolerance(int tolerance, bool relative) geometrygeography BufferWithCurves(double range) geometrygeography ShortestLineTo(geometrygeography other) Bool CompatibleWithDbCompatibilityLevel(int compatLevel) Bool STIsValid() Geography MakeValid() Bool STContains(geography other) Bool STWithin(geography other) Bool STOverlaps(geography other) Geography STConvexHull() Bool ReorientObject(geography other)
  • 20. BufferWithCurves() This method will construct the resulting polygon with circular arcs, often resulting in a dramatically smaller spatial object. DECLARE @g GEOGRAPHY = GEOGRAPHY::STGeomFromText('CIRCULARSTRING(0 50, 45 50, 90 50)',4326) DECLARE @b GEOGRAPHY = @g.BufferWithCurves(500000) SELECT @b.STNumPoints() --Number of vertices: 11 DECLARE @g GEOGRAPHY = GEOGRAPHY::STGeomFromText('CIRCULARSTRING(0 50, 45 50, 90 50)',4326) DECLARE @b GEOGRAPHY = @g.STBuffer(500000) SELECT @b.STNumPoints() --Number of vertices: 257
  • 21. ReorientObject • This method will reverse the order of coordinates which define polygon rings. • This method is a NoOp on line strings, circular arcs and points. • This method does only work with the GEOGRAPHY type.
  • 23.
  • 27. www.geodata.gov www.openstreetmap.org www.census.gov/geo/www/cob datamarket.azure.com
  • 28. Shape2SQL MapPoint Add-in for SQL Server SAFE FME ESRI ArcGIS Pitney Bowes EasyLoader
  • 29.
  • 30.
  • 31.
  • 32.
  • 33. Take advantage of • geometry and geography comprehensive spatial data types support • Methods for spatial operations • Store spatial data with business data Build high performance • Spatial indexing spatial solutions • Industry-standards compatibility Extend and integrate • Comprehensive programmatic library geospatial applications

Editor's Notes

  1. Advances in technology have led to the proliferation of geographical services and devices, including online mapping solutions such as Microsoft Virtual Earth, and inexpensive global positioning system (GPS) solutions. Technology that was once focused towards geographic information system (GIS) specialists is now widely available to everyone for a variety of practical uses. There are two factors that bring new expectations and opportunities for software applications. The increase in user sophistication andThe ubiquity of geographical servicesSpatial information is just another component to be incorporated into applications and used as a basis for making better decisions and providing higher value services.
  2. As previously mentioned, Spatial data can now be used for a variety of practical uses. The spatial support in Microsoft SQL Server 2008 can help users make better decisions through analysis of location data in scenarios such as: Customer-base management and development: i.e. visually analyze where your customers are in relation to sales reps or by territory. Environmental-related data impact, analysis, and planning: i.e.Environmental engineers canvisually display historical forest fire data on a map to better predict future threats.Financial and economic analysis in communities: i.e. Better understand the impact and/or payoff of building major developments within specific communities or areas through visual analysis.Government-based planning and development analysis:i.e. City planners can utilize spatial data to visually analyze transportation planning, zoning, population density, and housing data.Market segmentation and analysis: i.e. visually display cell phone usage by income level across a specified area or neighborhood.Scientific research study design and analysis: i.e. Researchers can incorporate spatial data for targeting participant recruitment, embed spatial-driven applications within surveys for location-related questions, and post-survey analysis. Real-estate development and analysis: i.e. Housing developers can visually compare housing density, sale prices, and zoning to make decisions about future development investments.
  3. What exactly is Spatial data: Spatial data is used to represent points, lines, areas, and 3-dimensional structures on a surface. Most commonly, these elements relate to actual physical locations on Earth in which case they can be described a geospatial data. Most of us are familiar with this concept through the use of globes and maps, which generally show multiple geographic features and their relative locations.SQL Server 2008 supports two spatial data types: GEOGRAPHY and GEOMETRY.The GEOGRAPHY type Geodetic (“Round Earth”) geospatial model : the geodetic or round earth model provides the most accurate way to represent geographic features Define points, lines, and areas with longitude and latitude: these points can include a specific location like a restaurant, lines can be roads and power lines, and a polygon areas can include a lake or neighbourhood.Account for planetary curvature and obtain accurate “great circle” distances The GEOMETRY typePlanar (“Flat Earth”) geospatial model : To work with geospatial data on a flat, two dimensional surface, a projection is created to flatten the geographical objects on the spheroid. Define points, lines, and areas with coordinates on an arbitrary planeUse for localized areas or non-projected surfaces such as interior spacesThis kind of data is commonly found in regional mapping systems, such as the state plane system defined by the United States government, or for maps and interior floor plans where the curvature of the Earth does not need to be taken into account.Geometry side note: The geometry data type provides properties and methods that are compliant with the OGC Simple Features Specification for SQL, enabling you to perform operations on geometric data that produce industry-standard behavior. General Side note: There are a number of different geodetic models in use throughout the world, including the Airy 1830 ellipsoid used in the United Kingdom’s Ordnance Survey geographic system, and the WGS84 ellipsoid used by most of the world’s GPS solutions.
  4. Both spatial data types in SQL Server 2008 provide a comprehensive set of instance and static methods that you can use to perform spatial queries and operations. For example, a variable named @ms of type geometry can be used to represent the area of the Microsoft campus. A query against a table of streets that includes a geometry column to define each street can be used to determine which streets intersect the campus This offers a quick visual analysis to end users.
  5. Maybe something more from this post:
  6. Aggregates demo
  7. Related blog posthttp://blogs.msdn.com/b/davidlean/archive/2008/11/14/sql-spatial-how-to-get-spatial-data-free-maps-n-demographics.aspx
  8. WPF = Windows Presentation Foundation  replaces Win Forms
  9. Query performance against spatial data is further enhanced by the inclusion of spatial index support in SQL Server 2008. Spatial indexing built into query engine:You can index spatial data based on a grid-based, quad-tree  indexing model that is integrated into the SQL Server database engine. As shown by this conceptual model to the right, Spatial indexes consist of a grid-based hierarchy in which each level of the index subdivides the grid sector defined in the level above. The SQL Server query optimizer:For optimal performance, SQL Server makes cost-based decisions on which indexes to use for a given query Because spatial indexes are an integral part of the database engine, SQL Server can make cost-based decisions about whether or not to use a particular spatial index, just like any other index. This indexing method quickly eliminates unnecessary and irrelevant data from the query for improved performance.
  10. With Microsoft SQL Server 2008, you can:Take advantage of comprehensive spatial supportgeometry and geography data typesMethods for spatial operationsBuild high performance spatial solutionsStore spatial data with business dataSpatial indexingExtend and integrate geospatial applicationsIndustry-standards compatibilityComprehensive programmatic library