Get a sneak peek at whats next for Permanent Hazards on our April 7th Office Hours!
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 berestovskyy
07.04.2014 v0.9.5:
- Validator now skips locked segments, so the locks may
be used to hide issues for low-level users.
- New faster 'Show report' method (Chrome only)
- Layers param in permalinks in report

- Updated Spanish translations thanks to robindlc
- Updated #109 'Too short segment': 5m by default
(6m for BeNeLux) + wiki link added
- Updated #79 'Too short U-turn connector' to report
only same road types
- Updated #24 'Might be incorrect city name' for
Строитель снт vs Строитель 2 снт

For localization packs:
- Configured check parameters are listed now in
'Settings->About->Available checks'
- New params to override default check description:
'titleEN', 'problemEN' and 'solutionEN'
- Fixed custom check ${deadEnd} variable for off-screen
nodes
- Fixed custom check ${softTurns} variable

Checks review:
I'm reviewing all the checks, removing unused, merging similar checks, adding params to some checks, splitting nodes A/B etc. So in this release:

Code: Select all

  All "option1" properties changed to params/regexp
  Changed check ID #10 -> #9
  Split check #40 'Soft turns' -> #200 and #300
    'Node A/B: Unconfirmed turn on minor road' 
  Split check #86 'Soft turns on primary road' -> #201 and #301
    'Node A/B: Unconfirmed turn on primary road' 
  Removed #49 and #111 (Roundabouts)
  Added params for #73 'Too short street name'
    and #109 'Too short segment'
  Added new checks to validate street names:
    #160 Freeway name (merged #61 and #80)
    #161 Major Highway name (merged #53, #60 and #81)
    #162 Minor Highway name (merged #82)
    #163 Ramp name (merged #54, #64, #89 and #113)
    #164 Primary Street name
    #165 Street name
    #166 Parking Lot Road name
    #167 Railroad name (merged #58)
    #169 any type street name (merged #55, #56 and #123)
    #170 'Lowercase street name' (merged #93, #94)
    #171 'Incorrectly abbreviated street'
      (merged #26, #51, #68 and #88)
    #172 'Unneeded spaces in street name' (merged #30)
    #173 'No space before/after abbreviation' (merged #32)
    #174 'Street name spelling mistake' (merged #100)
    #175 'Empty street name' (merged #98)
  Added new checks to validate street types:
    #70 must be a Freeway (merged #83)
    #71 must be a Major (merged #62 and #84)
    #72 must be a Minor (merged #63 and #85)
berestovskyy
Posts: 912
Has thanked: 321 times
Been thanked: 832 times
Send a message

Post by berestovskyy
kentsmith9 wrote:I propose the validator identify these segments without a state.
Sure, will be added. Meanwhile you can click Settings->custom and put into the "Custom template" field:

Code: Select all

${state}
then put in the custom RexExp field:

Code: Select all

^$
And you will get those empty states highlighted for you.
irowiki wrote:Wait, I thought locked segments were already excluded?
They were excluded by default with "Exclude non-editable segments". Now the locked segments are excluded always.
berestovskyy
Posts: 912
Has thanked: 321 times
Been thanked: 832 times
Send a message

Post by berestovskyy
kentsmith9 wrote:Also, I searched the first post in this thread, but did not find the link to the Complete Search list.
Kent, it's always available under Settings->About->Available checks. If you click it over the US, Validator will show enabled/disabled checks for US. And I just added a red link to the OP ;)
Fabianotkd wrote:Don't limit us, please. :?
No problem, I guess we need to discuss it.

Every rule has an exception. Despite I'm doing my best to avoid false positives, they are there and they always will be. So IMO we need to agree on how do we mark those false positives on the map, so other editors do not try to fix them just because Validator says so.

For instance, few days ago Sketch posted here a link to the area where the right turns on two-way roads are disabled: permalink

So the current proposal is to simply lock those exceptions and do not report issues to the low-level users. I also significantly improves Validator performance for low-level users on low zoom levels when there are lots of locked freeway/highway segments.

Let me know if anyone has a better idea.


08.04.2014 v0.9.6:
- Fixed #170 'Lowercase street name' (but not for "U turn" I guess :lol:)
- New for US #106 'No state name selected'
- Disabled skips of locked segment
berestovskyy
Posts: 912
Has thanked: 321 times
Been thanked: 832 times
Send a message

Post by berestovskyy
Ok, guys I got that you need to see issues on locked segments.

Any ideas regarding
we need to agree on how do we mark those false positives on the map, so other editors do not try to fix them just because Validator says so.
or I didn't get your proposal with highlighting :? I wish we had a comment field...

But how about this: do not highlight/report a segment:
1) if the segment was locked above editor's level
2) and it was modified after 2014-05-01

