[Script] WME Validator v2020.11.1 (PLACES BETA)

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.

Moderators: Unholy, bextein, Glodenox, JustinS83

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.

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

Postby LeighGr » 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
Leigh Greyling
Redmi 8, Android 10.0.0, Waze: Whatever the latest beta is!
LC: South Africa
CM: Southern Africa
LeighGr
Waze Local Champs
Waze Local Champs
 
Posts: 469
Joined: Mon May 28, 2012 5:50 pm
Location: Durbanville, Cape Town, South Africa
Has thanked: 268 times
Been thanked: 123 times

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

Postby LeighGr » 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.
Leigh Greyling
Redmi 8, Android 10.0.0, Waze: Whatever the latest beta is!
LC: South Africa
CM: Southern Africa
LeighGr
Waze Local Champs
Waze Local Champs
 
Posts: 469
Joined: Mon May 28, 2012 5:50 pm
Location: Durbanville, Cape Town, South Africa
Has thanked: 268 times
Been thanked: 123 times

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

Postby LeighGr » 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:
Leigh Greyling
Redmi 8, Android 10.0.0, Waze: Whatever the latest beta is!
LC: South Africa
CM: Southern Africa
LeighGr
Waze Local Champs
Waze Local Champs
 
Posts: 469
Joined: Mon May 28, 2012 5:50 pm
Location: Durbanville, Cape Town, South Africa
Has thanked: 268 times
Been thanked: 123 times

Re: [Script] WME Validator 1.1.8 / 07.05.2015

Postby LeighGr » 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: 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",
Leigh Greyling
Redmi 8, Android 10.0.0, Waze: Whatever the latest beta is!
LC: South Africa
CM: Southern Africa
LeighGr
Waze Local Champs
Waze Local Champs
 
Posts: 469
Joined: Mon May 28, 2012 5:50 pm
Location: Durbanville, Cape Town, South Africa
Has thanked: 268 times
Been thanked: 123 times

Re: [Script] WME Validator 1.1.8 / 07.05.2015

Postby LeighGr » 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
Leigh Greyling
Redmi 8, Android 10.0.0, Waze: Whatever the latest beta is!
LC: South Africa
CM: Southern Africa
LeighGr
Waze Local Champs
Waze Local Champs
 
Posts: 469
Joined: Mon May 28, 2012 5:50 pm
Location: Durbanville, Cape Town, South Africa
Has thanked: 268 times
Been thanked: 123 times

Re: [Script] WME Validator 1.1.8 / 07.05.2015

Postby LeighGr » 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: 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
Leigh Greyling
Redmi 8, Android 10.0.0, Waze: Whatever the latest beta is!
LC: South Africa
CM: Southern Africa
LeighGr
Waze Local Champs
Waze Local Champs
 
Posts: 469
Joined: Mon May 28, 2012 5:50 pm
Location: Durbanville, Cape Town, South Africa
Has thanked: 268 times
Been thanked: 123 times

Re: [Script] WME Validator 1.1.10 / 05.11.2015

Postby LeighGr » 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.
Leigh Greyling
Redmi 8, Android 10.0.0, Waze: Whatever the latest beta is!
LC: South Africa
CM: Southern Africa
LeighGr
Waze Local Champs
Waze Local Champs
 
Posts: 469
Joined: Mon May 28, 2012 5:50 pm
Location: Durbanville, Cape Town, South Africa
Has thanked: 268 times
Been thanked: 123 times

Re: [Script] WME Validator 1.1.10 / 05.11.2015

Postby LeighGr » Fri Nov 06, 2015 5:12 am

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.
Leigh Greyling
Redmi 8, Android 10.0.0, Waze: Whatever the latest beta is!
LC: South Africa
CM: Southern Africa
LeighGr
Waze Local Champs
Waze Local Champs
 
Posts: 469
Joined: Mon May 28, 2012 5:50 pm
Location: Durbanville, Cape Town, South Africa
Has thanked: 268 times
Been thanked: 123 times

Re: [Script] WME Validator 0.4.2 (BETA) / 07.07.2014

Postby lelehman » Wed Jan 08, 2014 2:45 am

This is awesome! I've noticed I can't switch tabs while waiting to finish the scan - it appears to stop when I go to a different tab and then start over when I switch back. Nonetheless, this is a really helpful extension.
[ img ][ img ][ img ]
Rank 5
Mid-Michigan/Tri-Cities Area Manager, Metro Detroit UR Housekeeper
Ithaca, Michigan
Michigan subforum, Michigan wiki
lelehman
Area Manager
Area Manager
 
Posts: 41
Joined: Thu Jun 13, 2013 7:25 pm
Location: Ithaca, MI
Has thanked: 15 times
Been thanked: 20 times

Re: [Script] WME Validator 1.1.20 / 03.11.2016

Postby LennyNRPD » Wed Mar 15, 2017 5:09 pm

Worked for me. Thank you yet again Justin :D
LennyNRPD
State Manager
State Manager
 
Posts: 330
Joined: Fri Mar 18, 2016 12:05 pm
Location: Virginia
Has thanked: 112 times
Been thanked: 657 times

PreviousNext

Return to Addons, Extensions, and Scripts

Who is online

Users browsing this forum: jm6087