Even Rouault wrote:
Ramiro,
It is illegal to change the layer definition with CreateField() if you have
pre-existing features of that layer. This is documented here :
http://www.gdal.org/ogr/classOGRFeatureDefn.html#40e681d8464b42f1a1fac655f16ac3dd
Illegal yes, but IMHO segfault should ne
Ramiro,
It is illegal to change the layer definition with CreateField() if you have
pre-existing features of that layer. This is documented here :
http://www.gdal.org/ogr/classOGRFeatureDefn.html#40e681d8464b42f1a1fac655f16ac3dd
There's no way to check if the feature is "valid". So, just don't
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 recei