So you will get the issues on the "old" locked segments, but never on recently updated segments.

PS. I hope I'll get #170 fixed soon, sorry :(
berestovskyy
Posts: 912
Has thanked: 321 times
Been thanked: 832 times
Send a message

Post by berestovskyy
For US Country Managers (and not only)

Guys, have a look at the complete list of checks here: forum post

Note that some of the checks have params to configure, for instance
Freeway/Highway/Ramp/Street/Railroad names (#160-#169)
Lowercase street name (#170)
Street abbreviations (#171)
Street name spelling mistakes (#174)
Freeway/Highway/Ramp/Primary Street locks (#150-#154)
and few other

Most of them are not even enabled in US.

Here is a detailed post explaining how to enable/setup Validator for your country: forum link

I'm not editing in US, so I would really appreciate if any US-based CM could take a role of a "Validator country manager", i.e. to enable, configure and test those checks in US, distribute localization package or ask me to pull back into Validator proven configurations time to time.

Sure, I will help and support, answer and advice. Let me know if anyone is interested.

Thanks!
berestovskyy
Posts: 912
Has thanked: 321 times
Been thanked: 832 times
Send a message

Post by berestovskyy
Fabianotkd wrote:Validator restored as it was before as soon as possible!
Please make sure you're using the latest version. The feature was disabled in v0.9.6.
berestovskyy
Posts: 912
Has thanked: 321 times
Been thanked: 832 times
Send a message

Post by berestovskyy
irowiki wrote:I must have missed this change, but the soft turns on minor roads being blue instead of yellow highlighting is throwing me off!
In 0.9.5 #40 'Soft turns' was split into #200 and #300 'Node A/B: Unconfirmed turn on minor road'. Some countries have extremely high number of unconfirmed turns, so those new checks are notes by default to draw more attention to primary roads. You can adjust the severity for US in localization pack.
pumrum wrote:I want to highlight segments that have an Alternate Street specified but no city.
For example, try to put into the template field:

Code: Select all

@@${altCity[0]}##${altStreet[0]}@@${altCity[1]}##${altStreet[1]}
And into RegExp field:

Code: Select all

/@@##[^@]/
Perhaps the code is not optimal, but I hope you got the idea. Let me know if we miss something in the template variables.
berestovskyy
Posts: 912
Has thanked: 321 times
Been thanked: 832 times
Send a message

Post by berestovskyy
Custom Checks Examples
Custom check is a powerful tool of WME Validator to highlight very specific map issues, not covered with built-in validations.

To set up a custom check in Validator click Settings->custom. There are two checks: green and blue. Each check has two fields: template and regular expression (RegExp).

Hover your mouse over the template field to get a tooltip with available variables. Validator substitutes those variables with segment's data and then tries to match that string over the RegExp. If the expanded template string matches the RegExp - Validator highlights the segment.

Template Variables
Most of the variables are self-explanatory.
Note: empty address fields expand to empty streets, i.e. if you set "None" next to city name, then template "#${city}#" for this segment will be expanded to "##"

Road type: variable ${typeRank} expands to:
1 for Runways
2 for Railroads
...
14 for Major Highways
15 for Freeways

Road direction: variable ${direction} expands to:
0 for Unknown direction
1 for A->B
2 for B->A
3 for Two-way segments


Regular Expressions (RegExp)
Regular expressions are patterns used to match character combinations in your expanded template. See the detailed description of regular expressions on MDN: link

Validator provides the following two extensions for regular expressions:
Debug RegExp. To debug your RegExp add letter D at the very beginning: D/^[a-z]/
Validator will print debug information to the JavaScript console (Ctrl+Shift+J), so you can see how template variables expand for the segments on the map.

Negate RegExp. Sometimes it's much easier to create a RegExp for a normal condition and then just negate the result. To do so, add an exclamation mark at the very beginning: !/ (St|Ave)$/


Easy Examples
To highlight streets with word North
Template: ${street}
RegExp: /North/

To highlight invalid (null) elevations
Template: ${elevation}
RegExp: /null/

To highlight segments with no state assigned
Template: ${state}
RexExp: /^$/

To highlight segments with a U-turn
Template: ${Uturn}
RexExp: /1/


Medium Examples
New! To highlight Streets without speed limits:
Template: ${type}:${speedLimit}
RegExp: /^1:0$/

To highlight Ramps with non-ground elevation:
Template: ${typeRank}:${elevation}
RegExp: /12:[^0]/

To highlight Freeways which do not start with letter A
Template: ${typeRank}:${street}
RegExp: /15:[^A]/

To highlight streets named "U-Turn" in LA
Template: ${state}:${street}
RegExp: /Louisiana:U-Turn/

To highlight dead-end U-turns
Template: ${deadEnd}:${Uturn}
RegExp: /1:1/

To highlight the opposite: missing dead-end U-turns
Template: ${deadEnd}:${Uturn}
RegExp: /1:0/

To highlight Freeways or Major Highways in format 'Axx', 'Ixx' etc
Template: ${typeRank}:${street}
RegExp: /^(15|14):[a-z][0-9]/i

To search for segments shorter than 17m:
Template: ${length}
RegExp: /^([0-9]|1[0-6])$/

To mark dead-ends without U-turn:
Template: A${deadEndA}:${UturnA}:B${deadEndB}:${UturnB}
RegExp: /A1:0|B1:0/

To highlight more than 100m long unnamed drivable streets:
Template: ${drivable}:${street}:${length}
RegExp: /1::...+/


Advanced Examples
To highlight street name which ends in Cntr, or Exd etc (any case variant)
Template: ${street}
RegExp: / (Cntr|Exd|La|Plc|Rvr|Tnpk|Wy)$/i

To highlight segments that have an alt street specified but no city
Template: @@${altCity[0]}##${altStreet[0]}@@${altCity[1]}##${altStreet[1]}
RegExp: /@@##[^@]/

To highlight invalid abbreviations for Australian roads
Template: ${street}
RegExp: !/ (Ave|Blvd|Cl|Cres|Cct|Ct|Dr|Way|Line|Ln|Mtwy|Pde|Pl|Rd|St)$|^$/

To highlight lowercase street names for US (except S, N, W, E and to)
Template: ${street}
RegExp: /^(?!(to) [^a-z])((S|N|W|E) )?[a-z]/

To highlight Freeways with no cardinal direction (NSEW)
Template: ${type}:${street}
RegExp: !/^[^3]| [NSEW]$/

City name abbreviation 'snt' should be lowercase and at the very beginning
Template: ${city}
RegExp: /(^|[ (])(?!^snt )[Ss][Nn][Tt]([ )]|$)/

To highlight segments if primary street name and one of the alt. names are the same
Template: #${street}#${altStreet[#]}#
RegExp: /(#.+)(?=#).*\1#/


See more examples in the "WME Validator localization for US" forum thread.
berestovskyy
Posts: 912
Has thanked: 321 times
Been thanked: 832 times
Send a message
Last edited by berestovskyy on Sat Sep 15, 2018 8:49 pm, edited 16 times in total.

Post by berestovskyy
irowiki wrote:So how do you change the severity of a check? Tried using the localization file but nothing seemed to work.
Sorry, I misled you. Severity is not a per-country, but a per-language property, just like check title etc.

So at the moment you need to switch WME to Spanish, generate localization pack with translations and add the line:

Code: Select all

"200.severity": "warning",
I'm not sure why you need those notes as a warning, but I guess you'd like to hide all the notes. If so, please also consider the following option.

Click Search tab and in the "Reported as" field put the following:

Code: Select all

200,300,!note,*
Means to highlight/report #200, #300, skip other notes and highlight/report everything else.
berestovskyy
Posts: 912
Has thanked: 321 times
Been thanked: 832 times
Send a message

Post by berestovskyy
irowiki wrote:I'm just used to having all soft turns highlighted in yellow
If you don't mind having them in green or blue, you can use a custom check:
Template: ${softTurns}
RegExp: /1/
berestovskyy
Posts: 912
Has thanked: 321 times
Been thanked: 832 times
Send a message