Author Topic: GPX Editor  (Read 5618 times)

GPX Editor
« on: 15 June, 2008, 06:39:43 pm »
Is there anything out there which is useful for editing GPX files?  My Active 10 seems to produce pretty huge files, the one from the Zombocalypse had 8000+ points.  It had crashed, and got very confused bits of tracking in places, and I wanted to split the track up, so an Editor would have been useful.  I've used Bikely for minor editing tasks, but it has no capability to split routes, and deleting 4000 points (which I needed to do) would have taken rather a long time!

In the end I just used a text editor to make the major edits (ie cut the ride up by date and time), and then used Bikely to remove and tidy up the bits where the GPS lock had gone bonkers (normally when turned on and too few satellites meant a poor initial lock).

I guess an editor based around Google Maps would be ideal, but I haven't managed to find anything.  If all else fails I can write one myself, but I'd rather not have to learn Javascript (properly!) just to do this.
Actually, it is rocket science.
 

Maladict

Re: GPX Editor
« Reply #1 on: 15 June, 2008, 06:41:40 pm »
GPS Utility.

You can view tracks and split/join them, and delete large selections of points that can be selected - though this is more like a text editor view and it won't show 'em on a map.  But you can view the track just on a plain background.

bikenerd

Re: GPX Editor
« Reply #2 on: 18 June, 2008, 12:45:34 pm »
Tim: I've written GPX / GPS utilities in Python.  As the file formats are just XML, you can use the minidom module to read in the XML.  If I wanted to do what you do, I'd write a program to read in the GPX XML, then remove points based on distance and angular change from the previous point , then write out the revised XML.
Shouldn't take more than an evening! :thumbsup:

Re: GPX Editor
« Reply #3 on: 18 June, 2008, 12:50:39 pm »
I think minimising points, which would be useful, but not essential, can be done with GPS Babel.  The main problem I've had is with editing out nonsense from the file (ie where the GPS lock has gone AWOL briefly), Bikely just doesn't seem to be happy with thousands of data points, and weird stuff can happen.  GPS Utility can edit stuff, but without any underlying mapping, it's hard to put the route back correctly.  I think I may have to write myself a Google Maps based app to do this.  It could be fun!
Actually, it is rocket science.
 

RogerT

  • Playing with a big steamy thing
Re: GPX Editor
« Reply #4 on: 18 June, 2008, 12:55:02 pm »
I think minimising points, which would be useful, but not essential, can be done with GPS Babel.  The main problem I've had is with editing out nonsense from the file (ie where the GPS lock has gone AWOL briefly), Bikely just doesn't seem to be happy with thousands of data points, and weird stuff can happen.  GPS Utility can edit stuff, but without any underlying mapping, it's hard to put the route back correctly.  I think I may have to write myself a Google Maps based app to do this.  It could be fun!

I would suggest that when you do write your google maps editor you could sell it and retire on the proceeds !!!

Re: GPX Editor
« Reply #5 on: 18 June, 2008, 12:58:26 pm »
I doubt it, being me it'll be a hack which does exactly what I want, and doesn't support anything else! ;D
Actually, it is rocket science.
 

David Martin

  • Thats Dr Oi You thankyouverymuch
Re: GPX Editor
« Reply #6 on: 30 June, 2008, 08:20:44 pm »
When you do write it, please let me know where it is.

I have been doing the Bikely -> GPX -> wordpad ->bikely round trip.. Bikely is very slow with many thousands of data points.

Should really hack something together in Perl/Python/Java but ICBA right now.

However, I have just installed trekbuddy on my phone so will be looking to do a Bikely->GPX and Google Maps ->atlas thing to generate files to install on the phone. A utility that could generate the relevant files for a long route (split into XXX Mb chunks for individual M2 cards) would be really useful.

..d
"By creating we think. By living we learn" - Patrick Geddes

Re: GPX Editor
« Reply #7 on: 30 June, 2008, 08:23:11 pm »
vi

IGMC

