#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:
- 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.
Attachments (5)
Change History (17)
by , 6 years ago
Attachment: | 18038.patch added |
---|
comment:1 by , 6 years ago
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 by , 6 years ago
Milestone: | → 19.08 |
---|
by , 6 years ago
Attachment: | 18038.2.patch added |
---|
Code deduplication (new function parseUrlTagsToKeyValues
)
by , 6 years ago
Attachment: | 18038.3.patch added |
---|
Use streams for initial section (where we split a url section into key=value
sections)
comment:3 by , 6 years ago
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 |
---|
by , 6 years ago
Attachment: | 18038.4.patch added |
---|
Use streams for the entire operation of parsing url tags. And fix a typo (\\n
-> \\|
).
comment:4 by , 6 years ago
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 |
---|
follow-up: 9 comment:8 by , 6 years ago
@Taylor, could you please update wiki:/Help/RemoteControlCommands?
comment:9 by , 6 years ago
Replying to Klumbumbus:
@Taylor, could you please update wiki:/Help/RemoteControlCommands?
OK, that wiki page has been updated.
follow-up: 12 comment:11 by , 6 years ago
Nice!
Could you add this also to the /import
, pretty please? See #11310.
comment:12 by , 6 years ago
Replying to StefanB:
Nice!
Could you add this also to the/import
, pretty please? See #11310.
I'll look into this, but I would need to decide what gets priority. The osm file being imported, or the URL. I personally would default to the osm file changeset tags.
For example, if the url is http://127.0.0.1:8111/import?changeset_tags=comment=SomeComment|source=SomeSource|import=yes&url=https://josm.openstreetmap.de/raw-attachment/ticket/18038/test.osm, the changeset tags from the test.osm file would take precedence.
I'll look into this when I have time, but I'd like to finish some other projects first (a validator test for sharp angles and a plugin for RapiD).
Add
changeset_tags
toLoadAndZoomHandler
,changeset_tags
can be overriden withchangeset_source
(and other existing tags) in the current implementation