Wednesday, April 5, 2017

Converting a Google Earth Path to a GPX Route

There are occasions in navigation when we might want to make a route starting with Google Earth (GE).  This can occur when there is poor charting of an area, but good satellite images, or in more common cases of just wanting to take advantage of the slick display GE offers to layout a route, and then do the fine tuning relative to charted aids on an actual chart.

When doing the latter, one thing we learned to be aware of is GE images do not specify tide height!  We have made a few practice routes in and around small islands, only to learn after the routes were imported to a navigation program and viewed on real charts, that in fact the tide was high when the image was taken, so we were actually laying out a route over a foreshore.  Looked like perfectly good water in the satellite image.

The procedure described here is making and saving a path using GE, and then applying a simple conversion to put this into standard GPS Exchange format (GPX), which is a file type that all navigation programs can read and interpret.

We have discussed this in earlier posts, listed below, but our new system is better documented and now employs a conversion service of our own that is as direct as possible.  The process is described in this video:


The converter is located at this page

Starpath KML to GPX converter (www.starpath.com/gpx), 

which repeats the instructions.

________________

Earlier related notes include:

Route Planning and Sharing with GPX Files

How to make current stations into waypoints in a batch process

The GPX standard is described here: GPX 1.1 Schema Documentation

An online service that does several types of conversions is GPS Visualizer

Here are what these files look like.  They are xml format. They are readable in a text viewer.

A KML file:
<?xml version="1.0" encoding="UTF-8"?>
<kml xmlns="http://www.opengis.net/kml/2.2" xmlns:gx="http://www.google.com/kml/ext/2.2" xmlns:kml="http://www.opengis.net/kml/2.2" xmlns:atom="http://www.w3.org/2005/Atom">
<Document>
<name>Baha-test-route.kml</name>
<StyleMap id="inline">
<Pair>
<key>normal</key>
<styleUrl>#inline0</styleUrl>
</Pair>
<Pair>
<key>highlight</key>
<styleUrl>#inline1</styleUrl>
</Pair>
</StyleMap>
<Style id="inline0">
<LineStyle>
<color>ff0000ff</color>
<width>2</width>
</LineStyle>
<PolyStyle>
<fill>0</fill>
</PolyStyle>
</Style>
<Style id="inline1">
<LineStyle>
<color>ff0000ff</color>
<width>2</width>
</LineStyle>
<PolyStyle>
<fill>0</fill>
</PolyStyle>
</Style>
<Placemark>
<name>Baha-test-route</name>
<styleUrl>#inline</styleUrl>
<LineString>
<tessellate>1</tessellate>
<coordinates>
-109.9149585549397,24.54030130162237,0 -109.7004369370675,24.16846017059697,0 -109.7511069786428,24.1101387791539,0 -109.8286141711317,24.09290849128375,0 -109.9329035588094,24.10824725446978,0 -110.0257611588921,24.29775334743895,0 -110.2115066128303,24.58804334869875,0 -110.3484830291369,24.66860558615499,0 -110.4831806473397,24.63053918262128,0 -110.4894445378171,24.48650911115754,0 -110.4181686154688,24.36026101756055,0 -110.3474312753582,24.36824754053653,0 -110.2411283328199,24.41132537504683,0
</coordinates>
</LineString>
</Placemark>
</Document>
</kml>


and a GPX file after conversion to GPX:

<?xml version="1.0"?>
<gpx xmlns="http://www.topografix.com/GPX/1/1" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.topografix.com/GPX/1/1 http://www.topografix.com/GPX/1/1/gpx.xsd" version="1.1" creator="Starpath School of Navigation - http://www.starpath.com">
<rte>
<name>Baha-test-route</name>
<rtept lat="24.54030130162237" lon="-109.9149585549397">
<name>001</name>
</rtept>
        <rtept lat="24.16846017059697" lon="-109.7004369370675">
<name>002</name>
</rtept>
        <rtept lat="24.1101387791539" lon="-109.7511069786428">
<name>003</name>
</rtept>
        <rtept lat="24.09290849128375" lon="-109.8286141711317">
<name>004</name>
</rtept>
        <rtept lat="24.10824725446978" lon="-109.9329035588094">
<name>005</name>
</rtept>
        <rtept lat="24.29775334743895" lon="-110.0257611588921">
<name>006</name>
</rtept>
        <rtept lat="24.58804334869875" lon="-110.2115066128303">
<name>007</name>
</rtept>
        <rtept lat="24.66860558615499" lon="-110.3484830291369">
<name>008</name>
</rtept>
        <rtept lat="24.63053918262128" lon="-110.4831806473397">
<name>009</name>
</rtept>
        <rtept lat="24.48650911115754" lon="-110.4894445378171">
<name>010</name>
</rtept>
        <rtept lat="24.36026101756055" lon="-110.4181686154688">
<name>011</name>
</rtept>
        <rtept lat="24.36824754053653" lon="-110.3474312753582">
<name>012</name>
</rtept>
        <rtept lat="24.41132537504683" lon="-110.2411283328199">
<name>013</name>
</rtept>
        </rte>
</gpx>




No comments:

Post a Comment