How to split a GPX track file into several files of N trackpoints each? The 2019 Stack Overflow Developer Survey Results Are In Announcing the arrival of Valued Associate #679: Cesar Manara Planned maintenance scheduled April 17/18, 2019 at 00:00UTC (8:00pm US/Eastern)How to build a geographic database of GPS logs?Cleaning/editing GPX (tracks) files recorded from GPS device in QGIS?How can I edit gpx tracks, property timestamp and waypoints?Load multiple GPX files to Leaflet mapDynamically change Leaflet layerHow to calculate location at given time from GPX trackMerge multiple GPX files, only keeping tracks?Can GPX Files Contain More Than 1 Track?Merging tracks from multiple GPX files into a single track?GPX Track Information - time stamp of track
What is the role of 'For' here?
Presidential Pardon
Can withdrawing asylum be illegal?
What is the padding with red substance inside of steak packaging?
Word for: a synonym with a positive connotation?
Didn't get enough time to take a Coding Test - what to do now?
Why can't devices on different VLANs, but on the same subnet, communicate?
How do I design a circuit to convert a 100 mV and 50 Hz sine wave to a square wave?
"... to apply for a visa" or "... and applied for a visa"?
How did passengers keep warm on sail ships?
The following signatures were invalid: EXPKEYSIG 1397BC53640DB551
Simulating Exploding Dice
Student Loan from years ago pops up and is taking my salary
What's the point in a preamp?
Is every episode of "Where are my Pants?" identical?
What to do when moving next to a bird sanctuary with a loosely-domesticated cat?
Does Parliament hold absolute power in the UK?
What force causes entropy to increase?
Is there a way to generate uniformly distributed points on a sphere from a fixed amount of random real numbers per point?
Why not take a picture of a closer black hole?
Can each chord in a progression create its own key?
Can I visit the Trinity College (Cambridge) library and see some of their rare books
Why did Peik Lin say, "I'm not an animal"?
Did the new image of black hole confirm the general theory of relativity?
How to split a GPX track file into several files of N trackpoints each?
The 2019 Stack Overflow Developer Survey Results Are In
Announcing the arrival of Valued Associate #679: Cesar Manara
Planned maintenance scheduled April 17/18, 2019 at 00:00UTC (8:00pm US/Eastern)How to build a geographic database of GPS logs?Cleaning/editing GPX (tracks) files recorded from GPS device in QGIS?How can I edit gpx tracks, property timestamp and waypoints?Load multiple GPX files to Leaflet mapDynamically change Leaflet layerHow to calculate location at given time from GPX trackMerge multiple GPX files, only keeping tracks?Can GPX Files Contain More Than 1 Track?Merging tracks from multiple GPX files into a single track?GPX Track Information - time stamp of track
.everyoneloves__top-leaderboard:empty,.everyoneloves__mid-leaderboard:empty,.everyoneloves__bot-mid-leaderboard:empty margin-bottom:0;
I have some GPX track files, each containing tracks with thousands of trackpoints.
I need to split those files into multiple ones, each with 500 (or more, accordingly) points each.
Unfortunately I cannot simplify those tracks, I really need to split them.
As long as I could find, gpsbabel isn't able to do so. I am open to use any tool either on Linux (preferably) or Windows as well.
gpx
add a comment |
I have some GPX track files, each containing tracks with thousands of trackpoints.
I need to split those files into multiple ones, each with 500 (or more, accordingly) points each.
Unfortunately I cannot simplify those tracks, I really need to split them.
As long as I could find, gpsbabel isn't able to do so. I am open to use any tool either on Linux (preferably) or Windows as well.
gpx
add a comment |
I have some GPX track files, each containing tracks with thousands of trackpoints.
I need to split those files into multiple ones, each with 500 (or more, accordingly) points each.
Unfortunately I cannot simplify those tracks, I really need to split them.
As long as I could find, gpsbabel isn't able to do so. I am open to use any tool either on Linux (preferably) or Windows as well.
gpx
I have some GPX track files, each containing tracks with thousands of trackpoints.
I need to split those files into multiple ones, each with 500 (or more, accordingly) points each.
Unfortunately I cannot simplify those tracks, I really need to split them.
As long as I could find, gpsbabel isn't able to do so. I am open to use any tool either on Linux (preferably) or Windows as well.
gpx
gpx
edited May 12 '16 at 20:25
PolyGeo♦
53.9k1782246
53.9k1782246
asked May 11 '16 at 13:48
DakatineDakatine
107312
107312
add a comment |
add a comment |
1 Answer
1
active
oldest
votes
Surprisingly it seems gpsbabel indeed can't do it. But at least it can help by first converting to csv. Then I split the result with Unix' split
and convert back to gpx with gpsbabel. A similar strategy might work with PowerShell, but I don't know if it has a split
equivalent. Here is the bash function I used:
splitTrack()
# $1 shall be the gpx file to split
pfx="$1%.*-"
gpsbabel -i gpx -f "$1" -t -o csv -F -
EDIT: Added hint from comments about getting track points out instead of way points.
Uhm, that generates files with plenty of waypoints though, rather than trackpoints. I tried the transform options described here: gpsbabel.org/htmldoc-1.5.1/filter_transform.html but I was unsuccessful. Would you please have any tip about how to convert the CSV temporary file into a proper track rather than a collection of waypoints? Thanks again
– Dakatine
Oct 16 '18 at 14:49
1
found it! gpsbabel -i csv -f "$f" -x transform,trk=wpt -x nuketypes,waypoints -o gpx -F "$fout"
– Dakatine
Oct 16 '18 at 15:01
add a comment |
Your Answer
StackExchange.ready(function()
var channelOptions =
tags: "".split(" "),
id: "79"
;
initTagRenderer("".split(" "), "".split(" "), channelOptions);
StackExchange.using("externalEditor", function()
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled)
StackExchange.using("snippets", function()
createEditor();
);
else
createEditor();
);
function createEditor()
StackExchange.prepareEditor(
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: false,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: null,
bindNavPrevention: true,
postfix: "",
imageUploader:
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
,
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
);
);
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fgis.stackexchange.com%2fquestions%2f193168%2fhow-to-split-a-gpx-track-file-into-several-files-of-n-trackpoints-each%23new-answer', 'question_page');
);
Post as a guest
Required, but never shown
1 Answer
1
active
oldest
votes
1 Answer
1
active
oldest
votes
active
oldest
votes
active
oldest
votes
Surprisingly it seems gpsbabel indeed can't do it. But at least it can help by first converting to csv. Then I split the result with Unix' split
and convert back to gpx with gpsbabel. A similar strategy might work with PowerShell, but I don't know if it has a split
equivalent. Here is the bash function I used:
splitTrack()
# $1 shall be the gpx file to split
pfx="$1%.*-"
gpsbabel -i gpx -f "$1" -t -o csv -F -
EDIT: Added hint from comments about getting track points out instead of way points.
Uhm, that generates files with plenty of waypoints though, rather than trackpoints. I tried the transform options described here: gpsbabel.org/htmldoc-1.5.1/filter_transform.html but I was unsuccessful. Would you please have any tip about how to convert the CSV temporary file into a proper track rather than a collection of waypoints? Thanks again
– Dakatine
Oct 16 '18 at 14:49
1
found it! gpsbabel -i csv -f "$f" -x transform,trk=wpt -x nuketypes,waypoints -o gpx -F "$fout"
– Dakatine
Oct 16 '18 at 15:01
add a comment |
Surprisingly it seems gpsbabel indeed can't do it. But at least it can help by first converting to csv. Then I split the result with Unix' split
and convert back to gpx with gpsbabel. A similar strategy might work with PowerShell, but I don't know if it has a split
equivalent. Here is the bash function I used:
splitTrack()
# $1 shall be the gpx file to split
pfx="$1%.*-"
gpsbabel -i gpx -f "$1" -t -o csv -F -
EDIT: Added hint from comments about getting track points out instead of way points.
Uhm, that generates files with plenty of waypoints though, rather than trackpoints. I tried the transform options described here: gpsbabel.org/htmldoc-1.5.1/filter_transform.html but I was unsuccessful. Would you please have any tip about how to convert the CSV temporary file into a proper track rather than a collection of waypoints? Thanks again
– Dakatine
Oct 16 '18 at 14:49
1
found it! gpsbabel -i csv -f "$f" -x transform,trk=wpt -x nuketypes,waypoints -o gpx -F "$fout"
– Dakatine
Oct 16 '18 at 15:01
add a comment |
Surprisingly it seems gpsbabel indeed can't do it. But at least it can help by first converting to csv. Then I split the result with Unix' split
and convert back to gpx with gpsbabel. A similar strategy might work with PowerShell, but I don't know if it has a split
equivalent. Here is the bash function I used:
splitTrack()
# $1 shall be the gpx file to split
pfx="$1%.*-"
gpsbabel -i gpx -f "$1" -t -o csv -F -
EDIT: Added hint from comments about getting track points out instead of way points.
Surprisingly it seems gpsbabel indeed can't do it. But at least it can help by first converting to csv. Then I split the result with Unix' split
and convert back to gpx with gpsbabel. A similar strategy might work with PowerShell, but I don't know if it has a split
equivalent. Here is the bash function I used:
splitTrack()
# $1 shall be the gpx file to split
pfx="$1%.*-"
gpsbabel -i gpx -f "$1" -t -o csv -F -
EDIT: Added hint from comments about getting track points out instead of way points.
edited Apr 7 at 9:01
answered May 28 '17 at 17:58
HaraldHarald
1263
1263
Uhm, that generates files with plenty of waypoints though, rather than trackpoints. I tried the transform options described here: gpsbabel.org/htmldoc-1.5.1/filter_transform.html but I was unsuccessful. Would you please have any tip about how to convert the CSV temporary file into a proper track rather than a collection of waypoints? Thanks again
– Dakatine
Oct 16 '18 at 14:49
1
found it! gpsbabel -i csv -f "$f" -x transform,trk=wpt -x nuketypes,waypoints -o gpx -F "$fout"
– Dakatine
Oct 16 '18 at 15:01
add a comment |
Uhm, that generates files with plenty of waypoints though, rather than trackpoints. I tried the transform options described here: gpsbabel.org/htmldoc-1.5.1/filter_transform.html but I was unsuccessful. Would you please have any tip about how to convert the CSV temporary file into a proper track rather than a collection of waypoints? Thanks again
– Dakatine
Oct 16 '18 at 14:49
1
found it! gpsbabel -i csv -f "$f" -x transform,trk=wpt -x nuketypes,waypoints -o gpx -F "$fout"
– Dakatine
Oct 16 '18 at 15:01
Uhm, that generates files with plenty of waypoints though, rather than trackpoints. I tried the transform options described here: gpsbabel.org/htmldoc-1.5.1/filter_transform.html but I was unsuccessful. Would you please have any tip about how to convert the CSV temporary file into a proper track rather than a collection of waypoints? Thanks again
– Dakatine
Oct 16 '18 at 14:49
Uhm, that generates files with plenty of waypoints though, rather than trackpoints. I tried the transform options described here: gpsbabel.org/htmldoc-1.5.1/filter_transform.html but I was unsuccessful. Would you please have any tip about how to convert the CSV temporary file into a proper track rather than a collection of waypoints? Thanks again
– Dakatine
Oct 16 '18 at 14:49
1
1
found it! gpsbabel -i csv -f "$f" -x transform,trk=wpt -x nuketypes,waypoints -o gpx -F "$fout"
– Dakatine
Oct 16 '18 at 15:01
found it! gpsbabel -i csv -f "$f" -x transform,trk=wpt -x nuketypes,waypoints -o gpx -F "$fout"
– Dakatine
Oct 16 '18 at 15:01
add a comment |
Thanks for contributing an answer to Geographic Information Systems Stack Exchange!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fgis.stackexchange.com%2fquestions%2f193168%2fhow-to-split-a-gpx-track-file-into-several-files-of-n-trackpoints-each%23new-answer', 'question_page');
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown