Modify

Opened 9 years ago

Closed 9 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

Attachments (0)

Change History (1)

comment:1 by simon04, 9 years ago

Resolution: invalid
Status: newclosed

It finds 3 matches when I use it, but in all 3 cases the signal (node) is not part of the railway line (way).

If you want to test nodes being part of a way, use > instead of . See Help/Styles/MapCSSImplementation for more information.

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. 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.