software to split GPX into 500point sections
Moderators: Bearbonesnorm, Taylor, Chew
software to split GPX into 500point sections
My Garmin inReach only has the ability for 500point tracks (rubbish I know )
One work around I thought of was to split a larger GPX into 500point sections
Route-1
Route-2
Route-3
etc
Anyone know of a program that will split a large GPX into these 500point segment?
Doing a quick google came across a few, wondering people have a preference for one.
Ta
One work around I thought of was to split a larger GPX into 500point sections
Route-1
Route-2
Route-3
etc
Anyone know of a program that will split a large GPX into these 500point segment?
Doing a quick google came across a few, wondering people have a preference for one.
Ta
Re: software to split GPX into 500point sections
Pretty sure you can do that on bikehike
Re: software to split GPX into 500point sections
You can merge tracks and reduce the number of points in BikeHike, but unsure you can split them (I could be wrong)
If you can read a bit of code, its easy enough to do manually
If you open the file in Notepad it will show you the file. It starts off with some header info around unit/name etc... The actual route will start with
<trkseg>
After that its just all of the gps points
<trkpt lat="54.336800000000004" lon="-2.57392"> <ele>158.74</ele> </trkpt>
These then repeat until you get to
</trkseg>
Then theres a bit at the end.
You can just copy the files a few times and then delete an appropriate number of gps points to get you down to the required file size
If you can read a bit of code, its easy enough to do manually
If you open the file in Notepad it will show you the file. It starts off with some header info around unit/name etc... The actual route will start with
<trkseg>
After that its just all of the gps points
<trkpt lat="54.336800000000004" lon="-2.57392"> <ele>158.74</ele> </trkpt>
These then repeat until you get to
</trkseg>
Then theres a bit at the end.
You can just copy the files a few times and then delete an appropriate number of gps points to get you down to the required file size
Re: software to split GPX into 500point sections
Bikehike will do it. Load the full track and use the cut to end and reverse route functions to trim bits off the start/end/both. Then use Trackpoint Reduction in the Options to reduce them to 500 pt segments. You'll need to save each bit out separately, and reload the full track to create the next segment. A bit of experimentation will be needed to work out what the maximum length a 500 pt track can be and still give you a usable track to follow.
- Dave Barter
- Posts: 3630
- Joined: Sun Jun 16, 2013 6:21 pm
Re: software to split GPX into 500point sections
Elite keyboard warrior, DNF'er, Swearer
Re: software to split GPX into 500point sections
downloaded and installed
not user friendly
- Dave Barter
- Posts: 3630
- Joined: Sun Jun 16, 2013 6:21 pm
Re: software to split GPX into 500point sections
It is an incredibly powerful toolkit, it will not have a "oh so you wanted to split a track into sections of 500 points" option unfortunately. But it will do almost anything you can imagine you need to do with a GPX file or other GPS data.
For those of us who know GIS it is dead straightforward. If you're still stuck just send me the file and I'll do it. I'm much more user friendly.
For those of us who know GIS it is dead straightforward. If you're still stuck just send me the file and I'll do it. I'm much more user friendly.
Elite keyboard warrior, DNF'er, Swearer
Re: software to split GPX into 500point sections
could you tell me the command line?Dave Barter wrote:It is an incredibly powerful toolkit, it will not have a "oh so you wanted to split a track into sections of 500 points" option unfortunately. But it will do almost anything you can imagine you need to do with a GPX file or other GPS data.
For those of us who know GIS it is dead straightforward. If you're still stuck just send me the file and I'll do it. I'm much more user friendly.
or perhaps split a GPX and screen capture the screen.
thanks for your help
-
- Posts: 8144
- Joined: Mon Mar 18, 2013 9:56 am
Re: software to split GPX into 500point sections
Basecamp
Load the whole track
Use the scissor tool to cut it into chunks.
Rename each one to what you want.
Load the whole track
Use the scissor tool to cut it into chunks.
Rename each one to what you want.
- Dave Barter
- Posts: 3630
- Joined: Sun Jun 16, 2013 6:21 pm
Re: software to split GPX into 500point sections
Basecamp option will not necessarily reduce points to < 500
Can you tell me whether GPX is track or route points? Do you know if it is split into track segments already? This makes a difference to the command line I will work out for you.
This will get it down to less than 500 points as one track but will simplify it
gpsbabel -i gpx -f INPUT.gpx -x simplify,count=499 -o gpx -F OUTPUT.gpx
Can you tell me whether GPX is track or route points? Do you know if it is split into track segments already? This makes a difference to the command line I will work out for you.
This will get it down to less than 500 points as one track but will simplify it
gpsbabel -i gpx -f INPUT.gpx -x simplify,count=499 -o gpx -F OUTPUT.gpx
Elite keyboard warrior, DNF'er, Swearer
Re: software to split GPX into 500point sections
the GPX is a single trackDave Barter wrote:Basecamp option will not necessarily reduce points to < 500
Can you tell me whether GPX is track or route points? Do you know if it is split into track segments already? This makes a difference to the command line I will work out for you.
This will get it down to less than 500 points as one track but will simplify it
gpsbabel -i gpx -f INPUT.gpx -x simplify,count=499 -o gpx -F OUTPUT.gpx
I wish to keep the detail, merely chop the GPX into segments of 500+N points, where N is the remainder and less than 500
- Dave Barter
- Posts: 3630
- Joined: Sun Jun 16, 2013 6:21 pm
Re: software to split GPX into 500point sections
OK brace yourself ;-)
First convert the file to CSV
gpsbabel -i gpx -f INPUT.gpx -t -o csv -F OUTPUT.gpx
Next split this CSV into N files of 500 lines each (if you are on Mac or linux you can use split)
Finally convert each file back to GPX
gpsbabel -i csv -f FILE1.csv -t -o gpx -F GPX1.gpx
Should have sent it to me ;-)
First convert the file to CSV
gpsbabel -i gpx -f INPUT.gpx -t -o csv -F OUTPUT.gpx
Next split this CSV into N files of 500 lines each (if you are on Mac or linux you can use split)
Finally convert each file back to GPX
gpsbabel -i csv -f FILE1.csv -t -o gpx -F GPX1.gpx
Should have sent it to me ;-)
Elite keyboard warrior, DNF'er, Swearer
-
- Posts: 8144
- Joined: Mon Mar 18, 2013 9:56 am
Re: software to split GPX into 500point sections
It will if you cut it at the 500th way point. You'd also have the option of splitting it somewhere convenient rather than a random point in the route.Dave Barter wrote:Basecamp option will not necessarily reduce points to < 500
Last edited by ScotRoutes on Thu Jun 08, 2017 10:38 pm, edited 1 time in total.
- Dave Barter
- Posts: 3630
- Joined: Sun Jun 16, 2013 6:21 pm
Re: software to split GPX into 500point sections
True but don't you have to maintain a count in the list box by hand? I'm not convinced it is easy.
Elite keyboard warrior, DNF'er, Swearer
Re: software to split GPX into 500point sections
Dave Barter wrote:OK brace yourself ;-)
First convert the file to CSV
gpsbabel -i gpx -f INPUT.gpx -t -o csv -F OUTPUT.gpx
Next split this CSV into N files of 500 lines each (if you are on Mac or linux you can use split)
Finally convert each file back to GPX
gpsbabel -i csv -f FILE1.csv -t -o gpx -F GPX1.gpx
Should have sent it to me ;-)
my usual way might be easier
duplicate X times in basecamp
then delete as required to have 500 points per segment
thought there must be a better way
-
- Posts: 8144
- Joined: Mon Mar 18, 2013 9:56 am
Re: software to split GPX into 500point sections
Why duplicate it X times?
Re: software to split GPX into 500point sections
xxxxx...........................ScotRoutes wrote:Why duplicate it X times?
.....xxxxx......................
..........xxxxx..................
...............xxxxx..............
duplicate because I am deleting the unneeded points
is there a more efficient way?
-
- Posts: 172
- Joined: Mon Aug 24, 2015 9:42 am
Re: software to split GPX into 500point sections
Are you not keen on the command line at all?Asposium wrote:xxxxx...........................ScotRoutes wrote:Why duplicate it X times?
.....xxxxx......................
..........xxxxx..................
...............xxxxx..............
duplicate because I am deleting the unneeded points
is there a more efficient way?
If using it is an option, we might be able to take Dave's commands and wrap them up into a script.
Then you could just type "split-gpx-track route.gpx" and it would create a bunch of files for you with no more than 500 points in.
But there's probably no milage in that if you'd rather avoid the command line entirely.
Re: software to split GPX into 500point sections
not at all, I suppose I was just hoping there would be a nice simple way.gma wrote:Are you not keen on the command line at all?Asposium wrote:xxxxx...........................ScotRoutes wrote:Why duplicate it X times?
.....xxxxx......................
..........xxxxx..................
...............xxxxx..............
duplicate because I am deleting the unneeded points
is there a more efficient way?
If using it is an option, we might be able to take Dave's commands and wrap them up into a script.
Then you could just type "split-gpx-track route.gpx" and it would create a bunch of files for you with no more than 500 points in.
But there's probably no milage in that if you'd rather avoid the command line entirely.
the command line approach will work just fine
just needs a bit more learning at the start
a lot less faff in the long run.
unless garmin remove the 500 point limitation, silly design.
-
- Posts: 8144
- Joined: Mon Mar 18, 2013 9:56 am
Re: software to split GPX into 500point sections
When you split it - using the scissor tool - the first time, you'll have a track with 500 points and another with however many are left.Asposium wrote:xxxxx...........................ScotRoutes wrote:Why duplicate it X times?
.....xxxxx......................
..........xxxxx..................
...............xxxxx..............
duplicate because I am deleting the unneeded points
is there a more efficient way?
So, with a track of 2,600 points...
Cut it at 500. You've now two tracks - one of 500 and one of 2,100.
Split the big one into two.
You've now two at 500 and one at 1,600
etc
etc
etc
As I said, you could choose to cut it at somewhere sensible like a junction, cafe etc as you'll have the mapping on display as you're editing it.
-
- Posts: 172
- Joined: Mon Aug 24, 2015 9:42 am
Re: software to split GPX into 500point sections
Are you on a Mac? I just wrote a script to automate Dave's commands, but it'll only work on a Mac (it'll work on Linux too in principle, but I've not tested it):Asposium wrote:the command line approach will work just fine
just needs a bit more learning at the start
https://raw.githubusercontent.com/gma/g ... -gpx-track
Save that file to disk (Command+S in your browser) and call it "split-gpx-track" (you might need to trim off a .txt extension).
Then open a terminal, find the file you just saved (with the cd command), and then type "chmod +x split-gpx-track" (that'll make it executable).
Now, when you're still in that directory, you'll be able to run it. Type the name of your large GPX file as an argument to the script, and it should do the rest.
This is what you can expect to see if it worked:
$ ./split-gpx-track 'Home from Macc.gpx'
Creating 'Home from Macc-1.gpx'
Creating 'Home from Macc-2.gpx'
Creating 'Home from Macc-3.gpx'
Creating 'Home from Macc-4.gpx'
By the way Dave, nifty approach.
Any trouble getting it to work, feel free to PM me (copy and paste all the text from your terminal into your message).
Last edited by bearlymoving on Fri Jun 09, 2017 10:30 am, edited 1 time in total.
- Bearbonesnorm
- Posts: 23983
- Joined: Sun Jun 05, 2011 8:53 pm
- Location: my own little world
Re: software to split GPX into 500point sections
I started reading all ^ that but got lost / confused and thought, surely buying a gps that actually does what you want, would be a simpler approach
May the bridges you burn light your way
Re: software to split GPX into 500point sections
the above is for my Garmin inReach (tracker)Bearbonesnorm wrote:I started reading all ^ that but got lost / confused and thought, surely buying a gps that actually does what you want, would be a simpler approach
no issue for the Garmin GPS
amazed Garmin would limit the points to 500 points
- Bearbonesnorm
- Posts: 23983
- Joined: Sun Jun 05, 2011 8:53 pm
- Location: my own little world
Re: software to split GPX into 500point sections
Any reason to buy that over a SPOT?the above is for my Garmin inReach (tracker)
no issue for the Garmin GPS
amazed Garmin would limit the points to 500 points
May the bridges you burn light your way
- whitestone
- Posts: 7913
- Joined: Thu Dec 04, 2014 10:20 am
- Location: Skipton(ish)
- Contact:
Re: software to split GPX into 500point sections
I believe that with the Delorme/Garmin you can purchase a month's subscription as and when you want rather than a full year as with SPOTBearbonesnorm wrote:Any reason to buy that over a SPOT?the above is for my Garmin inReach (tracker)
no issue for the Garmin GPS
amazed Garmin would limit the points to 500 points
Better weight than wisdom, a traveller cannot carry