On vendredi 29 septembre 2017 07:34:27 CEST Rahkonen Jukka (MML) wrote:
> Hi,
> 
> See
> https://gis.stackexchange.com/questions/256861/kml-to-shapefile-problems-og
> r2ogr
> 
> I have verified with todays GDAL 2.3.0dev  from gisinternals that ogrinfos
> open the KML file form that question with LIBKML driver while ogr2ogr opens
> it with GML driver and fails.

Fixed per https://trac.osgeo.org/gdal/ticket/7061

The reason of the difference of behaviour is that if you do "ogrinfo a.kml", 
ogrinfo tries to 
open in read-update mode, and only the LIBKML supports it, so the GML driver 
(which is 
registered, and thus tried, before the LIBML) will be skipped

When you do "ogr2ogr out in.kml", the input file is opened in read-only mode, 
so the GML 
driver tried to open it and seeing a
xmlns:gml="http://www.opengis.net/gml"; (useless in that context) declaration 
thought that 
it should open it.

Even

-- 
Spatialys - Geospatial professional services
http://www.spatialys.com
_______________________________________________
gdal-dev mailing list
[email protected]
https://lists.osgeo.org/mailman/listinfo/gdal-dev

Reply via email to