Split national GPX file into provinces/states ?

Hello,

I have a nation-scale GPX that includes thousands of waypoints.

Is there a way to split locations into provinces/states using OpenStreetMap, so that I end up with smaller files instead?

Thank you.

You could use Josm.
(I am assuming by thousands of waypoints, you instead mean thousands of points on the gpx track)
(if you actually have a gpx with many points and also thousands of waypoints I am not sure if this will work)

Load the big gpx into Josm via File>Open, select Windows>layers to get a ‘layers’ box at the right side.
Right-click the gpx in the layers box, select ‘convert to data layer’ (it it now named Converted from…)

Select Imagery>OpenStreetMap Carto (standard)
(…you make have to add that to your Imagery dropdown by going to Imagery Preferences first)

Zoom into the gpx at the province or state where you wish to spilt the gpx, select a point (node) on the gpx, select Tools>Split Way.
You have now split your original gpx into two selectable pieces.
Do all the other ‘Split Way’ you prefer. You can hold the shift key down and select all the nodes in one go and do ‘Split Way’ if preferred.

Now to export each as a separate gpx…
Select File>New Layer (it becomes the active layer with a green tick in the layer box)

Activate the layer with the split gpx instead by selecting a green tick at left side in layers box (it it named Converted from…)
Select a piece that you want as a separate gpx, select Edit>‘Merge selection’ and merge into the new data layer you created.

Activate the new data layer, right-click the data layer in the layers box, ‘export to gpx’, give it a name and save.

When done delete the gpx in that data layer and do another one the same way until you have exported all the gpxes you want.
It helps a lot to select the ‘eye’ icons off on the not active layers at times.

…clear as mud now :slight_smile: