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 PesachZ
Taco909 wrote:
PesachZ wrote:Adding an extraneous segment would stop the validator flag, but That adds two nodes instead of one into the database. I think Validator should compare segment properties across a junction, an not deem it unnecessary if it is separating two segments which different properties, (i.e. lock levels, elevation, name, alt name, type), as well as any turn restrictions including allowed u-turns.
I don't think turn restrictions were ever enough to avoid a flag... in fact, it would result in a "red" inbound/outbound connectivity warning flag rather than the "blue" extra node flag.
The connectivity flag could be avoided by the addition of the one-way segment and enabling the u-turn.

I thought that lock level was enough to avoid the extra node flag. Elevation and name are unless something changed on elevation lately.
The red flag would be expected, the blue unneeded flag I'm asking to be fixed so it considers turn restrictions and allowed U-turns
Lock level didn't do it for me here

Sent using Tapatalk for Android 4.4.2
PesachZ
Wiki Master
Wiki Master
Posts: 4518
Has thanked: 1365 times
Been thanked: 1572 times
Send a message
https://s.waze.tools/gc.pngNYhttps://j.mp/1xPiWC8https://j.mp/1C9mUY2
Formal Mentoring, Wiki
Useful Wiki pages
URs & etiquette | WME | Editing Manual | Quick-Start Guide | Best Map Editing Practices | Junctions
State specific Wiki | Forum

Post by PesachZ
Taco909 wrote:
PesachZ wrote:The red flag would be expected, the blue unneeded flag I'm asking to be fixed so it considers turn restrictions and allowed U-turns
Lock level didn't do it for me here
Make sense, though I don't like leaving the red flag if there is a legitimate way to clear it, if only to prevent a new editor working from a Validator script from opening the restriction (which would then show the blue alert, so he then deletes the node)

That's why I brought up the one-way segment. It avoids both alerts (if the u-turn is set) at the small cost of the time penalty for the one extra junction (and this situation is likely going to be on a small street that we probably don't want to encourage detour route-through anyway).

I've been using the one-way segment to make private driveways on gated communities exit-only. It avoids routing non-residents into the closed gate, once inside, the gates typically open automatically to allow exit, and residents with an opener or code will know they can use the gate and can ignore Waze directing them to the guard shack.

Simply having a turn restriction on a single node should cause any editor to do a double-take. First look (in your case) shows a high ranking editor name, but that could be assumed to be from FC. A more experienced editor would move in closer on SV and notice the lack of UR to confirm... the one-way segment would provide a flag to a less experienced editor that says "This is not a mistake, I did this for a reason"

It would be very helpful if WME were to include a comment field on junction and segment ID database entries. If that were done, then Validator could include the comment in the report page on any alert.
Validator flags are just that, flags of a potential error. The reason validator doesn't actually did anything is because they want human editor eyes to actually confirm that something needs to be fixed first. Looking at the segment, seeing the restriction and the rank lock, should tell any editor to confirm on satellite or street view before changing it, or send the previous editor a pm. An editor who doesn't know to do that on a locked segment, usually doesn't deserve that rank. On a side note we could also leave a [NOTE] UR describing the details, but I felt it wasn't necessary here with the clear GSV images.

Sent using Tapatalk for Android 4.4.2
PesachZ
Wiki Master
Wiki Master
Posts: 4518
Has thanked: 1365 times
Been thanked: 1572 times
Send a message
https://s.waze.tools/gc.pngNYhttps://j.mp/1xPiWC8https://j.mp/1C9mUY2
Formal Mentoring, Wiki
Useful Wiki pages
URs & etiquette | WME | Editing Manual | Quick-Start Guide | Best Map Editing Practices | Junctions
State specific Wiki | Forum

Post by PesachZ
PesachZ wrote:Node A on this segment is being flagged as not needed, even though it is there to show a legitimate turn restriction. The map is actually accurate as is, but the node is being flagged by validator.

This is a 2-way road segment with a barrier in the middle only allowing eastbound through traffic, however it is still a 2 way road on either side of the barrier. Westbound traffic is restricted through this junction.
doctorkb wrote:I'm having trouble thinking of a case where you'd want a red arrow on a two-segment node... Unless one of the segments is one-way.
Take a look at the link which started this discussion, the satellite and street view images both confirm that it is a two way street on both sides of the barricade.

