Modify

Opened 11 days ago

Closed 37 hours ago

Last modified 33 hours ago

#18038 closed enhancement (fixed)

[PATCH] Arbitrary changeset tags should be able to be added via remote control

Reported by: taylor.smock Owned by: team
Priority: normal Milestone: 19.08
Component: Core remotecontrol Version:
Keywords: changeset tag Cc:

Description

I'm specifically interested in being able to have "import=yes" added to the changeset tags.

The workflow I want to have is:

1) Download an area with JOSM using a tasking manager
2) Download an extract of data to import into JOSM (possibly using a tasking manager, if it supports it)
3) Use conflation to take data from the import data and copy it to the OSM data layer
4) Perform checks to make certain the data is OK
5) Upload the data (should have the import=yes tag, if at all possible here)

What I've tried:

  1. Making certain that there is a <changeset><tag k="import" v="yes"/></changeset> in the import data layer. Conflation doesn't copy the changeset information over to the OSM data layer.

This duplicates #9387 and #9472

Attachments (4)

18038.patch (2.0 KB) - added by taylor.smock 11 days ago.
Add changeset_tags to LoadAndZoomHandler, changeset_tags can be overriden with changeset_source (and other existing tags) in the current implementation
18038.2.patch (4.1 KB) - added by taylor.smock 2 days ago.
Code deduplication (new function parseUrlTagsToKeyValues)
18038.3.patch (4.5 KB) - added by taylor.smock 2 days ago.
Use streams for initial section (where we split a url section into key=value sections)
18038.4.patch (4.2 KB) - added by taylor.smock 2 days ago.
Use streams for the entire operation of parsing url tags. And fix a typo (\\n -> \\|).

Download all attachments as: .zip

Change History (11)

Changed 11 days ago by taylor.smock

Attachment: 18038.patch added

Add changeset_tags to LoadAndZoomHandler, changeset_tags can be overriden with changeset_source (and other existing tags) in the current implementation

comment:1 Changed 2 days ago by Don-vip

This can be rewritten to:

                    // This logic is (largely) stolen from the AddTagsDialog.
                    Set<String> tagSet = Arrays.stream(args.get("changeset_tags").split("\\|"))
                        .map(String::trim)
                        .filter(tag -> !tag.isEmpty() && tag.contains("="))
                        .collect(Collectors.toSet());

Could you please propose a refactoring where the code is shared between LoadAndZoomHandler and AddTagsDialog, instead of being copied/pasted?

comment:2 Changed 2 days ago by Don-vip

Milestone: 19.08

Changed 2 days ago by taylor.smock

Attachment: 18038.2.patch added

Code deduplication (new function parseUrlTagsToKeyValues)

Changed 2 days ago by taylor.smock

Attachment: 18038.3.patch added

Use streams for initial section (where we split a url section into key=value sections)

comment:3 Changed 2 days ago by taylor.smock

Summary: [PATCH] Arbitrary changeset tags should be able to be added via remote control[WIP PATCH] Arbitrary changeset tags should be able to be added via remote control

Changed 2 days ago by taylor.smock

Attachment: 18038.4.patch added

Use streams for the entire operation of parsing url tags. And fix a typo (\\n -> \\|).

comment:4 Changed 2 days ago by taylor.smock

Summary: [WIP PATCH] Arbitrary changeset tags should be able to be added via remote control[PATCH] Arbitrary changeset tags should be able to be added via remote control

comment:5 Changed 37 hours ago by Don-vip

Resolution: fixed
Status: newclosed

In 15316/josm:

fix #18038 - Add arbitrary changeset tags via remote control (patch by taylor.smock)

comment:6 Changed 37 hours ago by Don-vip

Thanks!

comment:7 Changed 33 hours ago by Don-vip

In 15319/josm:

see #18038 - checkstyle

Modify Ticket

Change Properties
Set your email in Preferences
Action
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.