Modify

Opened 5 years ago

Last modified 2 months ago

#11310 new enhancement

Support setting changeset tags during /import call

Reported by: StefanB Owned by: team
Priority: normal Milestone:
Component: Core remotecontrol Version:
Keywords: 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 2 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 (7)

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 4 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 2 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 2 months ago by StefanB (previous) (diff)

Changed 2 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.

Modify Ticket

Change Properties
Set your email in Preferences
Action
as new The owner will remain team.
as The resolution will be set.
to The owner will be changed from team to the specified user.
The owner will change to StefanB
as duplicate The resolution will be set to duplicate.The specified ticket will be cross-referenced with this ticket
The owner will be changed from team to anonymous.

Add Comment


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

 
Note: See TracTickets for help on using tickets.