A long time ago, in an apartment up the street, I put together a bunch of blog posts with simple examples of using Microsoft SQL for spatial data. Those blogs, aptly titled, Spatial SQL for the Geographer, still get a good amount of hits five years after they were originally posted.
Knowing that these old blogs still get traffic, I wanted to modernize them a little bit. As with all my 2016 projects, I wanted to do something I hadn’t done before, or improve a skill. So for this project, I moved all the scripts from the blog posts into my GitHub account:
The code is now much more accessible and not buried in the text of a blog post, which is really why I wanted to get them into GitHub.
The ReadMe has links to all the original blog posts. Those posts give an in-depth look into how the scripts work, references to MSDN documentation, and links to the original sample data download. I wanted to make sure this is still relevant, so I have tested the data and scripts though Microsoft SQL 2014 using their Express version. Everything works.
Check it out, make some improvements, or add some new script examples. Spatial analysis in Microsoft SQL Server isn’t that popular with geographers and geo-techies alike, but it does have it’s place. Hopefully these scripts help get someone started on the right path.
The next step is to translate these into PostGIS and put together a Spatial PostGIS for the Geographer post!