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

No label / feature for post boxes #4916

Closed
Helium314 opened this issue Mar 31, 2023 · 11 comments · Fixed by #5970
Closed

No label / feature for post boxes #4916

Helium314 opened this issue Mar 31, 2023 · 11 comments · Fixed by #5970
Assignees
Labels

Comments

@Helium314
Copy link
Collaborator

(works with iD presets 5.2.1)
Post boxes don't have a label (text below the question) any more, because the feature search returns nothing. This matters for the check existence quest, which requires a feature to be asked.

Search works when either using iD presets v5.2.1, or when searching by country (though results may obviously depend on country). Seems in iD presets 6.0.0 it's assumed post boxes are only a local thing for some reason...

Anyway, similar things might be happening for other features, just no one noticed. Maybe feature search should always specify a country?

@matkoniecz
Copy link
Member

Seems to be about amenity=post_box

@westnordost
Copy link
Member

westnordost commented Mar 31, 2023

So this is still an issue now? Was/ is this an issue with the data or an issue with the osmfeatures library?

@matkoniecz
Copy link
Member

Currently for some reason, with correct OSM data, StreetComplete appears to be unable to get label for amenity=post_box and therefore it is not included in CheckExistence quest.

Maybe StreetComplete needs to provide extra info to osmfeatures library, maybe osmfeatures ignores entries with locationSet.

By looking at https://github.com/search?q=repo%3Awestnordost%2Fosmfeatures%20locationSet&type=code - it seems that it should be supported?

@Helium314
Copy link
Collaborator Author

fun FeatureDictionary.getFeatureName(
configuration: Configuration,
tags: Map<String, String>,
geometryType: GeometryType? = null,
): String? = this
.byTags(tags)
.isSuggestion(false)
.forLocale(*getLocalesForFeatureDictionary(configuration))
.forGeometry(geometryType)
.find()
.firstOrNull()
?.name

returns null for amenity=post_box.
But it works when providing a (any?) country using .inCountry(countryOrSubdivisionCode).

Apparently this is because of locationSet that excludes GB and US in iD presets.
So in iD presets there is no generic world wide post box feature, and thus I see the point of osmfeatures not returning anything without specifying a country.

@westnordost
Copy link
Member

That it doesn't work correctly in osmfeatures may have something to do with that finding features is done based on indices rather than rummaging through the whole and ever-growing list of presets (in particular, for NSI) - for performance reasons. Now, the indices are based on per-country-basis only for NSI features, not normal presets, because the assumption is that an OSM feature that can exist in one country can exist in another too.

And this assumption is still true: Postboxes in the US are not something different from postboxes elsewhere. They are only a separate feature in the iD presets now to shoehorn an additional suggested field into the preset - whether it is drive-through or not.
But I think this is semantically wrong, and also from an architectural point of view, a dead-end: Postboxes in the UK are not something else altogether from postboxes in other countries only because OpenStreetMappers like to tag the royal_cipher on it. Semantically, it is not the preset itself that is country-specific, but the individual fields are.
If one looks closely enough, as we in StreetComplete development regularly do, one will find that there are tons of fields that are only in use in specific countries and thus should only be suggested (by UI) to be added there. For example, designation=* with certain values, such as barangay are used in the Phillippines and in the Phillippines only. Now, using the same approach as for the post boxes would mean that many of the highway=... presets must be duplicated and one field be added. If one goes down this path more, the iD presets will quickly become an unmaintainable mess.

I'll create a ticket at the iD presets, hopefully the maintainers see the issue, too. In a nutshell: There should be suggested fields of presets that are country-specific.

@westnordost
Copy link
Member

ideditor/schema-builder#94

@matkoniecz
Copy link
Member

matkoniecz commented Nov 28, 2023

got response, it seems to be wontfixed

@westnordost
Copy link
Member

I created an issue in osmfeatures.

@FloEdelmann
Copy link
Member

FloEdelmann commented Apr 3, 2024

For clarification (there was confusion e.g. in #5572): This issue still persists and is still blocked by:

@riQQ

This comment was marked as resolved.

@matkoniecz matkoniecz pinned this issue Oct 3, 2024
@westnordost westnordost self-assigned this Oct 16, 2024
@westnordost westnordost removed the blocked blocked by another issue label Oct 16, 2024
westnordost added a commit that referenced this issue Oct 16, 2024
…ion the element is contained in for finding the feature (#4916)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
5 participants