Mon Feb 24, 2014 11:44 pm
berestovskyy wrote:24.02.2014 v0.7.3:
- NEW for All 'BETA: Overlapping segments at node A/B'
- NEW for All 'BETA: Too sharp turn at node A/B'
- check IDs moved to the end of the check title
Mon Feb 24, 2014 11:48 pm
LeighGr wrote:berestovskyy wrote:24.02.2014 v0.7.3:
- NEW for All 'BETA: Overlapping segments at node A/B'
- NEW for All 'BETA: Too sharp turn at node A/B'
- check IDs moved to the end of the check title
Something isn't quite right. The only instruction I'm getting is "Zoom out to start WME Validator". I'm at zoom level 0, and can't go out anymore
Tue Feb 25, 2014 4:25 am
Sun Mar 02, 2014 8:35 am
Sun Mar 02, 2014 9:14 am
berestovskyy wrote:At the moment, Validator reports up to 300 segments per issue to save memory. So if you pan around the map for some time and there are more than 300 segments with 'Soft turns' for instance, Validator will stop highlighting soft turns, but will continue to highlight other issues.
When you reach the limit, the clear report button becomes red. If you click the button and start the report over, Validator will highlight soft turns and other issues again.
I'm aware that in some cities you can reach the limit almost instantly (there are too many soft turns or unknown directions), but I have no solution at the moment, sorry
Sun Mar 02, 2014 9:32 am
berestovskyy wrote:LeighGr wrote:Here's a segment breaking a couple of validation rules, but is not highlighted by WMEV
Validator does report 'Dead-end U-turn' and 'Soft turns on drivable road' on that segment, but please read below.
Thu Oct 01, 2015 7:17 pm
// Custom Check - Minor Highway Name Format
"137.enabled": true,
"137.params": {
"titleEN": "Incorrect name format on Minor Highway",
"problemEN": "All Minor Highways name format should be (R###) numbered > 100 ",
"solutionEN": "Change name to ... (R###)",
"template": "${typeRank}:${street}:${direction}",
"regexp": "/(13):(?!R[0-9]{3} [NESW]:(1|2) ?|(R[0-9]{3}:(3))$)/"
},
"137.solutionLink": "W:South_Africa#Road_Network",
Fri Oct 02, 2015 11:25 am
Tue Oct 06, 2015 6:26 pm
xanderb wrote:LeighGr wrote:I'm busy creating a WMEV localization pack for South Africa, but am bashing my head against a wall with some weird errors. The following code works fine for mH segments named R100 to R512, and then again from R516 onwards, but R513, R514 and R515 all get flagged as incorrect. WHY?????
I was taking a look at this and the typerank 13: at the beginning of the code is still catching the 13: in the street area for R513 and R413, etc. in PesachZ's code. Here is debug:
1. Expand template: ${typeRank}:${street}:${direction} -> 13:R513:3
2. Match RegExp: /(13):(?!R[0-9]{3} [NESW]:(1|2) ?|(R[0-9]{3}:(3))$)/ -> ["13:","13",null,null,null]
=> REPORT the segment as #129 'User-defined custom check (blue)'
1. Expand template: ${typeRank}:${street}:${direction} -> 13:R413:3
2. Match RegExp: /(13):(?!R[0-9]{3} [NESW]:(1|2) ?|(R[0-9]{3}:(3))$)/ -> ["13:","13",null,null,null]
=> REPORT the segment as #129 'User-defined custom check (blue)'
What I did to work around that is use a # as the initial separator in the template and regex. See if this works better for you.
- Code:
Custom template: ${typeRank}#${street}:${direction}
Custom RegExp: /13#(?!((R[1-9]\d\d):3|(R[1-9]\d\d [SNEW]):[12]))/
PesachZ wrote:LeighGr wrote:I'm busy creating a WMEV localization pack for South Africa, but am bashing my head against a wall with some weird errors. The following code works fine for mH segments named R100 to R512, and then again from R516 onwards, but R513, R514 and R515 all get flagged as incorrect. WHY?????
- Code:
// Custom Check - Minor Highway Name Format
"137.enabled": true,
"137.params": {
"titleEN": "Incorrect name format on Minor Highway",
"problemEN": "All Minor Highways name format should be (R###) numbered > 100 ",
"solutionEN": "Change name to ... (R###)",
"template": "${typeRank}:${street}:${direction}",
"regexp": "/(13):(?!R[0-9]{3} [NESW]:(1|2) ?|(R[0-9]{3}:(3))$)/"
},
"137.solutionLink": "W:South_Africa#Road_Network",
513 is being flagged because you are not anchoring and it is matching the 13:R513:3 from the string produced by your template.
you could try this and see if works better for you.
- Code:
"regexp": "/^13:(?!(R[1-9]\\d{2}( [NESW]:[12] ?|:3))$)/"
I also noticed you are allowing an optional space in the string after the direction on one-way segments, not sure why you would want that, but I did include it. I moved the anchors and groups around a bit to accomplish what I think you want.
"/(13):(?!R[0-9]{3} [NESW]:(1|2) ?|(R[0-9]{3}:(3))$)/"
Edit: your code also allowed numbers <100 such as R099, as long as they were 3 digits. I updated it to only allow >100.
Edit2: shortened code, should still work the same
Fri Nov 06, 2015 4:27 am