Unless you feel there should be a 5 meter segment at the do not enter sign? But that becomes an unnecessary hack, and an added node just to make validator happy. (Maybe not just to appease validator, as it could also allow the client to display the blockade)

Sent using Tapatalk for Android 4.4.2
PesachZ
Wiki Master
Wiki Master
Posts: 4518
Has thanked: 1365 times
Been thanked: 1572 times
Send a message
https://s.waze.tools/gc.pngNYhttps://j.mp/1xPiWC8https://j.mp/1C9mUY2
Formal Mentoring, Wiki
Useful Wiki pages
URs & etiquette | WME | Editing Manual | Quick-Start Guide | Best Map Editing Practices | Junctions
State specific Wiki | Forum

Post by PesachZ
Just to recap, I mentioned this here to bring up a validator concern, not to determine the best editing practice for this scenario. After speaking to jemay we concluded both methods are equally accurate, and have about equal benefits. So as jemay said validator should handle both.

The validator concern is when nodes are flagged as unneeded. Validator consider
  • lock level
  • red turn restrictions
  • and allowed U-turns
when deciding if a node is extra.

Sent using Tapatalk for Android 4.4.2
PesachZ
Wiki Master
Wiki Master
Posts: 4518
Has thanked: 1365 times
Been thanked: 1572 times
Send a message
https://s.waze.tools/gc.pngNYhttps://j.mp/1xPiWC8https://j.mp/1C9mUY2
Formal Mentoring, Wiki
Useful Wiki pages
URs & etiquette | WME | Editing Manual | Quick-Start Guide | Best Map Editing Practices | Junctions
State specific Wiki | Forum

Post by PesachZ
JohnDoe75 wrote:
voludu2 wrote:Is there any possibility of detecting reversal on one-way segments on particular street types? The reversal bug is still with us, and it can be very difficult to spot.
Do you mean Reverse Connections ?
If yes, they used to be reported in the Report.
No. This is a different bug where one-way segments can be automatically switched directionality (reversed) after doing other edits (like deleting certain extra nodes).

Sent using Tapatalk for Android 4.4.2
PesachZ
Wiki Master
Wiki Master
Posts: 4518
Has thanked: 1365 times
Been thanked: 1572 times
Send a message
https://s.waze.tools/gc.pngNYhttps://j.mp/1xPiWC8https://j.mp/1C9mUY2
Formal Mentoring, Wiki
Useful Wiki pages
URs & etiquette | WME | Editing Manual | Quick-Start Guide | Best Map Editing Practices | Junctions
State specific Wiki | Forum

Post by PesachZ
qwaletee wrote:Note that [A-Z][A-Z]* is equivalent to [A-Z]+

* means 0 or more
+ means 1 or more
His code included a space in the second class [A-Z][A-Z ]* meaning starting with a capital, followed by any number of capitals or spaces.

Sent using Tapatalk for Android 4.4.2
PesachZ
Wiki Master
Wiki Master
Posts: 4518
Has thanked: 1365 times
Been thanked: 1572 times
Send a message
https://s.waze.tools/gc.pngNYhttps://j.mp/1xPiWC8https://j.mp/1C9mUY2
Formal Mentoring, Wiki
Useful Wiki pages
URs & etiquette | WME | Editing Manual | Quick-Start Guide | Best Map Editing Practices | Junctions
State specific Wiki | Forum

Post by PesachZ
qwaletee wrote:The "hard" part of the second one is that we are looking for two things, either a lowercase at the beginning, ro a space and a lowercase anywhere. We can easily fix that by looking for both separately, but a trick is to put a space in front of your template, so that it is as if every name starts with a space.

So, for your first one, all you need is ("template"="regexp"): "${street}"="[A-Z]{2}" which says street name contains any capital letter somewhere followed immediately by any capital letter. It doesn't matter where in the string it occurs, regexp by default looks throughout.

For your second: " ${street}"=" [a-z]" - there is an space after each opening quote. Again, looks anywhere for a space followed by a lowercase, and since in the template we start with a space, that will include if it is at the beginning - Waze doesn't have a space there, but due to the template, t is the same thing.

Now we can combine the two:

" ${street}"="( [a-z])|([A-Z]{2})"

