[gdal-dev] OGR 1.11 upgrade -> Geometry gone after layer.SetFeature() (MSSQL)

Niels Kjøller Hansen niels.k.h at gmail.com
Thu May 15 03:45:53 PDT 2014


Hello all

I have been running a python script daily, which takes a table from a
MSSQL database, identifies which fields are strings, and does some
character set fixing (utf8 to latin1)

The trouble is, that after an upgrade to GDAL/OGR 1.11, the table ends
up with an empty geometry column. When I try to run through the script
in the python terminal, a call to 'feature.GetGeomFieldCount()'
returns 0

And this is before doing something to the feature. It is my guess that
the feature doesn't get the geometry, and when I write it (using
layer.SetFeature(feature)), It empties the column.

Am I doing something wrong? The entire script is here:
http://osgeo.codepad.org/Yn5xAdE6 (mostly, comments are in Danish,
sorry about that)

Other ways of succesfully importing utf8 sources (gml) in to a
MSSQL-database (latin1) is also greatly appreciated, although I would
still like to be able to do string manipulation in the database :)

Regards,
Niels


More information about the gdal-dev mailing list