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: http://vbkto.dyndns.org/sdk/

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.

4 comments:

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

    ReplyDelete
  2. Geography support has already been added in the development versions, you can download the corresponding binaries from http://vbkto.dyndns.org/sdk/

    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: http://mapserver.org/trunk/input/vector/mssql.html

    ReplyDelete
  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.

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

      Delete