Reoving an area from multiple GPX tracks


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,

gpsbabel can filter out points in a certain radius. ( 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.



thanks a lot, i will try it.


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.


Will your house not be at the centre of a conspicuous blank 200 m circle with no GPX tracks ! :slight_smile:
Anyway, a good tip.


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.


Yes! But luckily I always drive away in the same direction so the track stops before my house without there being a circle :slight_smile:


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 :slight_smile:


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. :slight_smile: