Author Topic: Subset of a gpx file?  (Read 3942 times)

LDWhite68

  • Full Member
  • ***
  • Posts: 41
    • View Profile
Subset of a gpx file?
« on: May 09, 2010, 08:50:29 PM »
Sometimes I have a  gpx file with lots of extra points from other areas that I don't want for a particular project. It seems like I should be able to use the box select tool to grab points/segments from a certain area and save to a new file name. If there is a way to do that, then apparently I have not figured out the trick yet. I have only figured out two ways to do this type of edit so far, and they're both unacceptably tedious: 1) I can use the box select to delete,, area by area, the points in the file that I don't want to keep. This is fine for small files, but not when I just want a hundred points out of a file that contains thousands. 2) I could manually edit the gpx file. Not an option that I seriously want to consider.
 
Any suggestions?

ScottMorris

  • Administrator
  • Sr. Member
  • *****
  • Posts: 2754
  • TopoFusion Author
    • View Profile
    • http://www.topofusion.com/diary
Re: Subset of a gpx file?
« Reply #1 on: May 09, 2010, 09:00:07 PM »
Just to make sure first, you're talking about track points right?

One thing is you can select a single track segment out of the file and save just that segment to a new file using the merge tool.  But that may not be what you are asking for.

A "delete all but selected" function for the box select tool might be what you are looking for?  Draw a box around what you want, delete the rest?

I've never considered such a function, but it would be super easy to add, I think.

Oh, are all the tracks/points you want in the same file, or multiple files?  Are you looking to merge multiple files with this operation as well?  I could see some utility to that... Hmm.
Scott Morris - founder and co-author of TopoFusion
email: smorris@topofusion.com

LDWhite68

  • Full Member
  • ***
  • Posts: 41
    • View Profile
Re: Subset of a gpx file?
« Reply #2 on: May 09, 2010, 09:44:57 PM »
I was only thinking about from one file at a time. But in some cases multiple files might be neat too. I would think multi-file would be easy to support by just requiring that the files to be used would be clicked/highlighted in the list before doing the box select. Would it cause problems if a combination of both track and point files were selected? Does it make a difference for the files to be gpx vs. some other format/protocol?

Usually the files are tracks, but could also be a file of POIs. Some examples:
1) I have a file showing National Wildlife Refuge boundaries in a state, but want to make a smaller file to work with for just one wildlife refuge.
2) I have a gpx track from my GPS that includes multiple trips, but I only want to deal with the part where I was hiking in a particular park. Especially I need to cut out all the other points before creating a network.

"Delete all but selected" is a good name, except of course that I usually want to save to a new name so that the original file is preserved.

Roach

  • Jr. Member
  • **
  • Posts: 7
    • View Profile
Re: Subset of a gpx file?
« Reply #3 on: April 18, 2011, 06:07:31 PM »
Was this save subset of functionality ever implemented? I tried the 'Save Selected As' under the file menu after highlighting/selected with a right click one track in a GPX file of many tracks. But the result was a copy of the entire GPX file with all the tracks, not the single track which I was targeting. I didn't see any reference in the user manual, but maybe I missed it (using ctrl-F in windows). In my work, I have to do a lot more splitting than lumping. Thanks.

Roach

  • Jr. Member
  • **
  • Posts: 7
    • View Profile
Re: Subset of a gpx file?
« Reply #4 on: April 21, 2011, 08:13:37 PM »
I see now the error of my ways, it is simply one of my misunderstanding of the program's nomenclature. In the File menu, the choices in the Save group are 'Save Selected Files', 'Save Selected (File) as...' and 'Save All Files'. I assumed that the 'Save Selected (File) as...' choice to mean that a single, highlighted track - a portion of a single file- would be copied out into it's own file. (Parentheses are mine). Rather, it is really is a re-naming tool for the whole file which is currently selected in the file management area, and not a portion of a track in the map viewing area.

That all said, I still would like to know a best practice for copying a selected/highlighted track or subset of  tracks to a separate file. Any ideas are appreciated.