Modify

Opened 5 years ago

Closed 5 months ago

Last modified 5 months ago

#11310 closed enhancement (fixed)

Support setting changeset tags during /import call

Reported by: StefanB Owned by: simon04
Priority: normal Milestone: 20.05
Component: Core remotecontrol Version:
Keywords: changeset upload Cc:

Description

It would make much sense to specify source tag for the changeset during /import remote control call

I know it can be set on load_and_zoom, but that requires exact bbox as a parameter and calling that would prevent users from inspecting the imported data before it is merged with existing data downloaded via API.

It can also support setting changeset comment, but source tag is the most crucial one for imports.

Attachments (1)

11310.patch (3.3 KB) - added by taylor.smock 12 months ago.
Initial quick and dirty patch. Needs deduplication of code (for changeset_tags) and parseUrlTagsToKeyValues should probably be moved to RequestHandler.

Download all attachments as: .zip

Change History (18)

comment:1 Changed 5 years ago by StefanB

Ooops, probably a duplicate of #11045. Didn't remember mentioning this in a comment there.

comment:2 Changed 5 years ago by simon04

Since the data is loaded from an OSM file, the changeset comment could be specified there:

<osm version='0.6' upload='true' generator='JOSM'>
  <changeset><tag k="comment" v="This will show up when uploading"/></changeset>
  <!-- ... -->
</osm>

comment:3 Changed 5 years ago by anonymous

Thanks for a nice hint, but we're importing zipped shapefiles, not .osm xml files.

comment:4 Changed 5 years ago by anonymous

We could in theory use OpenData plugin to convert all the shapefiles to OSM xml format in the data preparation phase, but I don't know yet how to do that in a script.

comment:5 Changed 5 years ago by StefanB

Would it be possible to use zip file comment or some ShapeFile comment (if it exists at all, not sure)? Or a text file within in zip? Extra import parameter would be easiest, i guess.

comment:6 Changed 12 months ago by StefanB

The recently closed #18038 "[PATCH] Arbitrary changeset tags should be able to be added via remote control" gave me some hope, but unfortunately the changeset_tags parameter is only applicable for /load_and_zoom command.

Our import project (https://raba.openstreetmap.si/) could really use the changeset_source (and optionally changeset_comment) or just a generic changeset_tags also on the /import remote control API command to specify the source of the import.

The changeset_source parameter could also be required for all /import calls, as any import should specify the source!

Last edited 12 months ago by StefanB (previous) (diff)

Changed 12 months ago by taylor.smock

Attachment: 11310.patch added

Initial quick and dirty patch. Needs deduplication of code (for changeset_tags) and parseUrlTagsToKeyValues should probably be moved to RequestHandler.

comment:7 Changed 6 months ago by Don-vip

Keywords: changeset upload added
Milestone: 20.03
Owner: changed from team to Don-vip
Status: newassigned

comment:8 Changed 6 months ago by simon04

Milestone: 20.0320.04

comment:9 Changed 5 months ago by simon04

Owner: changed from Don-vip to simon04
Status: assignednew

comment:10 Changed 5 months ago by simon04

Resolution: fixed
Status: newclosed

In 16324/josm:

fix #11310 - Support setting changeset tags during /import call

comment:11 Changed 5 months ago by stoecker

I'm pretty sure there is a wiki page where changes to remote control should be documented.

comment:14 Changed 5 months ago by StefanB

Great, thanks!

Can you please add this also to the:

  • import
  • load_data
  • open_file

...and possibly other calls?
Or just make a separate call just for that.

It is needed there to set source tags and meaningful comments.

comment:15 Changed 5 months ago by Don-vip

I'm working on a refactoring of remote control parameters handling to share parameters between different handlers.

comment:16 Changed 5 months ago by StefanB

That would be great, and would simplify the API considerably. Thanks!

comment:17 Changed 5 months ago by Klumbumbus

Milestone: 20.0420.05

Milestone renamed

Modify Ticket

Change Properties
Set your email in Preferences
Action
as closed The owner will remain simon04.
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.