Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

individual name for places of a brand #5985

Open
tiptoptom opened this issue Oct 25, 2024 · 20 comments
Open

individual name for places of a brand #5985

tiptoptom opened this issue Oct 25, 2024 · 20 comments
Labels
blocked blocked by another issue bug upstream result from an upstream issue

Comments

@tiptoptom
Copy link
Contributor

tiptoptom commented Oct 25, 2024

How to Reproduce
Try to add a place in the places overlay of a brand with an individual name for example:

shop=supermarket
brand=EDEKA
brand:wikidata=Q701755
name=EDEKA Schreiber

At the moment you cannot set an individual name for a place of a brand in the places overlay.


Or try to add the brand tag in the places overlay to a place that already has an individual name:

shop=supermarket
name=EDEKA Schreiber

The name tag is currently overwritten and the following tagging is obtained:

shop=supermarket
brand=EDEKA
brand:wikidata=Q701755
name=EDEKA

Expected Behavior

  1. For places of a brand there should still be field to enter an individual name or at least an option to open such a field.
  2. The name tag of a place shouldn't be overridden when a brand is set. It should also be displayed and editable.

Versions affected

59.2

Issues that may have a certain relationship
#4688
#5313
#5940

Wiki
https://wiki.openstreetmap.org/wiki/Key:brand#Examples

@tiptoptom tiptoptom added the bug label Oct 25, 2024
@westnordost
Copy link
Member

If EDEKAs usually have each an own name, why is name specified at all for the EDEKA brand?

@westnordost
Copy link
Member

I.e. the preset should rather add brand=EDEKA rather than name=EDEKA when name is always different.

@tiptoptom
Copy link
Contributor Author

I don't know whether the name is always different in the case of Edeka or whether it is only occasionally like that. Nevertheless, there is also no option to enter or change the name.

@westnordost
Copy link
Member

For SC it is not possible to "detect" that "EDEKA Schreiber" is actually an "EDEKA" and henceforth should not be overwritten by the preset.
So, the only solution is to always show and let the user edit the name field, which I would really like to avoid in the case of brands.

@tiptoptom
Copy link
Contributor Author

Would it be a solution, if the name does not match NSI, not to overwrite it but to display it in a field. And if the name matches NSI, to hide the field and only make it visible via the three-dot menu.

@tiptoptom
Copy link
Contributor Author

Maybe the branch key could help here? 🤨🤷
https://wiki.openstreetmap.org/wiki/Key:branch

@westnordost
Copy link
Member

westnordost commented Oct 25, 2024

Would it be a solution, if the name does not match NSI, not to overwrite it but to display it in a field.

That would be very weird. Imagine there was a completely different shop in there before, you select "EDEKA" and the old name is still in the name field!

Anyway, actually, what exactly were you doing, by the way? You added a new EDEKA?

@westnordost
Copy link
Member

iD locks the brand field for EDEKA, but not the name field:

imagen

For ALDI, it looks different:

imagen

@tiptoptom
Copy link
Contributor Author

Would it be a solution, if the name does not match NSI, not to overwrite it but to display it in a field.

That would be very weird. Imagine there was a completely different shop in there before, you select "EDEKA" and the old name is still in the name field!

No, because in this case the “Is it a different place now?” window would open. If “Different place now” is then selected, the name must of course be overwritten.

Anyway, actually, what exactly were you doing, by the way? You added a new EDEKA?

I have selected the NSI preset for Edeka for an object with the following tags:

shop=supermarket
name=EDEKA Schreiber

@westnordost
Copy link
Member

I have selected the NSI preset for Edeka for an object with the following tags

But why? And why did you change it?

@tiptoptom
Copy link
Contributor Author

I have selected the NSI preset for Edeka for an object with the following tags

But why? And why did you change it?

Because brand=EDEKA and brand:wikidata=Q701755 were missing.

@westnordost
Copy link
Member

Anyway, the NSI presets for the screenshots above are

