[gdal-dev] Re: delete feature without fid
even.rouault at mines-paris.org
Thu Feb 2 03:42:23 EST 2012
I would have pointed you to http://gdal.org/java for the Javadoc , but the
website is currently down, so I give you a summary of what you'll find :
- To retrive the FID of a feature, yes, you need to use Feature.GetFID()
- Feature.delete() should not be called under normal circumstances. Normal
garbage collection should work without that help.
- To delete a feature from a layer, you need to call Layer.DeleteFeature(an_fid)
- Layer.SyncToDisk() is not implemented in all drivers. The safest method to
make sure the file is properly rewritten is to *explicitely* close the
datasource with DataSource.delete(). Yes, you must explicitely destroy it to
make sure the native code associated is indeed called. Garbage collection isn't
guaranteed to do it.
More information about the gdal-dev