Opened 4 years ago

Closed 4 years ago

Last modified 3 years ago

#15676 closed enhancement (fixed)

[PATCH] New keyword 'currentselection' for parameter 'select' in LoadAndZoom handler

Reported by: skorbut Owned by: team
Priority: normal Milestone: 17.12
Component: Core remotecontrol Version:
Keywords: Cc:


The RemoteControl function allows to select OSM objects based on their ID and then set tags for these objects using a call such as:

GET /load_and_zoom?left=...&right=...&top=...&bottom=...&addtags=name=MyName&select=node1234,way5678

However, when importing data from another datasource that is unrelated to OSM, OSM IDs (here "node1234" and "way5678") for an import can't be directly used to create an URL for the remote plugin since they are unknown to this datasource. Because of this I'd like to realize a workflow, where one can select one (or multiple) OSM objects in JOSM and then add tags to these selected objects using a call such as:

GET /load_and_zoom?left=...&right=...&top=...&bottom=...&addtags=name=MyName&select=currentselection

To get a more solid idea how this would work, look at . There you'll find data from a touristic organisation which are donated under CC0 to OSM. The workflow would be:

  1. In JOSM: open a suitable region
  2. (optional) In JOSM: create a new node/way/relation
  3. In JOSM: Select OSM object(s) onto which tags should be pasted
  4. On website: Click link to paste tags into JOSM
  5. In JOSM: Decide which tags to actually apply to object(s)

I've attached a corresponding patch.

It's written in a way that would also allow to select new objects in addition to the currently selected ones:

GET /load_and_zoom?left=...&right=...&top=...&bottom=...&addtags=name=MyName&select=currentselection,node1234,way5678

PS: I'm aware that the tags listed at (e.g. stars=...) still need some tweaking to be directly imported.

Attachments (1)

currentselection.diff (2.1 KB) - added by skorbut 4 years ago.

Download all attachments as: .zip

Change History (4)

Changed 4 years ago by skorbut

Attachment: currentselection.diff added

comment:1 Changed 4 years ago by Don-vip

Milestone: 17.12

comment:2 Changed 4 years ago by Don-vip

Resolution: fixed
Status: newclosed

In 13212/josm:

fix #15676 - Remote Control: add new keyword currentselection for parameter select in LoadAndZoomHandler (patch by skorbut, modified)

comment:3 Changed 3 years ago by simon04

In 14377/josm:

see #15676 - Add usage example for select=currentselection

Modify Ticket

Change Properties
Set your email in Preferences
as closed The owner will remain team.
as The resolution will be set.
The resolution will be deleted.

Add Comment

E-mail address and name can be saved in the Preferences.

Note: See TracTickets for help on using tickets.