André, > Hi all, > > We are using OGRSFDriver::CopyDataSource() to copy a GML data source to a > memory data source on v1.11.x. > > We have encountered a problem where one of the feature tags of a particular > GML file we are trying to read is malformed. What we are seeing is that an > error occurs in OGRGMLLayer::GetNextFeature(), which gets reported as > expected via CPLError(). > > The problem we are faced with is that that error seems to be reset using > CPLErrorReset() before control returns to the caller of CopyDataSource(), > specifically in OGRDataSource::CopyLayer(). The result is that the copying > silently skips over problematic features.
I'm not clear of the reason for those CPLErrorReset() in CopyLayer(). I guess you could remove them without trouble. If you don't want to modify GDAL sources, a workaround would be to install your own error handler with CPLSetErrorHandler() or CPLPushErrorHandler() so as to note the error. Even -- Spatialys - Geospatial professional services http://www.spatialys.com _______________________________________________ gdal-dev mailing list [email protected] http://lists.osgeo.org/mailman/listinfo/gdal-dev
