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.
Post by LeighGr
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.
LeighGr
Waze Local Champs
Waze Local Champs
Posts: 469
Has thanked: 251 times
Been thanked: 110 times
Send a message
Leigh Greyling
Redmi 8, Android 10.0.0, Waze: Whatever the latest beta is!
LC: South Africa
CM: Southern Africa

Post by LeighGr
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.
LeighGr
Waze Local Champs
Waze Local Champs
Posts: 469
Has thanked: 251 times
Been thanked: 110 times
Send a message
Leigh Greyling
Redmi 8, Android 10.0.0, Waze: Whatever the latest beta is!
LC: South Africa
CM: Southern Africa

Post by LeighGr
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
LeighGr
Waze Local Champs
Waze Local Champs
Posts: 469
Has thanked: 251 times
Been thanked: 110 times
Send a message
Leigh Greyling
Redmi 8, Android 10.0.0, Waze: Whatever the latest beta is!
LC: South Africa
CM: Southern Africa

Post by LeighGr
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.
LeighGr
Waze Local Champs
Waze Local Champs
Posts: 469
Has thanked: 251 times
Been thanked: 110 times
Send a message
Leigh Greyling
Redmi 8, Android 10.0.0, Waze: Whatever the latest beta is!
LC: South Africa
CM: Southern Africa

Post by LeighGr
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:
LeighGr
Waze Local Champs
Waze Local Champs
Posts: 469
Has thanked: 251 times
Been thanked: 110 times
Send a message
Leigh Greyling
Redmi 8, Android 10.0.0, Waze: Whatever the latest beta is!
LC: South Africa
CM: Southern Africa

Post by LeighGr
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: Select all

// 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", 
LeighGr
Waze Local Champs
Waze Local Champs
Posts: 469
Has thanked: 251 times
Been thanked: 110 times
Send a message
Leigh Greyling
Redmi 8, Android 10.0.0, Waze: Whatever the latest beta is!
LC: South Africa
CM: Southern Africa

Post by LeighGr
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
LeighGr
Waze Local Champs
Waze Local Champs
Posts: 469
Has thanked: 251 times
Been thanked: 110 times
Send a message
Leigh Greyling
Redmi 8, Android 10.0.0, Waze: Whatever the latest beta is!
LC: South Africa
CM: Southern Africa

Post by LeighGr
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: Select all

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: Select all

// 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: Select all

"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
LeighGr
Waze Local Champs
Waze Local Champs
Posts: 469
Has thanked: 251 times
Been thanked: 110 times
Send a message
Leigh Greyling
Redmi 8, Android 10.0.0, Waze: Whatever the latest beta is!
LC: South Africa
CM: Southern Africa

Post by LeighGr
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.
LeighGr
Waze Local Champs
Waze Local Champs
Posts: 469
Has thanked: 251 times
Been thanked: 110 times
Send a message
Leigh Greyling
Redmi 8, Android 10.0.0, Waze: Whatever the latest beta is!
LC: South Africa
CM: Southern Africa

Post by LeighGr
Fredo-p wrote: I had the old road layer assigned to shift-r. When the new update came out, it left it blank. I had to use TB to assign shift-r to the new road layer. Since Validator updates, I haven't had it switched on me.
Oops. Wrong topic. Should have been WME v1.12 Release.

Thanks. I'd forgotten about the TB keyboard shortcut editor. Assigned shift-r t to the roads layer, and now it's working again.
LeighGr
Waze Local Champs
Waze Local Champs
Posts: 469
Has thanked: 251 times
Been thanked: 110 times
Send a message
Leigh Greyling
Redmi 8, Android 10.0.0, Waze: Whatever the latest beta is!
LC: South Africa
CM: Southern Africa