OpenStreetMap Forum

The Free Wiki World Map

You are not logged in.

Announcement

A fix has been applied to the login system for the forums - if you have trouble logging in please contact support@openstreetmap.org with both your forum username and your OpenStreetMap username so we can make sure your accounts are properly linked.

#1 2017-05-09 16:45:41

Shohreh
Member
Registered: 2012-12-15
Posts: 74

[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:
JOSM.grab.waypoints.close.to.track.png

Can JOSM do this?

Thank you.

Last edited by Shohreh (2017-05-10 14:30:49)

Offline

#2 2017-05-10 01:16:10

nevw
Member
From: SE Queensland, Australia
Registered: 2013-04-11
Posts: 274

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

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.

Last edited by nevw (2017-05-10 01:28:25)

Offline

#3 2017-05-10 10:31:25

Shohreh
Member
Registered: 2012-12-15
Posts: 74

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

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:
JOSM.four.steps.png

The GPX works fine:
GPSVisualizer.Selection.with.lasso.png

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)?

Offline

#4 2017-05-10 11:08:01

nevw
Member
From: SE Queensland, Australia
Registered: 2013-04-11
Posts: 274

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

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

     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.

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

     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

Last edited by nevw (2017-05-10 12:35:31)

Offline

#5 2017-05-10 14:30:37

Shohreh
Member
Registered: 2012-12-15
Posts: 74

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

Thanks a bunch.

Offline

#6 2017-05-10 21:12:16

Klumbumbus
Member
Registered: 2014-01-12
Posts: 419
Website

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

Shohreh wrote:

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

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 … leSettings

Offline

#7 2017-05-10 22:21:43

Shohreh
Member
Registered: 2012-12-15
Posts: 74

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

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 neutral

JOSM.hard.to.read.waypoints.png

Offline

#8 2017-05-10 22:36:41

Klumbumbus
Member
Registered: 2014-01-12
Posts: 419
Website

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

Shohreh wrote:

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 neutral

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;
}

Last edited by Klumbumbus (2017-05-10 22:37:18)

Offline

Board footer

Powered by FluxBB