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: |
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 by , 10 years ago
comment:2 by , 10 years ago
Yes would be better. I didn't know about Java tests for the validator before.
comment:3 by , 10 years ago
Milestone: | → 14.08 |
---|
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.