David Martin

  • Thats Dr Oi You thankyouverymuch
Re: GPX Editor
« Reply #8 on: 30 June, 2008, 08:31:06 pm »
Actually, a java thingy might work quite well. It could then make it possible to select a block of points and delete them, then use the route following part of bikely (or whichever API it uses) to get a new set of points between the points where things were deleted.

These are the things I'd really like to have in Bikely:
select two points and delete all points between.
select two points and recalculate route between them.
Split a route into tiled routes of X miles with a Y mile overlap.

Bikelys point by point approach really doesn't work too well with big routes.

None of these should be terribly hard to do.

..d
"By creating we think. By living we learn" - Patrick Geddes

Re: GPX Editor
« Reply #9 on: 30 June, 2008, 08:49:02 pm »
Actually, a java thingy might work quite well. It could then make it possible to select a block of points and delete them, then use the route following part of bikely (or whichever API it uses) to get a new set of points between the points where things were deleted.

These are the things I'd really like to have in Bikely:
select two points and delete all points between.
select two points and recalculate route between them.
Split a route into tiled routes of X miles with a Y mile overlap.

Bikelys point by point approach really doesn't work too well with big routes.

www.bikehike.co.uk

It allows you to drag routes around which handles the first two of your requirements.

It takes a bit of getting used to (especially when you start to play with the Drag Edit Mode) but it is a bit of an improvement on bikely (which I still think is damn good in its own right).

(The first time you drag a point around in Drag Edit mode it may screw up your entire route, but once you drag the route out to use the appropriate roads it works well).
"Yes please" said Squirrel "biscuits are our favourite things."

David Martin

  • Thats Dr Oi You thankyouverymuch
Re: GPX Editor
« Reply #10 on: 30 June, 2008, 08:52:39 pm »
Actually, a java thingy might work quite well. It could then make it possible to select a block of points and delete them, then use the route following part of bikely (or whichever API it uses) to get a new set of points between the points where things were deleted.

These are the things I'd really like to have in Bikely:
select two points and delete all points between.
select two points and recalculate route between them.
Split a route into tiled routes of X miles with a Y mile overlap.

Bikelys point by point approach really doesn't work too well with big routes.

www.bikehike.co.uk

It allows you to drag routes around which handles the first two of your requirements.

It takes a bit of getting used to (especially when you start to play with the Drag Edit Mode) but it is a bit of an improvement on bikely (which I still think is damn good in its own right).

(The first time you drag a point around in Drag Edit mode it may screw up your entire route, but once you drag the route out to use the appropriate roads it works well).

Cool. And the third is easily done with a script (if I can remember how to convert lat/long to distance.)

..d
"By creating we think. By living we learn" - Patrick Geddes

Re: GPX Editor
« Reply #11 on: 30 June, 2008, 09:19:47 pm »
Cool. And the third is easily done with a script (if I can remember how to convert lat/long to distance.)

I used this from: Calculate distance and bearing between two Latitude/Longitude points using Haversine formula in JavaScript

Haversine formula:-

R = earth’s radius (mean radius = 6,371km)
Δlat = lat2− lat1
Δlong = long2− long1
a = sin²(Δlat/2) + cos(lat1).cos(lat2).sin²(Δlong/2)
c = 2.atan2(√a, √(1−a))
d = R.c

(Note that angles need to be in radians to pass to trig functions).
"Yes please" said Squirrel "biscuits are our favourite things."

David Martin

  • Thats Dr Oi You thankyouverymuch
Re: GPX Editor
« Reply #12 on: 01 July, 2008, 01:03:58 am »
hmm.. bikehike seem to take a long time to get elevation data and won't save a route without it.

..d
"By creating we think. By living we learn" - Patrick Geddes

Re: GPX Editor
« Reply #13 on: 21 July, 2008, 10:40:23 pm »
I hve just bought a Satmap and I m enjoying it, apart from the known limitations.

You can edit on screen...

On the routes menu, convert trail to track, and then edit - you can change the track points, delete or move using the joystick,