[Script] WME Validator 2020.04.12 (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 1.1.6 / 06.01.2015

Postby sketch » Thu Feb 26, 2015 6:01 pm

voludu2 wrote:SuperDave, is this Mall in Reno within your editable area?
Validator is designed to only check segments you can edit.

Just for you, I strove to test this properly, in a way that anyone can replicate:

HOW I TESTED
I disabled EVERY WME script other than validator. I picked a reproducible PL from your image: https://www.waze.com/editor/?env=usa&lo ... s=74223083


And I constructed a typeRank filter to highlight every road with a numeric typeRank
${typeRank}
/[0-9].*/

WHAT I OBSERVED:
* What I see is all roads I can edit highlighted
+ In Reno -- 0 roads
+ In my editable area -- everything not locked above my rank
* Nothing highlighted outside my editable areas.
* If I select a segment outside my editable area with a lock level < or = my editing rank, then the left pane says " User-defined custom check (green)" even though it is not highlighted
* If I select a segment with a lock level > my editing rank, then the left pane says "The segment is not checked"

BTW, the "Exclude non-editable segments" on the front page of Validator settings will change this behavior.

Also – if you want ${typeRank} with any digit value, try /[0-9]+/

The formula you're currently using will give you any typeRank that starts with a digit 0-9 and has any sort of subsequent characters at all, so, 1 or 23 or 4567 or 8ffgsdgrsfg. Not that it really matters in this case, but in the future, if you are looking for numbers only: "+" and "*" affect the character or group right behind it; "*" means "zero or more", and "+" means "one or more"; and "." is a wildcard. So ".*" means "zero or more of any characters at all", whereas "[0-9]+" means "one or more digits".
ALL US EDITORS READ: New USA road type guidance
assistant regional coordinator • south central region • usa
waze global champ • beta leader • tier one • new orleans
2017 chevrolet ss sedan 6mt • slipstream blue metallic
[ img ] [ img ]
sketch
Waze Global Champs
Waze Global Champs
 
Posts: 6537
Joined: Sat Aug 08, 2009 6:13 pm
Location: Nouvelle-Orléans, Louisiane, États-Unis
Has thanked: 2211 times
Been thanked: 2673 times

Re: [Script] WME Validator 1.1.6 / 06.01.2015

Postby sketch » Thu Feb 26, 2015 7:02 pm

PesachZ wrote:While we're on the topic you can substitute [0-9] with /d
So a search for ^/d+$ will find any string of any length containing exclusively numbers.
For more details see RegEx Tutorial

Sent using Tapatalk for Android 4.4.2

It's \d not /d. Backslashes are used to escape what would otherwise be normal letters. \d is any digit, \w is a word character (iirc it's [A-Za-z0-9]), \b is a word boundary (meaning a space or begin/end of string, or maybe something else)...
ALL US EDITORS READ: New USA road type guidance
assistant regional coordinator • south central region • usa
waze global champ • beta leader • tier one • new orleans
2017 chevrolet ss sedan 6mt • slipstream blue metallic
[ img ] [ img ]
sketch
Waze Global Champs
Waze Global Champs
 
Posts: 6537
Joined: Sat Aug 08, 2009 6:13 pm
Location: Nouvelle-Orléans, Louisiane, États-Unis
Has thanked: 2211 times
Been thanked: 2673 times

Re: [Script] WME Validator 1.1.6 / 06.01.2015

Postby sketch » Thu Mar 05, 2015 11:22 pm

carloslaso wrote:I think I have searched but I have found nothing about FW, MH and mH with city names, I tried some Regex and failed :?

You want to highlight every FW, MH, mH with a city name?

Code: Select all
${typeRank}:${city}
/1[3-5]:.+$/


1[3-5] == typeRank 13, 14, 15 are mH, MH, FW, respectively
: == separates typeRank from city
.+ == one or more of any characters
$ == end of string
ALL US EDITORS READ: New USA road type guidance
assistant regional coordinator • south central region • usa
waze global champ • beta leader • tier one • new orleans
2017 chevrolet ss sedan 6mt • slipstream blue metallic
[ img ] [ img ]
sketch
Waze Global Champs
Waze Global Champs
 
Posts: 6537
Joined: Sat Aug 08, 2009 6:13 pm
Location: Nouvelle-Orléans, Louisiane, États-Unis
Has thanked: 2211 times
Been thanked: 2673 times

Re: [Script] WME Validator 1.1.6 / 06.01.2015

Postby sketch » Fri Mar 06, 2015 6:42 pm

Yeah! Well done implementation. I realized that a month or two ago and have been using implementations like this:

