Switch to full style
Discussion for the unofficial, community-developed addons, extensions and scripts built for the Waze Map Editor.

The official index of these tools is the Community Plugins, Extensions and Tools wiki page.

Forum rules

Discussion for the unofficial, community-developed addons, extensions and scripts built for the Waze Map Editor.

DO NOT START a new thread unless it is about a new idea. Keep discussion of existing tools within the main thread for that tool.

The official index of these tools is the Community Plugins, Extensions and Tools wiki page.
Post a reply

Re: [Script] WME Validator 0.7.3 (BETA) / 24.02.2014

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


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 :)

Re: [Script] WME Validator 0.7.3 (BETA) / 24.02.2014

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 :)


:oops: Sorry, Brain dead. Validator was disabled. :oops: Though not the right error message, should be more like "Click the button below to enable"!

Repeatable by disabling WMEV, then pressing the "Clear the report and segment cache" button, and you're left with a "Zoom out to start WME Validator" message.

Re: [Script] WME Validator 0.7.3 (BETA) / 24.02.2014

Tue Feb 25, 2014 4:25 am

Here's an example of rule "#119 The segment is overlapping with the adjacent segment at node B." being triggered, but it's actually an unneeded geometry point that needs to be removed, so possibly a changed to the resolution wording:

Spread the segments at 2° or delete the duplicate segment or unneeded geometry point at node A/B.

Re: [Script] WME Validator 0.7.4 (BETA) / 28.02.2014

Sun Mar 02, 2014 8:35 am

Hi berestovskyy

Here's a segment breaking a couple of validation rules, but is not highlighted by WMEV, though a modified WMECH to highlight bad street names in South Africa does pick it up.

The street name is a single period(.) and the dead end u-turn is enabled.

I couldn't figure out what the two black dots on the screen were, as they moved when I panned around. :)

Regards,

Leigh

Re: [Script] WME Validator 0.7.4 (BETA) / 28.02.2014

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 :(


Thanks, I'd forgotten that. I'd zoomed right out, ran the scan which took for 10 minutes - that only should have jogged my memory :oops: Next time I'll clear the report and rerun the scan at a higher zoom level.

Re: [Script] WME Validator 0.7.4 (BETA) / 28.02.2014

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.


:oops: Now I feel like a right royal idiot. I had disabled Validator, then ran the scan, and hadn't turned Validator on again. Just enabled it and the whole map lit up. :oops:

Re: [Script] WME Validator 1.1.8 / 07.05.2015

Thu Oct 01, 2015 7:17 pm

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",

Re: [Script] WME Validator 1.1.8 / 07.05.2015

Fri Oct 02, 2015 11:25 am

Just when I though I knew a tiny bit about regex, and now you've blown that idea away. :D I haven't got to anchors in the tutorial yet, but once I do, I'll try figure out what you did, and why.

But alas, that change only work for R513. R514 & R515 are still being flagged as incorrect.

No, no. That's not strictly true, as mH R514 is flagged as having the incorrect MH name format, and mH R515 as having the incorrect FW name format, so I've obviously screwed up something else further down the script.

So let me go back to school for me this weekend, work out why that works, and then apply that to the other two checks, as I'm sure that will fix them too.

Many thanks for your help and suggestion.

Leigh

Re: [Script] WME Validator 1.1.8 / 07.05.2015

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

PesachZ's code is in the middle of the reply, not the one at the bottom, which is exactly the same as my screwed one. It does work, and worked even better when I fixed the MH and FW custom checks with the same changes.

Sent from my SM-N9005 using Tapatalk

Re: [Script] WME Validator 1.1.10 / 05.11.2015

Fri Nov 06, 2015 4:27 am

Is the Shift-R keyboard shortcut to toggle the roads layer working for everyone else? If it is, then I've got another program/script grabbing that keystroke.

All the other shortcuts seem to work fine.
Post a reply