[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 1.1.6 / 06.01.2015

Postby crazycaveman » Wed Feb 11, 2015 7:10 pm

Here are some examples of custom checks, with some explanations. If you go to the validator settings and hover over the custom template field, you'll get a list of all the checks you can use, as well.
[ img ][ img ] [ img ][ img ][ img ]
ARC: South Atlantic Region
crazycaveman
US Waze Champs
US Waze Champs
 
Posts: 832
Joined: Fri Sep 03, 2010 1:48 am
Location: Rock Hill, SC, USA
Has thanked: 352 times
Been thanked: 522 times

Re: [Script] WME Validator 1.1.6 / 06.01.2015

Postby crazycaveman » Thu Feb 12, 2015 1:41 am

That is one thing I haven't figured out yet, but it would be useful.
[ img ][ img ] [ img ][ img ][ img ]
ARC: South Atlantic Region
crazycaveman
US Waze Champs
US Waze Champs
 
Posts: 832
Joined: Fri Sep 03, 2010 1:48 am
Location: Rock Hill, SC, USA
Has thanked: 352 times
Been thanked: 522 times

Re: [Script] WME Validator 1.1.6 / 06.01.2015

Postby crazycaveman » Wed Feb 25, 2015 11:34 am

You need a .* in there before the opening parenthesis; also the typerank is wrong. Give this a try:
Code: Select all
${typeRank}:${street}
/^1[01]:.*( [a-z)|([A-Z]{2})


When you combine two checks like that, the regex tries to match it in the exact order you have it, which is why the .* is necessary
[ img ][ img ] [ img ][ img ][ img ]
ARC: South Atlantic Region
crazycaveman
US Waze Champs
US Waze Champs
 
Posts: 832
Joined: Fri Sep 03, 2010 1:48 am
Location: Rock Hill, SC, USA
Has thanked: 352 times
Been thanked: 522 times

Re: [Script] WME Validator 1.1.6 / 06.01.2015

Postby crazycaveman » Thu Feb 26, 2015 6:20 pm

SuperDave, do you have any checks you're excluding from checking? You can tell Validator to hide highlights for certain checks but the check will still show in the left with the segment details. See this screenshot:
[ img ]
In this screenshot, I have check 129 (the blue custom check) excluded from being highlighted but everything else is highlighted (and ${typeRank} /7/ highlights PLRs for me in the PL voludu2 shared).

@sketch, it seems ferries are undefined, currently. Running a debug check in validator returns this:
Code: Select all
 WME Validator v1.1.6 debug log for segment 84430611, check #128:
1. Expand template: ${typeRank} -> undefined
2. Match RegExp: /.*/ -> ["undefined"]
=> REPORT the segment as #128 'User-defined custom check (green)'
[ img ][ img ] [ img ][ img ][ img ]
ARC: South Atlantic Region
crazycaveman
US Waze Champs
US Waze Champs
 
Posts: 832
Joined: Fri Sep 03, 2010 1:48 am
Location: Rock Hill, SC, USA
Has thanked: 352 times
Been thanked: 522 times

Re: [Script] WME Validator 1.1.6 / 06.01.2015

Postby crazycaveman » Thu Feb 26, 2015 7:11 pm

Here's an updated type list (not typerank):
${type}
Code: Select all
1:  Street
2:  Primary Street
3:  Freeway
4:  Ramp
5:  Walking Trail
6:  Major Highway
7:  Minor Highway
8:  Dirt Road / 4X4 Trail
9:
10: Pedestrian Boardwalk
11:
12:
13:
14: Ferry
15:
16: Stairway
17: Private Road
18: Stairway
19: Runway/Taxiway
20: Parking Lot Road
21: Service Road (deprecated)
[ img ][ img ] [ img ][ img ][ img ]
ARC: South Atlantic Region
crazycaveman
US Waze Champs
US Waze Champs
 
Posts: 832
Joined: Fri Sep 03, 2010 1:48 am
Location: Rock Hill, SC, USA
Has thanked: 352 times
Been thanked: 522 times

Re: [Script] WME Validator 1.1.6 / 06.01.2015

Postby crazycaveman » Fri Feb 27, 2015 11:10 am

If you have the experimental road layer enabled and the legacy roads disabled, no roads will be displayed because the experimental layer does not yet get enabled through a permalink. Might be best to enable the roads layer before running a scan so you don't have to enable them with every permalink to follow
[ img ][ img ] [ img ][ img ][ img ]
ARC: South Atlantic Region
crazycaveman
US Waze Champs
US Waze Champs
 
Posts: 832
Joined: Fri Sep 03, 2010 1:48 am
Location: Rock Hill, SC, USA
Has thanked: 352 times
Been thanked: 522 times

Re: [Script] WME Validator 1.1.6 / 06.01.2015

Postby crazycaveman » Thu Mar 05, 2015 12:40 pm

Your elevation not ground regex should be !/0/, with the exclamation outside the forward slash, otherwise it will try to match a literal "!0"
[ img ][ img ] [ img ][ img ][ img ]
ARC: South Atlantic Region
crazycaveman
US Waze Champs
US Waze Champs
 
Posts: 832
Joined: Fri Sep 03, 2010 1:48 am
Location: Rock Hill, SC, USA
Has thanked: 352 times
Been thanked: 522 times

Re: [Script] WME Validator 1.1.6 / 06.01.2015

Postby crazycaveman » Fri Mar 06, 2015 3:12 pm

So I just realized something with the ${altStreet[]} array that makes it a lot easier to code templates; I'm not sure if this is a general javascript thing or if anyone else uses this trick or has posted about it before. Whatever you put in the brackets is what separates the values, unless you put a number (obviously). So, if you set your template to
Code: Select all
#${street}@#${altStreet[@#]}@
for a street with the following properties:
Code: Select all
Name: Main St
Alt 0: US-321
Alt 1: SC-47
Alt 2: Downtown Ave

Validator will expand the check as follows:
Code: Select all
#Main St@#US-321@#SC-47@#Downtown Ave@

It doesn't add the separator before the first or last items in the array, so you still need to add a separator in the template, but I figured I'd share that as all the other examples I've seen have all the number added in manually, which can be tedious.
[ img ][ img ] [ img ][ img ][ img ]
ARC: South Atlantic Region
crazycaveman
US Waze Champs
US Waze Champs
 
Posts: 832
Joined: Fri Sep 03, 2010 1:48 am
Location: Rock Hill, SC, USA
Has thanked: 352 times
Been thanked: 522 times

Re: [Script] WME Validator 1.1.7 / 06.03.2015

Postby crazycaveman » Tue Mar 10, 2015 2:57 am

dougp01 wrote:
crazycaveman wrote:If you have the experimental road layer enabled and the legacy roads disabled, no roads will be displayed because the experimental layer does not yet get enabled through a permalink. Might be best to enable the roads layer before running a scan so you don't have to enable them with every permalink to follow


I think this might be okay except the Shift-R functionality has been overwritten with experimental roads. I for one am a big user of shortcuts and dutifully navigating menus with my mouse is a bit of a pain. I therefore am attempting to use experimental roads as much as possible and this validator layers problem is a continuous issue for me.

thanks!


This is not an issue with validator, but with WME itself. What I have done is assign the legacy road layer a shortcut of All+R through the shortcut menu (press Shift+?, click the roads label, and press Alt and R and release); gives you an easy way to toggle them. Also, post in the WME 1.9 release thread asking for a fix, that's the only way to hope that this gets changed...
[ img ][ img ] [ img ][ img ][ img ]
ARC: South Atlantic Region
crazycaveman
US Waze Champs
US Waze Champs
 
Posts: 832
Joined: Fri Sep 03, 2010 1:48 am
Location: Rock Hill, SC, USA
Has thanked: 352 times
Been thanked: 522 times

Re: [Script] WME Validator 1.1.7 / 06.03.2015

Postby crazycaveman » Sun Apr 05, 2015 7:06 pm

You could try using a negative lookahead. In this case, it would look something like
Code: Select all
${typeRank}:${street}
/1[01]:((?!State |The |$)|(?!.* Rd|.* St)$)/

I think this will work, but haven't had a chance to test it yet
[ img ][ img ] [ img ][ img ][ img ]
ARC: South Atlantic Region
crazycaveman
US Waze Champs
US Waze Champs
 
Posts: 832
Joined: Fri Sep 03, 2010 1:48 am
Location: Rock Hill, SC, USA
Has thanked: 352 times
Been thanked: 522 times

PreviousNext

Return to Addons, Extensions, and Scripts

Who is online

Users browsing this forum: JimboBaggins1966, Mapman44, The_Cre8r

cron