[gdal-dev] GDAL does not find geometries from KML

Rahkonen Jukka (MML) jukka.rahkonen at maanmittauslaitos.fi
Tue Oct 19 06:22:13 PDT 2021


Hi,

I found what is the problem. The service is sending old style KML, the current specification has this note:

Note: The <GeometryCollection> tag has been deprecated. Use <MultiGeometry> instead.

Search-replace made GDAL to find the missing  geometries.

-Jukka Rahkonen-

Lähettäjä: Rahkonen Jukka (MML)
Lähetetty: tiistai 19. lokakuuta 2021 15.53
Vastaanottaja: 'gdal-dev at lists.osgeo.org' <gdal-dev at lists.osgeo.org>
Aihe: GDAL does not find geometries from KML

Hi,

I tried to convert geometries from a KML file captured with URL https://www.sedecatastro.gob.es/cartografia/fxcc/fxcc_kml.aspx?refcat=0717611VK4701F

Ogrinfo finds layers
INFO: Open of `0717611VK4701F.kml'
      using driver `LIBKML' successful.
1: 0717611VK4701F
2: PLANTA GENERAL
3: PLANTA BAJA 00

Ogrinfo finds also a POINT Z geometry from layer 0717611VK4701F. By looking at the KML file with a text editor layers PLANTA GENERAL and PLANTA BAJA 00 both contain one GeometryCollection which is made out of one or several POLYGON Z geometries. However, ogrinfo does not find those geometries. The KML file opens with Google Earth and shows a 3D model of a building. Is there perhaps something special in the structure of this KML?

-Jukka Rahkonen-
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/gdal-dev/attachments/20211019/464db213/attachment.html>


More information about the gdal-dev mailing list