Opened 10 years ago

Closed 10 years ago

#10438 closed enhancement (fixed)

validator could give an error if addr:street ≠ name of associated street relation

Reported by: Klumbumbus Owned by: team
Priority: normal Milestone: 14.08
Component: Core validator Version:
Keywords: Cc:


Often address nodes or buildings which are part of an associatedStreet relation have addr:street anyway.
JOSM validator could warn if addr:street does not match the name of the associated street relation.

I tried to create the validator code:

relation[type="associatedStreet"][name] > node["addr:street"],
relation[type="associatedStreet"][name] > area["addr:street"] {
    street_error: cond(parent_tag(name)=tag("addr:street"), false , true);
area[prop(street_error)=true] {
    throwError: tr("addr:street ≠ name of associated street relation");

This is the simplest way I can imagine how this test could work. However it does not work for validator.mapcss files. It seems the validator doesn't support properties. Is there an easier way for the code, or would it be possible to improve the validator or should we simply drop this test?

Attachments (0)

Change History (4)

comment:1 by Don-vip, 10 years ago

There's already a Java test in source:trunk/src/org/openstreetmap/josm/data/validation/tests/ which detects different street names among member ways, it could be extended instead of implementing this one via MapCSS.

comment:2 by Klumbumbus, 10 years ago

Yes would be better. I didn't know about Java tests for the validator before.

comment:3 by Don-vip, 10 years ago

Milestone: 14.08

comment:4 by Don-vip, 10 years ago

Resolution: fixed
Status: newclosed

In 7464/josm:

fix #10438 - give an error if addr:streetname of associatedStreet relation

Modify Ticket

Change Properties
Set your email in Preferences
as closed The owner will remain team.
as The resolution will be set.
The resolution will be deleted. Next status will be 'reopened'.

Add Comment

E-mail address and name can be saved in the Preferences .
Note: See TracTickets for help on using tickets.