[gdal-dev] Auto-selection of geometry column for MS SQL Server is not restrictive enough

Tamas Szekeres szekerest at gmail.com
Wed Oct 26 14:27:11 EDT 2011


You can specify the geometry column name along with the table name in the
connection string, something like:


for more information see: http://www.gdal.org/ogr/drv_mssqlspatial.html

Best regards,


2011/10/26 Dan Homerick <danhomerick at 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 at lists.osgeo.org
> http://lists.osgeo.org/mailman/listinfo/gdal-dev
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.osgeo.org/pipermail/gdal-dev/attachments/20111026/f03ae72f/attachment.html

More information about the gdal-dev mailing list