Skip to content

Update analyser_osmosis_relation_associatedStreet.py #2517

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

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

Stefal
Copy link
Contributor

@Stefal Stefal commented Jun 7, 2025

Update title to reflect the community choice to use addr:street/place on nodes for addresses.

Update title to reflect the community choice to use addr:street/place on nodes for addresses.
@frodrigo
Copy link
Contributor

frodrigo commented Jun 7, 2025

Your version has not the same meaning.

The opposite would be "addr:housenumber or addr:housename outside of associatedStreet relation need to have addr:street, addr:district, addr:neighbourhood, addr:quarter, addr:suburb, addr:place or addr:hamlet".

But the two means the same and more over we try to avoid changing as it would flag the string to be as reviewed in all translation.

@Stefal
Copy link
Contributor Author

Stefal commented Jun 7, 2025

I don't understand.
I see errors reported with this analyzer on objects which are not member of an associatedStreet.

@frodrigo
Copy link
Contributor

frodrigo commented Jun 7, 2025

objects which are not member of an associatedStreet.

The missing relation is part of the issue.

You should have at least one tag of addr:street, addr:district, addr:neighbourhood, addr:quarter, addr:suburb, addr:place, addr:hamlet or a relation.

@Stefal
Copy link
Contributor Author

Stefal commented Jun 7, 2025

The missing relation is part of the issue.

That's my point, Osmose should not ask the end user to add a relation.

@frodrigo
Copy link
Contributor

frodrigo commented Jun 7, 2025

Why not ? mapping with addr:* or relation are both valid and documented way of doing this https://wiki.openstreetmap.org/wiki/Addresses

@Stefal
Copy link
Contributor Author

Stefal commented Jun 7, 2025

The recommended method in France (and many other country) is without associatedStreet relation.

@frodrigo
Copy link
Contributor

frodrigo commented Jun 7, 2025

The relation is not documented as a deprecated feature.

This issue maybe be raised because a relation exist an just this address is not yet part of it.

In Osmose, we try include a all valid way of mapping, and do not enforce one way of doing.

@Stefal
Copy link
Contributor Author

Stefal commented Jun 7, 2025

This issue maybe be raised because a relation exist an just this address is not yet part of it.

I would be agree with this analyzer if an associatedStreet relation exists very close to the node, but this is not what I see.
Example:
image

There is no associatedStreet relation in the surrounding area. And the right fix is not a relation, but a addr:place= tag

In Osmose, we try include a all valid way of mapping, and do not enforce one way of doing.

The title says: "must be in a associatedStreet relation".
It doesn't say "add a addr:street/place/... tag or add this node to an associatedStreet relation".

If you insists to keep the associatedStreet mention, we could change the Title to something like
addr:housenumber or addr:housename without addr:street, addr:district, addr:neighbourhood, addr:quarter, addr:suburb, addr:place or addr:hamlet. Please add the missing addr:* tag, or add the node to an associatedStreet relation

@Famlam
Copy link
Collaborator

Famlam commented Jun 7, 2025

How about adding a fix message that clearly specifies the two possible options? I also agree the current message is suboptimal

@@ -614,7 +614,7 @@ class Analyser_Osmosis_Relation_AssociatedStreet(Analyser_Osmosis):
def __init__(self, config, logger = None):
Analyser_Osmosis.__init__(self, config, logger)
self.classs[1] = self.def_class(item = 2060, level = 3, tags = ['addr', 'relation', 'fix:chair'],
title = T_('addr:housenumber or addr:housename without addr:street, addr:district, addr:neighbourhood, addr:quarter, addr:suburb, addr:place or addr:hamlet must be in a associatedStreet relation'),
title = T_('addr:housenumber or addr:housename without addr:street, addr:district, addr:neighbourhood, addr:quarter, addr:suburb, addr:place or addr:hamlet need a addr:street or addr:place tag'),
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
title = T_('addr:housenumber or addr:housename without addr:street, addr:district, addr:neighbourhood, addr:quarter, addr:suburb, addr:place or addr:hamlet need a addr:street or addr:place tag'),
title = T_('addr:housenumber or addr:housename without tags addr:street, addr:district, addr:neighbourhood, addr:quarter, addr:suburb, addr:place or addr:hamlet or in a associatedStreet relation'),

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think this isn't grammatically correct?
How about:
addr:housenumber or addr:housename without addr:street, addr:district, addr:neighbourhood, addr:quarter, addr:suburb, addr:place or addr:hamlet, and also not in an associatedStreet relation?
Or something like:
addr:housenumber or addr:housename without sufficient higher-level address tags or associatedStreet relation.
(And move the details to a details or fix message)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants