Opened 15 months ago
Last modified 4 weeks ago
#21782 new enhancement
[patch] Deprecate vending=parcel_pickup
Reported by: | overflorian | Owned by: | team |
---|---|---|---|
Priority: | normal | Milestone: | 23.03 |
Component: | Internal preset | Version: | |
Keywords: | vending vending_machine parcel | Cc: | Klumbumbus |
Description (last modified by )
Hi,
A new tag just has been approved: Tag:amenity=parcel_locker and describes a parcel locker.
It replaces previously used (and now deprecated) amenity=vending_machine + vending=parcel_pickup
I propose to:
- While a amenity=vending_machine is created, stop proposing the associated preset vending=parcel_pickup
- Create a new dedicated preset for amenity=parcel_locker
- Change the validator accordingly
Thanks
PS: deprecation follow-up (including similar requests to other tools) is available on this wiki page: https://wiki.openstreetmap.org/wiki/Tag:vending%3Dparcel_pickup#Deprecation_follow-up
Attachments (4)
Change History (30)
comment:1 Changed 14 months ago by
Keywords: | vending vending_machine parcel added |
---|---|
Type: | defect → enhancement |
comment:2 Changed 14 months ago by
comment:3 Changed 13 months ago by
Thanks, but that preset offers also undocumented tags like 'parcel_locker=', or mixes name and number into a single tag 'ref='.
Anyway, JOSM should have this built in, because the lockers are very popular in the wild. The real extent in OSM is unknown, as many have been tagged as amenity=vending_machine as that was the method at the time.
comment:5 Changed 12 months ago by
Summary: | Deprecate vending=parcel_pickup → [WIP patch] Deprecate vending=parcel_pickup |
---|
Please try out the provided patch.
The preset structure is not appealing for me, but this is the best I could came up with.
Edit: the icon is from the above preset (here), but slightly modified by me.
Changed 12 months ago by
Attachment: | josm_21728_parcel_locker_v2.patch added |
---|
add missing commas, change mapcss rule
comment:6 Changed 12 months ago by
The messages still not working as one would expect, but it's JOSM's limitation. With regex, sublist and probably more, the {*.key}
property cannot read out.
One possible solution is duplicating rules:
*[amenity=vending][vending=parcel_mail_in], *[amenity=vending][vending=parcel_pickup], *[amenity=vending][vending=parcel_mail_in;parcel_pickup], *[amenity=vending][vending=parcel_pickup;parcel_mail_in] { ... }
but it isn't elegant ...and doesn't work. I'm out of ideas. Probably a new custom message is needed.
comment:7 Changed 12 months ago by
Some remarks:
- I guess the icon needs more colors/contrast. Only one color does not work well, regarding different LaFs and backgrounds.
- The style should support areas and not only nodes.
- The validator rule does not work so far, as
parcel_mail_in
and/orparcel_pickup
need to be preserved as keys. Maybe, we need several rules for different cases.
comment:8 Changed 12 months ago by
- Yes, a white bg would do it, like the hunting stand's icon.
- The wiki page was modified since then, allowing areas as well, thanks for noticing.
- What do you mean? It is preserved by the patch, only ignoring
vending=parcel_mail_in/parcel_pickup
.
comment:9 Changed 12 months ago by
- A background might work, but actually I am not convinced about the icon and its recognition.
- The wiki was wrong as prior use and the proposal included areas.
- No, I would expect to add
parcel_pickup=yes
if the key is not present andvending=parcel_pickup
is removed. Same forparcel_mail_in=*
.
comment:10 Changed 7 months ago by
How is it going? Since amenity=parcel_locker is added even to default carto style
comment:11 Changed 7 months ago by
Description: | modified (diff) |
---|
I've created the base patch, and looking at the wiki page we got a new icon since then.
@skyper can you work on this or should I proceed with the patch?
comment:12 Changed 7 months ago by
@gaben:
Please, go ahead. I might have time to comment but I won't work on it.
comment:13 follow-up: 15 Changed 6 months ago by
Okay, currently investigating why the {0.key}
is not working with the ~=
selector. To my understanding, it should work.
Changed 5 months ago by
Attachment: | josm_21728_parcel_locker_v3.patch added |
---|
comment:14 Changed 5 months ago by
Summary: | [WIP patch] Deprecate vending=parcel_pickup → [patch] Deprecate vending=parcel_pickup |
---|
Please review, I think it's done.
comment:15 Changed 5 months ago by
Yes, much better but:
- the warnings should check for
amenity=vending_machine
- not sure if we need to check for existing
parcel_pickup=*
andparcel_mail_in=*
before overwriting
- not sure if we need to check for existing
vending=parcel_mail_in
andvending=parcel_pickup
should be removed from presets (was in v2 but is missing in v3)- rendering of the deprecated tags needs to be changed to
deprecated.svg
for nodes and disabled for areas- the old icon should probably be moved to
nodist/
- the old icon should probably be moved to
Replying to gaben:
Okay, currently investigating why the
{0.key}
is not working with the~=
selector. To my understanding, it should work.
As workaround you can add an additional selector [key]
to get the key and/or its values.
comment:16 Changed 5 months ago by
Thanks for the review!
- I was thinking about adding the
amenity=vending_machine
to the filter, but I left it out intentionally. It does not harm, so readded. - Good catch! Probably a result of working locally (no git branch or commits) on 4 tickets in parallel. Fixed.
- Hmm, I may miss something. The main tag
amenity=vending_machine
is still used. I checked all thedeprecated.svg
usages, and none of them was a combination of a main and subtag, like in our case (amenity=vending_machine
+vending=parcel_pickup|parcel_mail_in
).
comment:17 Changed 5 months ago by
Thanks for re-adding amenity=vending_machine
to the filter. It is important as without it other values of amenity=*
would be overwritten by the fix.
Sorry, I was off regarding the rendering. Thought we have more individual icons but that is not the case. Anyway, I still think deprecated.svg
for the combination is useful as eyes' catcher but not that important.
Changed 5 months ago by
Attachment: | josm_21728_parcel_locker_v4.patch added |
---|
added amenity=vending_machine
filter, remove deprecated vending values, remove amenity=parcel_locker
from ignoretags.cfg
comment:18 Changed 5 months ago by
Milestone: | → 22.11 |
---|
Now it looks good, but not sure if ignoretags.cfg needs individual entries for tag values:
K:vending=parcel_pickup K:vending=parcel_mail_in K:vending=parcel_pickup;parcel_mail_in
So the question, is it missing K:vending=parcel_mail_in;parcel_pickup
(switched order) or the first two is unnecessary?
Anyway, it's minor. Whoever will commit, please have a look at it.
comment:20 Changed 3 months ago by
Milestone: | 22.12 → 23.01 |
---|
Ticket retargeted after milestone closed
comment:21 Changed 3 months ago by
Somewhat stupid question:
What is supposed to happen if something is tagged vending=parcel_pickup;parcel_mail_in;stamps
?
As an aside, there is a list membership comparator, so instead of [vending="parcel_mail_in;parcel_pickup"]
and [vending="parcel_pickup;parcel_mail_in"]
you can do [vending~=parcel_mail_in][vending~=parcel_pickup]
. If you do that, you will probably want to set .deprecated_parcel
or something and use !.deprecated_parcel
to avoid having multiple warnings for the same thing.
comment:22 Changed 3 months ago by
Yes, there is the list membership comparator, although if I remember correctly, the problem is the fixAdd: "{0.value}=yes";
part is not working as mentioned in comment:6 and comment:13.
Probably it's a corner case, so not a bug, just no one thought about it yet.
comment:23 Changed 3 months ago by
Cc: | Klumbumbus added |
---|
Looping in Klumbumbus. What do you think about the provided patch? I couldn't find any other possibility.
comment:24 Changed 3 months ago by
I was thinking of something like the following (trimmed for size)
/* #21782 */ *[amenity=vending_machine][vending=parcel_mail_in], *[amenity=vending_machine][vending=parcel_pickup] { set .parcel_checked; throwWarning: tr("{0} is deprecated", "{1.tag}"); group: tr("deprecated tagging"); } /** It would be nice if we could just say list type only has the following values */ *[amenity=vending_machine][vending~=parcel_mail_in][vending~=parcel_pickup][count(uniq_list(split(";", tag("vending")))) == 2] { set .parcel_checked; throwWarning: tr("{0} is deprecated", "{1.tag}"); group: tr("deprecated tagging"); } /** This is just for cases where we have stamp;parcel_mail_in or stuff like that */ *[amenity=vending_machine][vending~=parcel_mail_in]!.parcel_checked, *[amenity=vending_machine][vending~=parcel_pickup]!.parcel_checked { throwWarning: tr("{0} is deprecated", "{1.tag}"); group: tr("deprecated tagging"); }
comment:25 Changed 2 months ago by
Milestone: | 23.01 → 23.02 |
---|
Ticket retargeted after milestone closed
A preset is already available for download, see Presets/ParcelLockers.