Modify

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 gaben)

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)

josm_21728_parcel_locker.patch (5.9 KB) - added by gaben 12 months ago.
initial patch
josm_21728_parcel_locker_v2.patch (5.9 KB) - added by gaben 12 months ago.
add missing commas, change mapcss rule
josm_21728_parcel_locker_v3.patch (6.4 KB) - added by gaben 5 months ago.
josm_21728_parcel_locker_v4.patch (7.6 KB) - added by gaben 5 months ago.
added amenity=vending_machine filter, remove deprecated vending values, remove amenity=parcel_locker from ignoretags.cfg

Download all attachments as: .zip

Change History (30)

comment:1 Changed 14 months ago by gaben

Keywords: vending vending_machine parcel added
Type: defectenhancement

comment:2 Changed 14 months ago by gaben

A preset is already available for download, see Presets/ParcelLockers.

comment:3 Changed 13 months ago by aceman

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:4 Changed 13 months ago by gaben

The icon from the above preset would do it for JOSM?

comment:5 Changed 12 months ago by gaben

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.

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

Changed 12 months ago by gaben

initial patch

Changed 12 months ago by gaben

add missing commas, change mapcss rule

comment:6 Changed 12 months ago by gaben

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 skyper

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/or parcel_pickup need to be preserved as keys. Maybe, we need several rules for different cases.

comment:8 Changed 12 months ago by gaben

  • 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 skyper

  • 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 and vending=parcel_pickup is removed. Same for parcel_mail_in=*.

comment:10 Changed 7 months ago by kubahaha

How is it going? Since amenity=parcel_locker is added even to default carto style

comment:11 Changed 7 months ago by gaben

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 skyper

@gaben:
Please, go ahead. I might have time to comment but I won't work on it.

comment:13 Changed 6 months ago by gaben

Okay, currently investigating why the {0.key} is not working with the ~= selector. To my understanding, it should work.

Last edited 6 months ago by gaben (previous) (diff)

Changed 5 months ago by gaben

comment:14 Changed 5 months ago by gaben

Summary: [WIP patch] Deprecate vending=parcel_pickup[patch] Deprecate vending=parcel_pickup

Please review, I think it's done.

comment:15 in reply to:  13 Changed 5 months ago by skyper

Yes, much better but:

  • the warnings should check for amenity=vending_machine
    • not sure if we need to check for existing parcel_pickup=* and parcel_mail_in=* before overwriting
  • vending=parcel_mail_in and vending=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/

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 gaben

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 the deprecated.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 skyper

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 gaben

added amenity=vending_machine filter, remove deprecated vending values, remove amenity=parcel_locker from ignoretags.cfg

comment:18 Changed 5 months ago by gaben

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.

Last edited 5 months ago by gaben (previous) (diff)

comment:19 Changed 4 months ago by taylor.smock

Milestone: 22.1122.12

Milestone renamed

comment:20 Changed 3 months ago by taylor.smock

Milestone: 22.1223.01

Ticket retargeted after milestone closed

comment:21 Changed 3 months ago by taylor.smock

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 gaben

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 gaben

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 taylor.smock

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 taylor.smock

Milestone: 23.0123.02

Ticket retargeted after milestone closed

comment:26 Changed 4 weeks ago by taylor.smock

Milestone: 23.0223.03

Ticket retargeted after milestone closed

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 overflorian
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.