The parentheses make each statement stand by itself without interfering with the other. The bar | says "check for for or the other, either matches." I'm not sure if the parentheses are needed, I don't recall offhand whether the {2} will try to apply itself to the whole thing or not. I think it doesn't, but I'm lazy.

I have not tried any of the above, so I might have messed up somewhere, but give it a whirl.

*Edit: Note that the second expression in the regexp should NOT have a space before it, unless you want to limit reporting to cases where the two caps are the beginning of a word. For example "MaIN St" only matches as a problem if you leave the space out.
I believe the multiplier only applies to immediately preceding statement unless it is a group (in which case it applies to the entire group). So in the fila rule the second parenthesis after the bar is unnecessary.

Sent using Tapatalk for Android 4.4.2
PesachZ
Wiki Master
Wiki Master
Posts: 4518
Has thanked: 1365 times
Been thanked: 1572 times
Send a message
https://s.waze.tools/gc.pngNYhttps://j.mp/1xPiWC8https://j.mp/1C9mUY2
Formal Mentoring, Wiki
Useful Wiki pages
URs & etiquette | WME | Editing Manual | Quick-Start Guide | Best Map Editing Practices | Junctions
State specific Wiki | Forum

Post by PesachZ
ispyisail wrote:Hi guys

Its not working as expected

Cut and paste from validator just in case

Code: Select all

${typeRank}:${street}
/^1[01]:.*( [a-z)|([A-Z]{2})
It picked up many road but not what i was after

examples

Crawford Rd
Fonterra Te Rapa
Piwakawaka Court
Arncliffe Tce

Thoughts?

Thanks
Missing closing square bracket

I think this is looking for any road type 10 or 11, which has in the name a string of space, followed by two characters which be any lowercase or uppercase, or parentheses or a pipe or opening square bracket. Basically I think it is matching any two consecutive letters "case insensitive" or any of the following [()|

Regardless of what exactly it is matching try this to fix it. This still only looks for matches on road type 10 or 11

Code: Select all

${typeRank}:${street}
/^1[01]:.*( [a-z])|([A-Z]{2})
Sent using Tapatalk for Android 4.4.2
PesachZ
Wiki Master
Wiki Master
Posts: 4518
Has thanked: 1365 times
Been thanked: 1572 times
Send a message
https://s.waze.tools/gc.pngNYhttps://j.mp/1xPiWC8https://j.mp/1C9mUY2
Formal Mentoring, Wiki
Useful Wiki pages
URs & etiquette | WME | Editing Manual | Quick-Start Guide | Best Map Editing Practices | Junctions
State specific Wiki | Forum

Post by PesachZ
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
edited: typo
PesachZ
Wiki Master
Wiki Master
Posts: 4518
Has thanked: 1365 times
Been thanked: 1572 times
Send a message
Last edited by PesachZ on Thu Feb 26, 2015 7:09 pm, edited 1 time in total.
https://s.waze.tools/gc.pngNYhttps://j.mp/1xPiWC8https://j.mp/1C9mUY2
Formal Mentoring, Wiki
Useful Wiki pages
URs & etiquette | WME | Editing Manual | Quick-Start Guide | Best Map Editing Practices | Junctions
State specific Wiki | Forum

Post by PesachZ
ispyisail wrote:My rule is getting so long that I might need to create a rule generator

Code: Select all

 !/( Row| Point| Hospital| Supermarket| Fall| Brae| Wynd| Mile| Mohr| Dell| One| Trak| Trail| Ramp| Esplanade| Cir| View| Gate| Green| Bvd| Gln| Mews| Gdns| Run| Runway|Unknown Name| 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|^$)$|^(State |Exit to: |The |Exit |Entry )/
I wonder what the max length is?
You could use the power of regex to shorten it by reusing certain common letters [emoji13]

Sent using Tapatalk for Android 4.4.2
PesachZ
Wiki Master
Wiki Master
Posts: 4518
Has thanked: 1365 times
Been thanked: 1572 times
Send a message
https://s.waze.tools/gc.pngNYhttps://j.mp/1xPiWC8https://j.mp/1C9mUY2
Formal Mentoring, Wiki
Useful Wiki pages
URs & etiquette | WME | Editing Manual | Quick-Start Guide | Best Map Editing Practices | Junctions
State specific Wiki | Forum