On vendredi 29 septembre 2017 12:59:04 CEST Even Rouault wrote:
> 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-o
> > g
> > 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.

By the way, I've just changed this odd behaviour of ogrinfo in trunk. It really 
does not make 
sense to try opening in update mode in most cases, unless -sql is used. So by 
default, now, 
unless -sql without -ro is used, ogrinfo will open in read-only mode.


-- 
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