[SOLVED] Using JOSM to select waypoints from GPX file?

Hello

If JOSM supports it, I’d like to use it open two GPX files (one with a track, the other with waypoints), and use JOSM’ Lasso tool to select all the waypoints that are located within a few kilometers from the track. So I don’t actually want to edit OSM data, just work with local files.

Here’s a screenshot after opening the two GPX files, with the waypoints shown as very small pink crosses:

Can JOSM do this?

Thank you.

Open your gpx track in Josm, under ‘windows’ select ‘layers’
optional: Right click the gpx layer and change 'Custom Track Drawing to about 3 and ‘Customise colour’ as necessary.
optional: Load the ‘Openstreetmap (Carto) Standard’ or similar from the imagery tab - might need to find it under imagery preferences. Also use the blue arrow in the layers box to put it as the bottom layer.

Open your waypoints gpx layer, it can then be seen in the layers window as ‘Markers from…’, right-click it and select ‘Convert to data layer’ so that you can select them them with lasso select tool at left of screen (or the normal rectangle select button), zoom into your gpx track.
The markers are almost unseen so hide the ‘Openstreetmap (Carto) Standard’ layer by clicking on the eye icon in the layers box.

Select ‘File’, ‘New Layer’

Activate the ‘Markers from…’ layer by right-click and selecting activate.
Use the lasso to select all the markers that are wanted near your track.

Select ‘Edit’, ‘Merge Selection’
Select ‘Merge’ in to ‘Data Layer 1’, ok the warning box about merging many objects.

Activate ‘Data Layer 1’, right-click and select ‘Export to gpx’.
You can also right-click and ‘Convert to gpx layer’ to see them better, and hide some of the other layers by clicking on the eye icons.

Then load in your gps receiver and hopefully it displays ok.

Thank you very much for the help. It worked like a charm.

under ‘windows’ select ‘layers’

The Layers window was already visible by default.

optional: Load the ‘Openstreetmap (Carto) Standard’ or similar from the imagery tab - might d to find it under imagery preferences. Also use the blue arrow in the layers box to put it as the bottom layer.

To display a map in the background, open the Imagery menu, and select a map (eg. “OpenStreetMap (Mapnik)”).

To move the map, press the right mouse button instead of the (more common) left mouse button, and pull the map.

Open your waypoints gpx layer, it can then be seen in the layers window as ‘Markers from…’, right-click it and select ‘Convert to data layer’ so that you can select them them with lasso select tool at left of screen (or the normal rectangle select button), zoom into your gpx track.

When right-clicking on a GPX layer > Convert to data layer, JOSM displays a dialog: “Warning: Upload of processed GPS data as map data is considered harmful.”. Ignore it, and just click OK.

At this point, the markers will turn from pink crosses to clear blue dots, making them invisible when zooming in with the map displayed in the background.

Activate the ‘Markers from…’ layer by right-click and selecting activate.

Actually, at this point, the layer is now called “Converted from: Markers from waypoints.file.gpx”

“Convert to GPX layer” displays the markers in pink with their names displayed.

Here are screenshots I took while going through the motion:

The GPX works fine:

I have a couple of questions:

  1. What does Activate do? How do I unactivate (no item in pop-up menu)?

  2. Is it possible to make markers more visible, by changing their shape (cross), size (small), and color (pink)?

 *As far as I can tell, a function can only be done on one layer at a time so when you activate it, it means you can do something with the info on that layer.

When a layer is activated there is a little check mark with green background next to it in the layer box. To unactivate it, just activate another layer by clicking in front of the label for that layer to make the check show on it instead. *

 *Do this first.....The markers are almost unseen so hide the 'Openstreetmap (Carto) Standard' layer (or in your case "OpenStreetMap (Mapnik)") by clicking on the eye icon in the layers box. *

*I could not see anywhere to alter the markers to be more visible, except that you can change the colour but that does not help and Josm chooses a different colour as you open more layers. See ‘JOSM’>‘Preferences’>‘Display Settings’>‘Colours’ *

*But You can make them much more visible by selecting ‘View’ > ‘Map Paint Styles’ with "JOSM default’ alone checked or select ‘View’>‘Wireframe View’. *

I normally edit with ‘View’> ‘Map Paint Styles’> ‘JOSM’ and ‘Potlach2’ selected but the markers are almost invisible on that background

Thanks a bunch.

You can uncheck “Less obtrusive node symbols at low zoom” in the style settings of the default style. See https://josm.openstreetmap.de/wiki/Help/Dialog/MapPaint/StyleSettings

Thanks. Me thinks it’d be even better if, by default, JOSM displayed waypoints with big red pins à la Google Maps, instead of tiny, lagoon-blue dots :expressionless:

JOSM is an editor for OpenStreetMap. What you do is not the common use case. However the big strength of JOSM is its customizability. So you can use different Mappaint styles, see https://josm.openstreetmap.de/wiki/Styles.

You could use an own style like e.g. this one to display “big red pins”:


node:tagged[!is_prop_set(icon-image)] {
	icon-image: https://openclipart.org/image/30px/svg_to_png/192591/map-marker.png&disposition=attachment;
	icon-width: 16;
}