<html xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns:m="http://schemas.microsoft.com/office/2004/12/omml" xmlns="http://www.w3.org/TR/REC-html40">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<meta name="Generator" content="Microsoft Word 15 (filtered medium)">
<style><!--
/* Font Definitions */
@font-face
{font-family:"Cambria Math";
panose-1:2 4 5 3 5 4 6 3 2 4;}
@font-face
{font-family:Calibri;
panose-1:2 15 5 2 2 2 4 3 2 4;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
{margin:0cm;
font-size:11.0pt;
font-family:"Calibri",sans-serif;
mso-fareast-language:EN-US;}
a:link, span.MsoHyperlink
{mso-style-priority:99;
color:#0563C1;
text-decoration:underline;}
span.Shkpostityyli19
{mso-style-type:personal-reply;
font-family:"Calibri",sans-serif;
color:windowtext;}
.MsoChpDefault
{mso-style-type:export-only;
font-size:10.0pt;}
@page WordSection1
{size:612.0pt 792.0pt;
margin:70.85pt 2.0cm 70.85pt 2.0cm;}
div.WordSection1
{page:WordSection1;}
--></style><!--[if gte mso 9]><xml>
<o:shapedefaults v:ext="edit" spidmax="1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
<o:shapelayout v:ext="edit">
<o:idmap v:ext="edit" data="1" />
</o:shapelayout></xml><![endif]-->
</head>
<body lang="FI" link="#0563C1" vlink="#954F72" style="word-wrap:break-word">
<div class="WordSection1">
<p class="MsoNormal">Hi,<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal"><span lang="EN-US">I found what is the problem. The service is sending old style KML, the current specification has this note:<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US"><o:p> </o:p></span></p>
<p class="MsoNormal"><span lang="EN-US">Note: The <GeometryCollection> tag has been deprecated. Use <MultiGeometry> instead.<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US"><o:p> </o:p></span></p>
<p class="MsoNormal"><span lang="EN-US">Search-replace made GDAL to find the missing geometries.<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US"><o:p> </o:p></span></p>
<p class="MsoNormal"><span lang="EN-US">-Jukka Rahkonen-<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US"><o:p> </o:p></span></p>
<div>
<div style="border:none;border-top:solid #E1E1E1 1.0pt;padding:3.0pt 0cm 0cm 0cm">
<p class="MsoNormal"><b><span style="mso-fareast-language:FI">Lähettäjä:</span></b><span style="mso-fareast-language:FI"> Rahkonen Jukka (MML)
<br>
<b>Lähetetty:</b> tiistai 19. lokakuuta 2021 15.53<br>
<b>Vastaanottaja:</b> 'gdal-dev@lists.osgeo.org' <gdal-dev@lists.osgeo.org><br>
<b>Aihe:</b> GDAL does not find geometries from KML<o:p></o:p></span></p>
</div>
</div>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">Hi,<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal"><span lang="EN-US">I tried to convert geometries from a KML file captured with URL
</span><a href="https://www.sedecatastro.gob.es/cartografia/fxcc/fxcc_kml.aspx?refcat=0717611VK4701F"><span lang="EN-US">https://www.sedecatastro.gob.es/cartografia/fxcc/fxcc_kml.aspx?refcat=0717611VK4701F</span></a>
<span lang="EN-US"><o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US"><o:p> </o:p></span></p>
<p class="MsoNormal"><span lang="EN-US">Ogrinfo finds layers<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US">INFO: Open of `0717611VK4701F.kml'<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US"> using driver `LIBKML' successful.<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="SV">1: 0717611VK4701F<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="SV">2: PLANTA GENERAL<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="SV">3: PLANTA BAJA 00<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="SV"><o:p> </o:p></span></p>
<p class="MsoNormal"><span lang="EN-US">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?<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US"><o:p> </o:p></span></p>
<p class="MsoNormal"><span lang="EN-US">-Jukka Rahkonen-<o:p></o:p></span></p>
</div>
</body>
</html>