Opened 10 years ago
Closed 10 years ago
#11568 closed defect (invalid)
∈ gives false positives in validator rules
Reported by: | Dakon | Owned by: | team |
---|---|---|---|
Priority: | normal | Milestone: | |
Component: | Core validator | Version: | tested |
Keywords: | Cc: |
Description
I suspect it also give false negatives, but that is just a feeling, I don't have a testcase for this. Hopefully it will go away when fixing this bug.
Testcase: download boundingbox:
min lat 51.3480512 min lon 9.5280325
max lat 51.3487414 max lon 9.530232
Use this validator rule:
node[railway=signal][operator] ∈ way[railway][operator]
{
throwWarning: "operator is not necessary for signals if equal to track operator";
/* assertMatch: "node railway=signal operator=DB ∈ way railway=rail operator=DB"; */
assertNoMatch: "node railway=signal";
assertNoMatch: "node railway=signal operator=DB";
assertNoMatch: "way railway=rail operator=DB";
assertNoMatch: "way railway=rail operator=DB";
}
It finds 3 matches when I use it, but in all 3 cases the signal (node) is not part of the railway line (way). On another host it finds only one of these matches, but has the same problem.
The complete validator file used can be found here:
https://github.com/DerDakon/OpenRailwayMap/blob/7861f56d3ba7455ffd21c5bec0fb681d97d7f186/validator/openrailwaymap.validator.mapcss
If you want to test nodes being part of a way, use
>
instead of∈
. See Help/Styles/MapCSSImplementation for more information.