[Imports] FYI - GDAL Libarary error

Mike N. niceman at att.net
Tue Sep 8 18:31:49 BST 2009


FYI -

   Several times I have run into an error when using
http://svn.openstreetmap.org/applications/utils/import/nhd2osm/polyshp2osm-Area.py .
The section:

while f.GetField(ignoreField) in ignoreValues:
if l.GetNextFeature() == None:


   GetNextFeature() has an internal library error, reported as

ERROR 10: Pointer 'hOtherFeat' is NULL in 'OGR_F_Equal'.

   The data conversion incorrectly terminates at that point, although there
was unconverted data remaining.

    The Python code appears correct to me.  I downloaded the latest gdal
library and rebuilt it (Linux Fedora) with the same result.   My conclusion
is that the gdal library does not properly handle this case on some types of
NHD shapefiles.

   For now, I changed a private copy of the code to only report ignored
data, then I manually remove those features from the XML file before upload.

   So, for anyone else seeing this error - not all the data has been
extracted!
 





More information about the Imports mailing list