Sunday, September 12, 2010

OGR MS SQL 2008 Spatial driver

I've now added the initial revision of the OGR MS SQL Spatial driver to the GDAL repository. For further information please refer to the driver information page.
Working binaries (which always contain all the recent fixes) can be downloaded from the daily build system available at:

Since I didn't have the chance to test with all kind of the fancy spatial data types any feedback on the potential issues are graciously accepted.

Upon the experiences gathered when writing this driver, I'm also planning to add support for accessing the native SqlGeometry/SqlGeography serialization format in the MapServer sql2008 driver which appears to provide a significant increment in the performance of the data retrieval.


  1. Any updates on GEOGRAPHY support for the MapServer driver?

  2. Geography support has already been added in the development versions, you can download the corresponding binaries from

    According to the implementation, for the geography type you should specify the colum type in the DATA section explicitly, like:

    DATA "ogr_geometry(geography) from rivers USING UNIQUE ogr_fid USING SRID=4326"

    For more information about the MSSQL driver in MapServer see:

  3. Thank you for the SQL 2008 Spatial driver, it is very welcome!

    I have been relying upon Morten's SqlSpatialTools to import shapefiles into SQL 2008. Finally, now there is a driver that allows me to use ogr2ogr to create a shapefile directly from SQL Server! Thank You!

    I have found that geometry data type is exported to shapefile correctly. An export using SQL Server geography data type, however, appears to have the coordinates reversed. That is x=y and y=x...

    Other than that, no issues so far using the driver.

    1. How to make to mssql driver works in Ubuntu 13.04 with QGIS 1.8?

  4. Thank you for your information. I love to read it much. Gamingguide

  5. We have all of the 2020 Australian AFL football fixtures for today, this week & every afl live tv streaming fixtures site for the 2020 Australian AFL.

  6. Some of these encounters are going to be great. Emmanuel Navarrete is the Mexican and he is currently holding the WBO super welterweight bout champion. As far as he is concerned, Fury Wilder PPV the fight is due or die affair because he needs to prove that he deserves to hold that belt. Joe Santissima will pose a difficult challenge for him.