"shop/supermarket/edeka-0a839e": {
  "name": "EDEKA",
  "locationSet": {"include": ["de"]},
  "icon": "maki-grocery",
  "geometry": ["point", "area"],
  "matchScore": 2,
  "imageURL": "https://graph.facebook.com/EDEKA/picture?type=large",
  "terms": ["e neukauf", "edeka", "edeka neukauf"],
  "fields": ["name", "brand", "{shop/supermarket}"],
  "tags": {"brand:wikidata": "Q701755", "shop": "supermarket"},
  "addTags": {
    "brand": "EDEKA",
    "brand:wikidata": "Q701755",
    "name": "EDEKA",
    "shop": "supermarket"
  }
},
"shop/supermarket/aldi-813759": {
  "name": "ALDI Nord (Deutschland)",
  "locationSet": {"include": ["de"], "exclude": ["aldi-sued.geojson"]},
  "icon": "maki-grocery",
  "geometry": ["point", "area"],
  "matchScore": 2,
  "imageURL": "https://commons.wikimedia.org/wiki/Special:FilePath/AldiNord-WorldwideLogo.svg",
  "terms": ["aldi nord"],
  "tags": {"brand:wikidata": "Q41171373", "shop": "supermarket"},
  "addTags": {
    "brand": "ALDI Nord",
    "brand:wikidata": "Q41171373",
    "name": "Aldi",
    "shop": "supermarket"
  }
},

In conclusion, I have no idea how iD is able to treat these two differently.

Maybe @kjonosm knows?

@westnordost
Copy link
Member

Because brand=EDEKA and brand:wikidata=Q701755 were missing.

But StreetComplete didn't display them as missing.

@Cj-Malone
Copy link
Contributor

In conclusion, I have no idea how iD is able to treat these two differently.

preserveTags

https://nsi.guide/index.html?t=brands&k=shop&v=supermarket&tt=edeka#edeka-0a839e

But branch is usually the real answer.

@tiptoptom
Copy link
Contributor Author

Because brand=EDEKA and brand:wikidata=Q701755 were missing.

But StreetComplete didn't display them as missing.

Not directly, but you can see a difference.

d97c63c7-6e09-4a9b-8ea4-68a352f29a56
fde6c4be-461b-4305-b06b-318e7e1c78cc

@westnordost
Copy link
Member

@Cj-Malone but where is preserveTags? I don't see it in the presets.json

@Cj-Malone
Copy link
Contributor

It's in nsi.json

@westnordost
Copy link
Member

Hmm, StreetComplete and osmfeatures doesn't use that file at all. It seems to be somewhat of the nsi-id-presets.json but in a different format. The entry for EDEKA in nsi.json is:

{
  "displayName": "EDEKA",
  "id": "edeka-0a839e",
  "locationSet": {"include": ["de"]},
  "matchNames": ["e neukauf", "edeka neukauf"],
  "preserveTags": ["^name"],
  "tags": {"brand": "EDEKA", "brand:wikidata": "Q701755", "name": "EDEKA", "shop": "supermarket"}
},

@westnordost
Copy link
Member

westnordost commented Oct 25, 2024

I created an issue at NSI to include this information also in the nsi-id-presets.json distribution, arguing that this is necessary information to correctly make use of the NSI. osmlab/name-suggestion-index#10083

If this is included, then we can do the following:

  1. add parsing support for this tag in the osmfeatures library
  2. if for the selected preset the "preserveTags" is "^name", then display the text field for the input of a name (pre-filled with the preset's name, but the user can change it).

@westnordost westnordost added blocked blocked by another issue upstream result from an upstream issue labels Oct 25, 2024
@tiptoptom
Copy link
Contributor Author

tiptoptom commented Oct 26, 2024

Sounds good. I would also display the text field if the name is not part of the NSI preset.
Here are some examples:
https://nsi.guide/index.html?t=brands&k=office&v=political_party

EDIT: Never mind this already happens.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
blocked blocked by another issue bug upstream result from an upstream issue
Projects
None yet
Development

No branches or pull requests

3 participants