Sample data and scripts using Microsoft spatial SQL
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
CalculateBuffer.sql
CalculateCentroid.sql
CalculateDistance.sql
CalculateExtent.sql
CalculateLines.sql
CheckInvalidGeom.sql
CorrectPointOrder.sql
FixInvalid.sql
GeomContains.sql
GeomDifference.sql
GeomIntersect.sql
GeomUnion.sql
LICENSE
MultiPointtoLine.sql
MultiPointtoLineFast.sql
README.md
UnionAggregate.sql
UsingSpatialIndex.sql

README.md

SpatialSQLfortheGeographer

Sample data and scripts using Microsoft spatial SQL. Code developed using SQL Server 2008 R2, but everything still works as of April 2016 up through Microsoft SQL Server 2014. Any suggestions or improvements are welcome.

All scripts and tables used here are based on the GEOMETRY data type

Data used in scripts and tutorials can be downloaded here (it's a 28mb zip). All data originally downloaded from Natural Earth's awesome website

A number of tutorials are available from GISDoctor.com

Part 1 - Welcome to Spatial SQL

Part 2 - Basic Spatial SQL Scripts

Part 3 - More Basic Spatial SQL Scripts

Part 4 - Mulit-Point to Line Example