[gdal-dev] OGRLayer::SetFeature fails with out of date OGRFeature

Ramiro Gonzalez ramirogonzalez at suremptec.com.ar
Tue Apr 27 15:17:17 EDT 2010


My application uses OGR to edit ESRI Shapefiles.

If I follow this steps:

1_ Create a feature(OGRFeature::CreateFeature) using the feature definition
from an existing layer(layerA)
2_ Add a field (OGRLayer::CreateField) to layerA
3_ Try to save the feature (OGRLayer::SetFeature) in layerA

I receive a SIGSEGV from function OGRFeature::SetField. I believe this
happens because I modify the layer definition in step 2 leaving the feature
definition out of date.

I'd like to know if there is any way to check if the feature is valid before
calling SetFeature.

Thanks
Ramiro
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.osgeo.org/pipermail/gdal-dev/attachments/20100427/fe97c148/attachment.html


More information about the gdal-dev mailing list