[Gdal-dev] OGRLayer::CreateFeature not setting feature id on
OGRFeature
Chuck Wilbur
chuckwilbur at spatialnet.net
Fri Dec 8 17:15:54 EST 2006
Hi all,
I'm using the FWTools 1.1.0 binaries and PostgreSQL 8.1 with PostGIS
installed.
I have my first OGR C++ application built, so far mostly based on the
tutorial at https://gdal.osgeo.org/ogr/ogr_apitut.html
After calling OGRLayer::CreateFeature, I want to retrieve the generated
feature ID from the OGRFeature object I passed in. The docs say "Upon
successful return the passed feature will have been updated with the new
feature id.", but this isn't happening for me. GetFID just returns -1
(OGRNullFID).
Is there something I need to do to get the OGRFeature updated with the new
fid, or is this perhaps a bug in the Postgres driver?
Regards,
Chuck
More information about the Gdal-dev
mailing list