${street}#${altStreet[#]}
/(^|#)US-167 [NS](#|$)/

But yours is even easier to use!
ALL US EDITORS READ: New USA road type guidance
assistant regional coordinator • south central region • usa
waze global champ • beta leader • tier one • new orleans
2017 chevrolet ss sedan 6mt • slipstream blue metallic
[ img ] [ img ]
sketch
Waze Global Champs
Waze Global Champs
 
Posts: 6537
Joined: Sat Aug 08, 2009 6:13 pm
Location: Nouvelle-Orléans, Louisiane, États-Unis
Has thanked: 2211 times
Been thanked: 2673 times

Re: [Script] WME Validator 1.1.7 / 06.03.2015

Postby sketch » Tue Apr 07, 2015 5:46 pm

ispyisail wrote:I have enough trouble with the easy stuff :(

Could you show us an example?

Not that it makes it any easier to understand ... or very much shorter ;)
Code: Select all
 !/( Unknown Name| A(ly|ve)| B(l?vd|ridge|nd|ypass|rae|(ike|us)way)| C([lrt]|hase|ove|res|ir)| D(ell|r)| E(ast|nt|xit|splanade)| F(wy|all)| G(r|ln|rv|r(ee)?n|dns?|ate)| H(ts|wy|ospital)| Jct| L(ink|ine|[np])| M(twy|w|ile|ohr|ews)| North| One| P(ark|rom|de|l|kwy|oint)| R([id]|ow|ise|amp|ailway|un(way)?)| S(outh|pur|upermarket|[qt])| T(ce|unnel|urn|rl|ra(k|il))| V((ie)?w|st)| W(ay|est|ynd)| Xing|^$)$|^(State |The |E(xit( to:)?|ntry) )/
ALL US EDITORS READ: New USA road type guidance
assistant regional coordinator • south central region • usa
waze global champ • beta leader • tier one • new orleans
2017 chevrolet ss sedan 6mt • slipstream blue metallic
[ img ] [ img ]
sketch
Waze Global Champs
Waze Global Champs
 
Posts: 6537
Joined: Sat Aug 08, 2009 6:13 pm
Location: Nouvelle-Orléans, Louisiane, États-Unis
Has thanked: 2211 times
Been thanked: 2673 times

Re: [Script] WME Validator 1.1.7 / 06.03.2015

Postby sketch » Wed Apr 08, 2015 5:17 pm

ispyisail wrote:Thanks Guys working really well

This is actually a really good candidate for the kind of thing I was doing earlier:

Code: Select all
/(10|11):(?!State |The |.* (Glade|Row|Vale|Hill|Point|Hospital|Supermarket|Fall|Brae|Wynd|Mile|Mohr|Dell|One|Trak|Trail|Ramp|Esplanade|Cir|View|Gate|Green|Bvd|Gln|Mews|Gdns|Run|Runway|Trl|Cl|Gr|Spur|Rise|Cres|Aly|Ave|Blvd|Bikeway|Bnd|Bridge|Busway|Bypass|Chase|Cl|Cove|Cr|Ct|Dr|East|Ent|Exit|Fwy|Gdn|Grn|Grv|Hts|Hwy|Jct|Link|Line|Ln|Lp|Mtwy|Mw|North|Park|Pde|Pl|Pkwy|Prom|Railway|Ri|Rd|South|Sq|St|Tce|Tunnel|Turn|Vw|Vst|Way|West|Xing)$|.*Unknown Name$|^$|$)/

Saves you the trouble of retyping ".* " and "$" every time.
ALL US EDITORS READ: New USA road type guidance
assistant regional coordinator • south central region • usa
waze global champ • beta leader • tier one • new orleans
2017 chevrolet ss sedan 6mt • slipstream blue metallic
[ img ] [ img ]
sketch
Waze Global Champs
Waze Global Champs
 
Posts: 6537
Joined: Sat Aug 08, 2009 6:13 pm
Location: Nouvelle-Orléans, Louisiane, États-Unis
Has thanked: 2211 times
Been thanked: 2673 times

Re: [Script] WME Validator 1.1.7 / 06.03.2015

Postby sketch » Sat Apr 11, 2015 5:02 pm

Thortok2000 wrote:Then you never have to worry about new layers coming out or recording the layers the user has active or learning what the new numbers for the layers are or any of that nonsense. Just don't include the &layers part in the url. At all.

I agree that layer-free PLs would be helpful from Validator. But Validator isn't disabling the experimental roads layer.

Because the experimental roads layer is (presumably) intended to eventually take place of the roads layer, it does not have a place in the WME layer number. It's simply not accounted for at all. So if you create a permalink with the experimental roads layer on, it won't have the experimental roads layer enabled in it, because there's no place for it in the layers= number. This is true no matter how you create the permalink (provided that layers are included), whether in the editor, by a script, or what have you.

So, like I said, I agree that a layerless permalink is a good solution in this case. I'm just explaining that nothing is actively "disabling" the layer, that the layer is disabled by a (deliberate) omission in WME itself.
ALL US EDITORS READ: New USA road type guidance
assistant regional coordinator • south central region • usa
waze global champ • beta leader • tier one • new orleans
2017 chevrolet ss sedan 6mt • slipstream blue metallic
[ img ] [ img ]
sketch
Waze Global Champs
Waze Global Champs
 
Posts: 6537
Joined: Sat Aug 08, 2009 6:13 pm
Location: Nouvelle-Orléans, Louisiane, États-Unis
Has thanked: 2211 times
Been thanked: 2673 times

Re: [Script] WME Validator 1.1.7 / 06.03.2015

Postby sketch » Sat Apr 11, 2015 5:15 pm

Validator is intending to keep the layers you had on when you created the report. That's what it does (experimental road layer notwithstanding). You can keep the report open or elsewhere and open parts of it back up later in the same situation you created the report in. That's the idea. Maybe it wasn't the most futureproof idea in the world, as it turned out, but it's still not a bad idea.
ALL US EDITORS READ: New USA road type guidance
assistant regional coordinator • south central region • usa
waze global champ • beta leader • tier one • new orleans
2017 chevrolet ss sedan 6mt • slipstream blue metallic
[ img ] [ img ]
sketch
Waze Global Champs
Waze Global Champs
 
Posts: 6537
Joined: Sat Aug 08, 2009 6:13 pm
Location: Nouvelle-Orléans, Louisiane, États-Unis
Has thanked: 2211 times
Been thanked: 2673 times

Re: [Script] WME Validator 1.1.7 / 06.03.2015

Postby sketch » Fri May 01, 2015 5:50 pm

ispyisail wrote:Hi all

I'm trying to find "alternate" streets names but for some reason I can't get my search to work?

Code: Select all
${typeRank}:${altStreet}
/(10|11):(^(.(?!(Rd$)))*$)/


I'm trying to find all alternate street names that that don't finish with "Rd" that are street or primary street.

I don't know why it doesn't work, tried may things

Thanks

First off, ^ is the beginning of the string. You only get one string, and the string is [typerank]:[altstreet], so ^ is before the typerank number. The colon is an arbitrary separator between the typerank and the alt name, it does not establish separate strings for the purposes of regex.

${altStreet[#]} prints a list of all alt streets separated by the # character (also arbitrary, like the colon above). I added that stuff in and removed some superfluous parentheses. I'm not sure if this will work, because I'm not very good with negative lookaheads, but it's closer.
Code: Select all
${typeRank}:${altStreet[#]}
/(10|11):.(?!(Rd(#|$)))*(#|$)/
ALL US EDITORS READ: New USA road type guidance
assistant regional coordinator • south central region • usa
waze global champ • beta leader • tier one • new orleans
2017 chevrolet ss sedan 6mt • slipstream blue metallic
[ img ] [ img ]
sketch
Waze Global Champs
Waze Global Champs
 
Posts: 6537
Joined: Sat Aug 08, 2009 6:13 pm
Location: Nouvelle-Orléans, Louisiane, États-Unis
Has thanked: 2211 times
Been thanked: 2673 times

Re: [Script] WME Validator 1.1.8 / 07.05.2015

Postby sketch » Tue Jul 07, 2015 1:38 am

taco909 wrote:But like WMECH and TB, I would be happy to see more granular control over Validator's reported errors so that individual errors such as this could be toggled off.

Easily done. If you don't want to see "Street name on two-way Ramp", put "!28" ("not 28") in the "Reported as" field on the [Magnifying glass] page. You can see the numbers by hovering over the report name in the left panel. Separated by commas, you can turn off any checks you like by including a string like "!28,!128", or show only certain checks by using a string like "28,128".

As for turning it off completely, it's pretty useful in the USA, so we'd like to keep it. Of course, berestovskyy can add or remove any particular check for any particular country... but good luck finding him......
ALL US EDITORS READ: New USA road type guidance
assistant regional coordinator • south central region • usa
waze global champ • beta leader • tier one • new orleans
2017 chevrolet ss sedan 6mt • slipstream blue metallic
[ img ] [ img ]
sketch
Waze Global Champs
Waze Global Champs
 
Posts: 6537
Joined: Sat Aug 08, 2009 6:13 pm
Location: Nouvelle-Orléans, Louisiane, États-Unis
Has thanked: 2211 times
Been thanked: 2673 times

PreviousNext

Return to Addons, Extensions, and Scripts

Who is online

Users browsing this forum: JimboBaggins1966, jm6087