[gdal-dev] delete feature without fid
rajjad at gmail.com
Thu Feb 2 01:59:17 EST 2012
in the gdal java bindings I need to delete a feature from layer, but it
seems the only way to delete the feature is its FID, which in my case is
unknown. Is there anyway to find the true FID of a feature in layer or
remove a feature by reference just like it can be updated or re-written.
my code ..
Feature f = layer.GetFeature(i); // i is index of loop that runs till total
layer.SetSpatialFilter(g); //reducing layer content to features with same
geom...here its a point
Feature comparefeature = layer.GetNextFeature();
comparefeature.delete(); // not the right method...
comparefeature = layer.GetNextFeature();
layer.SetSpatialFilter(*null*); //remove spatial filter
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the gdal-dev