Page 31 of 237

Re: [Script] WME Validator 0.9.6 (BETA) / 08.04.2014

PostPosted: Tue Apr 08, 2014 9:36 am
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

Re: [Script] WME Validator 0.9.6 (BETA) / 08.04.2014

PostPosted: Tue Apr 08, 2014 3:17 pm
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 :(

Re: [Script] WME Validator 0.9.7 (BETA) / 08.04.2014

PostPosted: Tue Apr 08, 2014 8:35 pm
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.


Re: [Script] WME Validator 0.9.7 (BETA) / 08.04.2014

PostPosted: Wed Apr 09, 2014 9:34 am
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.

Re: [Script] WME Validator 0.9.7 (BETA) / 08.04.2014

PostPosted: Wed Apr 09, 2014 5:03 pm
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

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.

Custom Checks Examples

PostPosted: Wed Apr 09, 2014 9:28 pm
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.

Re: [Script] WME Validator 0.9.7 (BETA) / 08.04.2014

PostPosted: Thu Apr 10, 2014 4:12 pm
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

Means to highlight/report #200, #300, skip other notes and highlight/report everything else.

Re: [Script] WME Validator 0.9.7 (BETA) / 08.04.2014

PostPosted: Thu Apr 10, 2014 5:39 pm
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/

Re: [Script] WME Validator 0.9.7 (BETA) / 08.04.2014

PostPosted: Thu Apr 10, 2014 10:12 pm
by berestovskyy
No messages were lost in this thread:
In original post click F.A.Q. and then Custom checks

Also I'll add a direct link from Validator to that message in the next version.

Re: [Script] WME Validator 0.9.8 (BETA) / 15.04.2014

PostPosted: Tue Apr 15, 2014 9:53 pm
by berestovskyy
15.04.2014 v0.9.8:
- Fixed #24 filtering in 'Reported as' field
- Fixed #173 'No space after abbreviation' for '11.'
- Fixed segment length for newly created segments
- Custom check severities are now warnings by default.
(sorry, I'm a bit busy these days, so a "real" fix will come in one of the next releases)

- Improved RegExp debug log
- Added a link to custom checks examples on the forum
- Fixed default regexps for #160-163

Code: Select all
  Added new checks with params to validate city names:
    #190 'Lowercase city name' (merged #92)
    #191 'Incorrectly abbreviated city name'
    #192 'Unneeded spaces in city name' (merged #31)
    #193 'No space before/after abbreviation' (merged #33)