Dan, You can specify the geometry column name along with the table name in the connection string, something like:
MSSQL:server=servername;database=dbname;tables=schemaname.tablename(geomcolumnname) for more information see: http://www.gdal.org/ogr/drv_mssqlspatial.html Best regards, Tamas 2011/10/26 Dan Homerick <danhomer...@gmail.com> > The current logic for detecting the geometry or geography column will > accept a column of type "image" (a subset of binary string[1]) as the > GeomColumn. Furthermore, the logic checks the column types > sequentially, and will accept an "image" column as the GeomColumn, > even if there is a "geometry" or "geography" later in the list of > columns. > > I came across this by trying to do queries on a table which does not > have any spatial data, but which does have column of type "image". The > image column was incorrectly assumed to be a geometry column, which > naturally led to errors. This was despite NOT using "OGRSQL" as the > dialect. > > There doesn't appear to be any interface to specify which, if any, > column should be used as the GeomColumn -- am I (hopefully!) just > overlooking something? > > [1] http://msdn.microsoft.com/en-us/library/ms187752.aspx > > - Dan > _______________________________________________ > gdal-dev mailing list > gdal-dev@lists.osgeo.org > http://lists.osgeo.org/mailman/listinfo/gdal-dev >
_______________________________________________ gdal-dev mailing list gdal-dev@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/gdal-dev