[gdal-dev] KML recognized as GML by ogr2ogr
Even Rouault
even.rouault at spatialys.com
Fri Sep 29 03:59:04 PDT 2017
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
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/gdal-dev/attachments/20170929/a3bbef87/attachment.html>
More information about the gdal-dev
mailing list