On jeudi 6 avril 2017 04:25:37 CEST [email protected] wrote: > Hello, > > We’re using the gdal ogr csharp library to read kmz files (such as the > attached file), using the libkml driver. The code used to open the file: > > OSGeo.OGR.Ogr.RegisterAll(); > OSGeo.OGR.Ogr.Open(/*path to file*/, 0); > > When trying to open the file, I get an error: Error parsing kml Style: No > id. When using other methods to open the file such as ogrinfo and ogr2ogr) > the same error is shown, but I can still read data from the file. When > opening the file in Google earth, the error is just ignored and my file is > displayed correctly. So I would expect the same to be possible when using > the csharp library. I tried using the Ogr.DonUseExceptions method, but this > also doesn’t help. > > A style not having an ID isn’t very logical as it can’t be used. However, I > wouldn’t expect it to not do anything with the file. We receive files from > our clients and then read information from the files so it’s impossible to > check all files for these kind of errors and then fix them, especially when > they generate large files. > > Is there possibly a flag I can set to ignore style errors? Or is there > another workaround for this? If no, is it possible to implement such a > feature?
No workaround that I can think of, apart from applying the fix I've just done in https:// trac.osgeo.org/gdal/ticket/6850 Even -- Spatialys - Geospatial professional services http://www.spatialys.com
_______________________________________________ gdal-dev mailing list [email protected] https://lists.osgeo.org/mailman/listinfo/gdal-dev
