[gdal-dev] Unable to read in GML file via OGRINFO / OGR2OGR (attempt 2)

Jelmer Baas baas at speerit.nl
Sun Jul 17 22:53:20 PDT 2016


Hello,

My apologies for posting this to the mailinglist instead of creating a ticket; I don't have neither an account nor a 'mantra' to create one. Also: this is my second email; the first one got stuck in moderation because of the 200KB attachment.

I'm trying to read-in GML dump files created by the Dutch government for something called 'BGT': https://www.pdok.nl/nl/producten/pdok-downloads/download-basisregistratie-grootschalige-topografie

Most files work OK, but some crash with errors like this:
ERROR 1: Did not get at least 3 values or invalid number of
set of coordinates <gml:posList>208571.109 471975.820 208566.817 471979.832 208563.393 471983.993 208560.647 471988.047 208559.061 471992.578 208558.491 471995.522 208560.093
471998.215 208561.266 472000.859 208562.744 472002.305 208569.013 472004.931 208579.753 472008.430 208604.055 472016.825 208612.004 472019.497 208624.655 472024.144 208635.529
 472028.072 208648.497 472032.266 208662.090 472037.073 208677.664 472042.323 208693.844 472047.788 208708.362 472053.101 208723.717 472058.277 208739.036 472063.579 208749.17
9 472067.218 208768.026 472073.756 208784.226 472079.411 208807.632 472087.496 208824.624 472093.225 208846.511 472100.642 208867.095 472107.655 208888.151 472114.912 208909.5
80 472122.717 208927.368 472129.470 208947.175 472137.865 208964.831 472146.035 208985.138 472155.696 208997.877 472161.397 209003.819 472164.163 209007.933 472165.992 209012.
133 472167.200 209015.477 472168.023 209018.800 472168.782 209020.224 472169.028 209026.980 472171.610 209033.017 472173.880 209039.922 472176.630 209044.744 472178.919</gml:posList>

I've tried adding -dim 2 to ogr2ogr, but that doesn't seem to work. Is there any way to force ogr to treat these objects as 2D? Forcing object type isn't possible, unfortunately, since the GML file contains mixed types (linestrings, polygons, even curved polygons).

I can provide a 200KB testfile if that helps.

Regards,
Jelmer Baas



More information about the gdal-dev mailing list