I'm trying to update a PostGIS table using the SetField()
method in python. The table is imported from a shapefile with pgsql2shp
so it has a gid
field, which can be used as FID or primary key.
However, when executing SetField()
, I get an error saying:
Error 1: Unable to update features in tables without a recognised FID column.
I tried different things. The only thing that allows updating is to externally add and populate a new column called ogc_fid
. Even adding a 'fid' column won't do.
Is there a way to tell ogr/gdal (as of gdal2.1.3) in the python code itself that an existing field such as gid
is the FID column?
No comments:
Post a Comment