Free KML to GPX Converter (KML2GPX.exe)

18,364 views
Skip to first unread message

DerekRosen

unread,
Sep 6, 2005, 8:55:22 PM9/6/05
to KML Discussions
Here is my free utility to convert KML to GPX.

It is freeware and comes without any guarantee or support. It works for me and you are welcome to use it and share it.

The source code is included (I slapped it together quickly and crudely, so don't judge my code).

You are free to report bugs, but I make no promises...

I hope it works for you,

Derek Rosen
Phoenix, AZ

P.S. There where various postings on this topic, so I started a new one so as not to have to upload it many times.


=== UPDATE 09/10/05 ===
This link includes version 1.2
Fixed limitation / bug reported by cybarber on 09/10/05
101188-KML2GPX.zip

jayhasbi

unread,
Sep 7, 2005, 5:04:33 AM9/7/05
to KML Discussions
Wonderful. I have tried it and conversion of my kmls came out clean and easily imported into GIS app. Thanks a lot Derek.

DerekRosen

unread,
Sep 7, 2005, 10:39:48 AM9/7/05
to KML Discussions
You are welcome.

I did find some difficulty importing the gpx files into Garmin’s MapSource. MapSource is very picky and will not open the more complex gpx files. It is probably the sort order of the XML nodes.

I plan to fix this soon, but there is a work around for now. Open the gpx file in EasyGps (http://EasyGps.com/) and just save it. This corrects the formatting. EasyGps is good and free.

DerekRosen

unread,
Sep 7, 2005, 11:20:57 PM9/7/05
to KML Discussions
New version 1.1

Fixed bug where formatting was not valid for Garmin MapSource or other products that perform strict schema validation.

Derek Rosen

=== UPDATE 09/10/05 ===
Version 1.2 available from main post

DerekRosen

unread,
Sep 9, 2005, 6:22:28 PM9/9/05
to KML Discussions
This is strictly not related to the KML discussion, but relevant to anyone importing GPX files that have short / meaningless names but good descriptions.

This free utility simply swaps the <name> tags with <desc> tags allowing you to easily import into GE.

Enjoy,

Derek Rosen
105811-GPXSwap.zip

cybarber

unread,
Sep 10, 2005, 7:39:03 AM9/10/05
to KML Discussions
Hi Derek,

Guess you have to get back to the drawing table.
Below is what I got:

<?xml version="1.0" encoding="ISO-8859-1" standalone="yes"?>
<gpx
version="1.1"
creator="KML2GPX"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns="http://www.topografix.com/GPX/1/1"
xsi:schemaLocation="http://www.topografix.com/GPX/1/1 http://www.topografix.com/GPX/1/1/gpx.xsd">
<metadata>
<name>Cybarber trail</name>
<desc>Cybarber trail</desc>
<link href="http://www.garmin.com">
<text>Garmin International</text>
</link>
</metadata>
<wpt lat="50.81595" lon="1relativeToGround5.89003">
<name>wylre 002.JPG</name>
</wpt>


It seems your proggie puts all child elements content of the Point element into one:

<Point>
<extrude>1</extrude>
<altitudeMode>relativeToGround</altitudeMode>
<coordinates>5.89003,50.81595,0</coordinates>
</Point>


Good luck,

Cybarber

DerekRosen

unread,
Sep 10, 2005, 3:49:57 PM9/10/05
to KML Discussions
I put the program together very quickly and took many sort-cut. I did not intend to cover all possibilities. The utility was intended for my needs, I’m just sharing it with others…

I don’t use that “relativeToGround” stuff, but when I have time, I will either patch the code or do it the correct way (select the <coordinates> sub-node).

Derek Rosen

DerekRosen

unread,
Sep 10, 2005, 8:15:49 PM9/10/05
to KML Discussions
See main post for update and version 1.2.

Derek Rosen

Sirous_Nekooei

unread,
Sep 15, 2005, 4:14:59 PM9/15/05
to KML Discussions
Sound good, but it wont work on my computer. I tried it on a few other computers (all with XP) and it didn't work. When I click on the exe file, an error message appears. A picture of the meesage is in the attachment.

I hope you can fix it.

rgds,
Sirous
113221-error.zip

DerekRosen

unread,
Sep 16, 2005, 11:33:16 AM9/16/05
to KML Discussions
I'm not sure why it is not working for you.

It does require the Microsoft .NET framework, but this should already be part of Windows XP. You can always check that you have it and / or install it from Microsoft.

The following link tells you how to check that it is installed and how to install it if not:
.net framework


Is anyone else having this problem?


Derek

Sirous_Nekooei

unread,
Sep 16, 2005, 1:37:07 PM9/16/05
to KML Discussions
Quote:

It does require the Microsoft .NET framework, but this should already be part of Windows XP. You can always check that you have it and / or install it from Microsoft.





Apparently, I don't have it. Can I install it from the XP CD that I first installed Windows?

Sirous

DerekRosen

unread,
Sep 16, 2005, 3:23:44 PM9/16/05
to KML Discussions
I'm not sure, but I don't think the latest version would be on an old XP CD. The fact that it did not automatically install indicates to me that it probably does not have it.

I recommend downloading it from Microsoft. It is about 24MB.

Download .NET Framework


Derek

Sirous_Nekooei

unread,
Sep 17, 2005, 3:36:36 PM9/17/05
to KML Discussions
Thanks,
You may also want to see This post.

Sirous

brbell01

unread,
Mar 21, 2007, 10:56:48 AM3/21/07
to KML Discussions
Im sorry this is a silly question but where do I download this program??
Bruce

tekgergedan

unread,
Mar 22, 2007, 6:08:48 PM3/22/07
to KML Discussions
Hi

By clicking on "View in Google Earth". It is a zipped file and you will need either winzip or winrar installed.

summer

unread,
Jul 9, 2012, 9:47:04 AM7/9/12
to kml-support-g...@googlegroups.com
You can also convert KML to GPX files with this free online tool http://kml2gpx.com/
Reply all
Reply to author
Forward
0 new messages