<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=utf-8">
<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;
margin-bottom:.0001pt;
font-size:11.0pt;
font-family:"Calibri",sans-serif;}
a:link, span.MsoHyperlink
{mso-style-priority:99;
color:blue;
text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
{mso-style-priority:99;
color:purple;
text-decoration:underline;}
p.msonormal0, li.msonormal0, div.msonormal0
{mso-style-name:msonormal;
mso-margin-top-alt:auto;
margin-right:0cm;
mso-margin-bottom-alt:auto;
margin-left:0cm;
font-size:11.0pt;
font-family:"Calibri",sans-serif;}
span.Shkpostityyli19
{mso-style-type:personal-reply;
font-family:"Calibri",sans-serif;
color:windowtext;}
.MsoChpDefault
{mso-style-type:export-only;
font-family:"Calibri",sans-serif;
mso-fareast-language:EN-US;}
@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="blue" vlink="purple">
<div class="WordSection1">
<p class="MsoNormal"><span style="mso-fareast-language:EN-US">Hi,<o:p></o:p></span></p>
<p class="MsoNormal"><span style="mso-fareast-language:EN-US"><o:p> </o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="mso-fareast-language:EN-US">Please answer with “reply-all” so your mails go also back to the list.<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="mso-fareast-language:EN-US"><o:p> </o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="mso-fareast-language:EN-US">GDAL has two drivers for KML<o:p></o:p></span></p>
<p class="MsoNormal"><a href="https://gdal.org/drivers/vector/kml.html"><span lang="EN-US">https://gdal.org/drivers/vector/kml.html</span></a><o:p></o:p></p>
<p class="MsoNormal"><span lang="SV" style="mso-fareast-language:EN-US"><a href="https://gdal.org/drivers/vector/libkml.html#vector-libkml"><span lang="FI">https://gdal.org/drivers/vector/libkml.html#vector-libkml</span></a></span><span style="mso-fareast-language:EN-US"><o:p></o:p></span></p>
<p class="MsoNormal"><span style="mso-fareast-language:EN-US"><o:p> </o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="mso-fareast-language:EN-US">KML driver finds only one layer from your data<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="mso-fareast-language:EN-US">ogrinfo --config gdal_skip libkml testcase.kml<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="mso-fareast-language:EN-US">INFO: Open of `testcase.kml'<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="mso-fareast-language:EN-US"> using driver `KML' successful.<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="mso-fareast-language:EN-US">1: Stuttgart-Schweiz (3D Line String)<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="mso-fareast-language:EN-US"><o:p> </o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="mso-fareast-language:EN-US">LIBKML driver finds 4 layers<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="mso-fareast-language:EN-US"><o:p> </o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="mso-fareast-language:EN-US">ogrinfo testcase.kml<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="mso-fareast-language:EN-US">INFO: Open of `testcase.kml'<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="mso-fareast-language:EN-US"> using driver `LIBKML' successful.<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="mso-fareast-language:EN-US">1: Tempor</span><span lang="EN-US" style="font-family:"Arial",sans-serif;mso-fareast-language:EN-US">├</span><span lang="EN-US" style="mso-fareast-language:EN-US">ñ</span><span lang="EN-US" style="mso-fareast-language:EN-US">re
Orte<o:p></o:p></span></p>
<p class="MsoNormal"><span style="mso-fareast-language:EN-US">2: Stuttgart-Schweiz<o:p></o:p></span></p>
<p class="MsoNormal"><span style="mso-fareast-language:EN-US">3: GPS device<o:p></o:p></span></p>
<p class="MsoNormal"><span style="mso-fareast-language:EN-US">4: Tracks<o:p></o:p></span></p>
<p class="MsoNormal"><span style="mso-fareast-language:EN-US"><o:p> </o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="mso-fareast-language:EN-US">Layers 1 and 3 do not contain data but layers 2 and 4 do.<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="mso-fareast-language:EN-US"><o:p> </o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="mso-fareast-language:EN-US">It seems that you are using GDAL which either does not have LIBKML driver or it appears in the list of formats after KML. Check the drivers with command ogrinfo --formats. If you don’t
have LIBKML you must get such GDAL build that has the driver. If you have both KML and LIBKML in that order, you must skip the KML driver with config option --config GDAL_SKIP KML.<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="mso-fareast-language:EN-US"><o:p> </o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="mso-fareast-language:EN-US">-Jukka Rahkonen-<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="mso-fareast-language:EN-US"><o:p> </o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="mso-fareast-language:EN-US"><o:p> </o:p></span></p>
<p class="MsoNormal"><b>Lähettäjä:</b> Manuel H. <manuelhewitt@gmail.com> <br>
<b>Lähetetty:</b> lauantai 8. helmikuuta 2020 14.50<br>
<b>Vastaanottaja:</b> Rahkonen Jukka (MML) <jukka.rahkonen@maanmittauslaitos.fi><br>
<b>Aihe:</b> Re: [gdal-dev] ogr2ogr ignoring tracks, only converting paths<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<div>
<p class="MsoNormal">Test data with a track and a path. After simplification only the path is left:
<a href="https://filebin.net/xp0qi0cfm4bs08cw">https://filebin.net/xp0qi0cfm4bs08cw</a><o:p></o:p></p>
<div>
<p class="MsoNormal"><o:p> </o:p></p>
</div>
<div>
<p class="MsoNormal">The newer tracks I should have as GPX tracks, but likely not the old ones. I surely could simplify new ones before adding them to Google Earth, but I was looking for a way to simplify all the old data as easily as possible. I wanted to
prevent having to export each track manually and then run it through a program before piecing it back together. My KML is over 80MB.<o:p></o:p></p>
</div>
</div>
<p class="MsoNormal"><o:p> </o:p></p>
<div>
<div>
<p class="MsoNormal">Am Sa., 8. Feb. 2020 um 13:34 Uhr schrieb jratike80 <<a href="mailto:jukka.rahkonen@maanmittauslaitos.fi">jukka.rahkonen@maanmittauslaitos.fi</a>>:<o:p></o:p></p>
</div>
<blockquote style="border:none;border-left:solid #CCCCCC 1.0pt;padding:0cm 0cm 0cm 6.0pt;margin-left:4.8pt;margin-right:0cm">
<p class="MsoNormal">Hi,<br>
<br>
Could you provide some test data? If data area GPS logs, do you happen to<br>
have they also in GPX format that might have better support in GDAL and for<br>
example gpsbabel program?<br>
<br>
-Jukka Rahkonen-<br>
<br>
<br>
Manuel H. wrote<br>
> Hi,<br>
> <br>
> I was attempting to simplify my Google Earth KML file and found ogr2ogr<br>
> mentioned on the internet.<br>
> When I run it through the program, ogr2ogr seems to ignore everything that<br>
> is a "Track" according to Google Earth. Only entries that are a "Path" are<br>
> converted. They are all GPS logs I collected over many years with<br>
> different<br>
> devices. Most modern tracks have been collected with smartphones and they<br>
> are all ignored.<br>
> <br>
> Is there an easy way to prevent or circumvent this?<br>
> <br>
> Also, ogr2ogr flattens my KML by removing all folders and the general<br>
> hierarchy. This is annoying, but I could deal with it if I convert folders<br>
> separately.<br>
> <br>
> BG,<br>
> <br>
> Manuel<br>
> <br>
> _______________________________________________<br>
> gdal-dev mailing list<br>
<br>
> <a href="mailto:gdal-dev@.osgeo">gdal-dev@.osgeo</a><br>
<br>
> <a href="https://lists.osgeo.org/mailman/listinfo/gdal-dev" target="_blank">https://lists.osgeo.org/mailman/listinfo/gdal-dev</a><br>
<br>
<br>
<br>
<br>
<br>
--<br>
Sent from: <a href="http://osgeo-org.1560.x6.nabble.com/GDAL-Dev-f3742093.html" target="_blank">
http://osgeo-org.1560.x6.nabble.com/GDAL-Dev-f3742093.html</a><br>
_______________________________________________<br>
gdal-dev mailing list<br>
<a href="mailto:gdal-dev@lists.osgeo.org" target="_blank">gdal-dev@lists.osgeo.org</a><br>
<a href="https://lists.osgeo.org/mailman/listinfo/gdal-dev" target="_blank">https://lists.osgeo.org/mailman/listinfo/gdal-dev</a><o:p></o:p></p>
</blockquote>
</div>
</div>
</body>
</html>