You are not logged in.
- Topics: Active | Unanswered
Announcement
Please create new topics on the new site at community.openstreetmap.org. We expect the migration of data will take a few weeks, you can follow its progress here.***
#1 2009-09-05 19:57:14
- imitation
- Member
- Registered: 2009-09-05
- Posts: 2
Reoving an area from multiple GPX tracks
Hi,
i´ve collected about 100km of tracks, mapped them all, and would like to upload them to OSM. There´s just one catch: In JOSM my home will be glowing in purple because i left the gps reciever on for too long (and fairly often) when i had already gotten home.
So i´m looking for a tool that can remove a given area from a batch of gpx files and then save them for upload.
Any help is appreciated,
-imitation-
Offline
#2 2009-09-05 20:15:30
- pberck
- Member

- Registered: 2008-09-16
- Posts: 111
Re: Reoving an area from multiple GPX tracks
gpsbabel can filter out points in a certain radius. (www.gpsbabel.org). The filter options are a bit vague, but it will look like something like this:
gpsbabel -i gpx -f 20090724.gpx -x transform,wpt=trk,del -x radius,distance=.1K,nosort,exclude,lat=51nnn,lon=5nnn -x transform,trk=wpt,del -o gpx -F ./20090724f.gpx
This is what I do to filter my Garmin GPX logs. It removes points in a 100 meter radius from my house. The two transform options are needed to get the data into the right format for the filter, and back to GPX again.
-peter
Offline
#3 2009-09-08 15:02:55
- imitation
- Member
- Registered: 2009-09-05
- Posts: 2
Re: Reoving an area from multiple GPX tracks
Hi,
thanks a lot, i will try it.
Regards,
-imitation-
Offline
#4 2009-09-17 21:42:09
- Cyniqmaster
- Member
- Registered: 2009-09-17
- Posts: 1
Re: Reoving an area from multiple GPX tracks
I've found that you can use JOSM to edit tracks very cleanly.
To alter GPX traces
• Start JOSM
• Click the 'Open' button on the toolbar
• Change the file selector from .OSM to .GPX and locate your GPX file
• When the file displays, right click on the file in the 'Layers' window and select 'Convert to Data Layer' from the context menu.
• Press OK to accept the warning message that pops up.
• The GPX layer is converted to a JOSM editable layer. You can now edit it.
• CAUTION. It is very easy to accidentally move the whole trace out of position by inadvertently selecting all points and dragging.
• Use the 'Select' and 'Delete Nodes' tool to remove portions of the track in bulk, or zoom in and move delete individual nodes as necessary.
• When you have finished, right click on the converted layer in the 'Layers' window and select 'Export to GPX...' from the context menu.
• Give the new file a name and press OK. Set the 'Export options' as you want, or leave. Press the 'Export and Save' button.
• This new GPX trace can be uploaded to OSM.
• The converted layer in JOSM can be deleted.
Offline
#5 2009-09-18 13:54:25
- Andy Frigaard
- Member
- Registered: 2009-09-18
- Posts: 3
Re: Reoving an area from multiple GPX tracks
Peter,
This is what I do to filter my Garmin GPX logs. It removes points in a 100 meter radius from my house. The two transform options are needed to get the data into the right format for the filter, and back to GPX again.
Will your house not be at the centre of a conspicuous blank 200 m circle with no GPX tracks ! ![]()
Anyway, a good tip.
imitation,
There is also a JOSM plugin to do this. It is done visually, so the area is easy to identify, but it is desiged for only one track.
http://wiki.openstreetmap.org/wiki/JOSM/Plugins/EditGpx
Andy
Offline
#6 2009-09-19 06:20:20
- pberck
- Member

- Registered: 2008-09-16
- Posts: 111
Re: Reoving an area from multiple GPX tracks
Will your house not be at the centre of a conspicuous blank 200 m circle with no GPX tracks !
Anyway, a good tip.
Yes! But luckily I always drive away in the same direction so the track stops before my house without there being a circle :-)
-peter
Offline
#7 2009-09-20 22:43:00
- Thingomy
- Member
- Registered: 2008-04-06
- Posts: 27
Re: Reoving an area from multiple GPX tracks
If you put the center of the circle somwhere that isn't exactly on your house, you will get on better.
Better: use a polygon that covers exactly one housing estate etc, it will be very anonymous
I'm writing a shell script that can automate the process of doing this, uploading your tracks, and a load of other usefull stuff, anyone want to beta test it? I've plugged it a few times on the forum, noone seems interested though.
Offline
#8 2009-09-21 06:14:30
- pberck
- Member

- Registered: 2008-09-16
- Posts: 111
Re: Reoving an area from multiple GPX tracks
If you put the center of the circle somwhere that isn't exactly on your house, you will get on better.
Better: use a polygon that covers exactly one housing estate etc, it will be very anonymous
I'm writing a shell script that can automate the process of doing this, uploading your tracks, and a load of other usefull stuff, anyone want to beta test it? I've plugged it a few times on the forum, noone seems interested though.
I wouldn't mind beta-testing, but if I remember correctly your script runs on windows and works on NMEA data. I use linux and GPX data :-)
-peter
Offline
#9 2009-09-22 16:55:00
- DaveF
- Member
- Registered: 2009-07-03
- Posts: 47
Re: Reoving an area from multiple GPX tracks
Thankfully, due to the inaccuracies of my unit & that the houses around my area are very tall any stalker of mine would be convince I'm living in the middle of the river 200m downstream of my house. :-)
Offline