[gdal-dev] ERROR 1: In file cpl_vsil_gzip.cpp, at line 905, return 0

Martin Landa landa.martin at gmail.com
Mon Jul 23 13:46:26 PDT 2018


Hi,

I have problem with reading some files provided by Czech State
Administration of Land Surveying and Cadastre in VFR format (supported
by GML driver). Some files seems to be incorrectly compressed.

Scanning layers seems to be OK:

$ ogrinfo -ro /vsicurl/http://vdp.cuzk.cz/vymenny_format/soucasna/20180630_OB_554464_UKSH.xml.gz
...
INFO: Open of `/vsicurl/http://vdp.cuzk.cz/vymenny_format/soucasna/20180630_OB_554464_UKSH.xml.gz'
      using driver `GML' successful.
1: Obce (Multi Point, Multi Polygon, Multi Polygon)
2: SpravniObvody (Point, Multi Polygon)
3: Mop (Point, Multi Polygon)
4: Momc (Point, Multi Polygon)
5: CastiObci (Point)
6: KatastralniUzemi (Multi Point, Multi Polygon, Multi Polygon)
7: Zsj (Multi Point, Multi Polygon)
8: Ulice (Multi Line String)
9: Parcely (Point, Polygon, Multi Polygon)
10: StavebniObjekty (Point, Multi Polygon, Multi Polygon)
11: AdresniMista (Point, Point, Point)

BUT reading features (GetNextFeature/GetFeature) fails:

$ ogrinfo -ro /vsicurl/http://vdp.cuzk.cz/vymenny_format/soucasna/20180630_OB_554464_UKSH.xml.gz
StavebniObjekty
...
INFO: Open of `/vsicurl/http://vdp.cuzk.cz/vymenny_format/soucasna/20180630_OB_554464_UKSH.xml.gz'
      using driver `GML' successful.
Layer name: StavebniObjekty
Geometry (DefinicniBod): Point
Geometry (OriginalniHranice): Multi Polygon
Geometry (OriginalniHraniceOmpv): Multi Polygon
ERROR 1: In file cpl_vsil_gzip.cpp, at line 905, return 0
Feature Count: 651
ERROR 1: In file cpl_vsil_gzip.cpp, at line 728, return -1
ERROR 1: In file cpl_vsil_gzip.cpp, at line 728, return -1
ERROR 1: In file cpl_vsil_gzip.cpp, at line 905, return 0
ERROR 1: In file cpl_vsil_gzip.cpp, at line 905, return 0
ERROR 1: XML parsing of GML file failed : no element found at line 1, column 0

NO features are printed. gzip says "unexpected end of file" and
refuses to extract the file. 7zip (and other programs) on Windows
reports similar error, but file is extracted. I am discussing issue
with the provider. By chance, do you have any tip how to read such
broken files by GDAL?

Thanks, Martin

-- 
Martin Landa
http://geo.fsv.cvut.cz/gwiki/Landa
http://gismentors.cz/mentors/landa


More information about the gdal-dev mailing list