Import/Export GPX and KML (possibly also XML)

110 views
Skip to first unread message

Dean

unread,
Apr 26, 2011, 10:54:40 PM4/26/11
to Google Maps JavaScript API v3
Hi,

I'm looking for the code to import and export between GPX and KML and
possibly also XML as we're currently working with XML instead of KML.
I've looked all over, but can't find any references to it. There's
one post in this group, but it doesn't have any code as far as I can
see.

I really need help on this as we're quite stuck.

Cheers in advance.

Dean

Rossko

unread,
Apr 27, 2011, 4:30:47 AM4/27/11
to Google Maps JavaScript API v3
> I'm looking for the code to import and export between GPX and KML

What environmennt will you be doing that in?
Have you looked at any of these?
http://www.google.com/search?q=convert+gpx+to+kml

> possibly also XML as we're currently working with XML instead of KML.

KML is just a dialect of XML, is any conversion needed?

John M Phillips

unread,
Apr 27, 2011, 6:45:12 PM4/27/11
to Google Maps JavaScript API v3
The google maps client side scripts deal in KML files or in specific
objects, so I am assuming that you want to convert either on a server
side application or to statically convert files. In these two cases I
strongly recommend gpsbabel. In its command line form it could be
executed from a cgi script. The output can be re-directed via stdout
to a pipe.

John Phillips

Dean

unread,
Apr 28, 2011, 3:21:19 AM4/28/11
to Google Maps JavaScript API v3
Hey Rossko and John P,

We'll be doing it in JSF. The idea is to have a user load the GPX
file and have it converted to KML or XML. We're using straight XML as
we've run into issues with KML. Or, we can also somehow parse the GPX
file and send it to a text string for Fusion Tables to use. We'll be
doing all of this on the server.

GPSBabel sounds like a possible solution is we can do it server side.
Is it freeware? I'm assuming that if my site turns commercial, then
I'll need to pay them?

Cheers

Dean

John M Phillips

unread,
Apr 29, 2011, 7:25:48 AM4/29/11
to Google Maps JavaScript API v3
GpsBabel is an open-source project and free to download. Their web
site http://www.gpsbabel.org/ does accept $15 or $25 donations.

John
Reply all
Reply to author
Forward
0 new messages