Modify

Opened 5 years ago

Closed 5 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:

Description

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);
}
node[prop(street_error)=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 Changed 5 years ago by Don-vip

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

comment:2 Changed 5 years ago by Klumbumbus

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

comment:3 Changed 5 years ago by Don-vip

Milestone: 14.08

comment:4 Changed 5 years ago by Don-vip

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
Action
as closed The owner will remain team.
as The resolution will be set.
The resolution will be deleted.

Add Comment


E-mail address and name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.