OpenGeoDB for MS SQL Server

This post is backed up from my old blog and was posted at 2013-07-28.

For a project I need the data of the OpenGeoDB. The OpenGeoDB project aims to build a database with geo coordinates for all cities and zip codes. Currently it supports Austria, Belgium, Switzerland, Germany and Liechtenstein. Unfortunately it ships as a sql script for MySQL. After a search with my favorite search engine, I found the post from devio describing how to import the data into MSSQL. The bad point is, he provides only the schema creation as an MSSQL script. When trying to import the data (after doing the transformation he described), it aborted with some weird errors and I had to correct some of the insert statements. I’m sorry, but it’s a long time ago, I don’t remember what the exact error was :-).

For you guys, I prepared a zipfile which contains the complete OpenGeoDB (date of data is Dec 2012) and a little batch file. Please take a look at the batch file before running it. Per default it will import to your local .\SQLEXPRESS with a trusted connection into the “opengeodb” database.

Grab it via GitHub.