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 davielde
kentsmith9 wrote:When present they create a new city entry because that segment does not match the other segments around them. Once they are identified you simply update the segment state name. I am currently running a test in viewtopic.php?f=251&t=81200 to track when the city layer gets corrected without posting the entries in the city smudge form. It may turn out they will not get updated ever without using the form.
The "no state" smudge would be an easy check because Validator would only need to look for a stateID of 1. Not all smudges are due to the no state issue though. I corrected "F, Michigan" a few weeks ago; and the combination of "Canton, MI", "Canton Township, MI", "Canton Township (no state)", and "Canton Twp, MI" was a fun exercise too.

In short, true editor-created smudges can always be removed without using the form (if you're impatient or it only affects a small number of segments). Changes to Waze-provided city polygons require you to use the form though. While mass editing is obviously discouraged as noted in the wiki, you can make a smudge or any legitimate editor-created city disappear by changing the city name in WME or making it No City, and a regular tile update takes care of it. You could mark all segments and objects associated with a Waze-provided city as "No City" or something else, and it would never update the city unless you use the smudged city form.

I've been doing some detailed research with some examples in Michigan after GizmoGuy411 had me look at an issue remaining after a name change using the city smudge form. The "name" changed, but the "English name" did not, which created an issue where--from a WME display standpoint--there are two neighboring "Addison, Michigan" options that are completely identical. The only way to tell the difference is using Colour Highlights or looking at the JSON response from the web request. Right now, my thoughts are still fairly haphazard and stream of consciousness, but I was eventually hoping to post soon with that and a few other smudge-related items.

Kent, you're actually the person that I eventually wanted to touch base with because it looks like there was a wiki update from mid-February that listed out the options under "Need assistance from the Waze team" with no guidance on what each option would do based on people's experience with using the form. I know that there is a dead thread in the Wiki Updates forum discussing smudges to some extent, but perhaps we can create a page update thread specifically for the smudge city and continue discussion there, or you could forgive me for resurrecting the old one? The wiki really needs to provide more insight into name versus english name, explain how Waze-provided cities have english names while editor-created ones do not, and a few other things.
davielde
Posts: 1219
Has thanked: 454 times
Been thanked: 735 times
Send a message
https://www.waze.com/wiki/images/6/69/W ... 00k_5c.png
CM: USA
SM: Michigan, Vermont
AM: Ann Arbor, MI & Thunder Bay, ON
WME Michigan

Post by davielde
MGODLEW wrote:Feature Request:
Flag/Highlight/compile a list of all parking lot landmarks (Places). Since many new editors go on a parking lot landmark adding spree not knowing about our guidelines for adding parking lots to the map, it would be nice to see an entire list of all of them in the area to validate valid or unnecessary parking lots.
Check out WME Data Store for an exportable Place list in the short term: viewtopic.php?t=111169#p911491

I'll likely be working with doctorkb and the Toolbox team to bring something similar to "Select Segments" to Toolbox "soon", but for Places.
davielde
Posts: 1219
Has thanked: 454 times
Been thanked: 735 times
Send a message
https://www.waze.com/wiki/images/6/69/W ... 00k_5c.png
CM: USA
SM: Michigan, Vermont
AM: Ann Arbor, MI & Thunder Bay, ON
WME Michigan

Post by dbcm
Hi guys, i've a request for you.

I found a problem that WME Validator is not warning us about.

In a nutshell, there is a segment with one way, pointing to a dead-end, connected are one or more segments with a red arrow to that segment.

Basically you have a blackhole and you don't want people to go in.

You can see it here:
https://www.waze.com/editor/?env=row&lo ... ,140027351

in case someone fix this, here are the screenshots.

https://profundos.org/waze/wurm.media/e ... .57.37.png
https://profundos.org/waze/wurm.media/e ... .57.30.png


I'm detecting this issue with this prototype code:

Code: Select all

// check if you can drive from seg1 to seg2
var hasGreenFlag = function(seg, segs) {
/*
    var x = Waze.model.nodes.get(150020468);
    var s = Waze.model.segments.get(140026991);
    var s2 = Waze.model.segments.get(140027351);
    var s3 = Waze.model.segments.get(140027352);
    x.getDirectionBetweenSegments(s, s2);
    x.getDirectionBetweenSegments(s2, s);
    x.getDirectionBetweenSegments(s, s3);
    x.getDirectionBetweenSegments(s3, s);
    s2.attributes.toConnections[140026991]
*/
            
	var att = seg.attributes;
	var segId = att.id;
    
	debugger;

	for (var i = 0; i < segs.length; i++) {
		var nodeSegId = segs[i];
		if (segId === nodeSegId)
			continue;

        var nodeSeg = Waze.model.segments.get(nodeSegId);
        
        if (nodeSeg.attributes.toConnections[segId] === true) {
            return true;
        }
        if (nodeSeg.attributes.fromConnections[segId]=== true) {
            return true;
        }
        
    }
    
    return false;

}

// fix one way segments that connects to a black hole
var fxcOneWay2BlackHole = function(seg) {
	seg = Waze.model.segments.get(140026991);

	if (document.getElementById('fxc-oneway2blackhole').checked !== true) {
		return;
	}

	var attributes = seg.attributes;
	var segRoadType = attributes.roadType;

	// only process road cars...
	if (!isDrivable(seg)) {
		return;
	}

	var segId = attributes.id;
	var segRevDir = attributes.revDirection;
	var segFwdDir = attributes.fwdDirection;
	
	
	if (segRevDir === false && segFwdDir === false) {
		return;
	}
		
	if (segRevDir === false || segFwdDir === false) {
		var fromNodeId = attributes.fromNodeID;
		var fromNode = Waze.model.nodes.get(fromNodeId);
		var toNodeId = attributes.toNodeID;
		var toNode = Waze.model.nodes.get(toNodeId);

		var toNodeSegIDs = Waze.model.nodes.objects[toNodeId].attributes.segIDs;
		var fromNodeSegIDs = Waze.model.nodes.objects[fromNodeId].attributes.segIDs;

		if ((segFwdDir === false && fromNodeSegIDs.length === 1) ||
			(segRevDir === false && toNodeSegIDs.length === 1)) {
			doLog("Oh no! One way to a black hole!!!!");

			//debugger;

			var fattr = {};
			fattr.revDirection = fattr.fwdDirection = true;
			setSegmentAttributes(seg, fattr);

			var WazeActionModifyConnection = require("Waze/Action/ModifyConnection");
			if (fromNodeSegIDs.length === 1) {
                var oneGreenFlag = hasGreenFlag(seg, toNodeSegIDs);
                
				for (var j = 0; j < toNodeSegIDs.length; j++) {
					var toNodeSegID = toNodeSegIDs[j];
					if (segId === toNodeSegID)
						continue;

					var toNodeSeg = getSegment(toNodeSegID);
					if (isDrivable(toNodeSeg)) {
						Waze.model.actionManager.add(new WazeActionModifyConnection(segId, toNode, toNodeSegID, true));
                        // if what you have is red flags, put them all green
                        if (!oneGreenFlag) {
    						Waze.model.actionManager.add(new WazeActionModifyConnection(toNodeSegID, toNode, segId, true));
                        }
					} else {
						doLog("Oh LOOK, drivable connected to non-drivable!!!");
					}
				}
			}
			if (toNodeSegIDs.length === 1) {
                var oneGreenFlag = hasGreenFlag(seg, fromNodeSegIDs);
                
				for (var i = 0; i < fromNodeSegIDs.length; i++) {
					var fromNodeSegID = fromNodeSegIDs[i];
					if (segId === fromNodeSegID)
						continue;

					var fromNodeSeg = getSegment(fromNodeSegID);
					if (isDrivable(fromNodeSeg)) {
						//console.log(segId+" _ "+ fromNodeSegID);
						Waze.model.actionManager.add(new WazeActionModifyConnection(segId, fromNode, fromNodeSegID, true));
                        // if what you have is red flags, put them all green
                        if (!oneGreenFlag) {   
                            Waze.model.actionManager.add(new WazeActionModifyConnection(fromNodeSegID, fromNode, segId, true));
                        }
					} else {
						doLog("Oh LOOK, drivable connected to non-drivable!!!");
					}
				}
			}
		}
	}

}
dbcm
Coordinators
Coordinators
Posts: 644
Has thanked: 201 times
Been thanked: 698 times
Send a message
It's so Magic™ | Y U N0 W0RK? ¯\_(ツ)_/¯

Post by dbcm
In the case you are using WME Validator through Tampermonkey, here is a fix.

https://github.com/dbcm/waze#valfix-tm-plugin
dbcm
Coordinators
Coordinators
Posts: 644
Has thanked: 201 times
Been thanked: 698 times
Send a message
It's so Magic™ | Y U N0 W0RK? ¯\_(ツ)_/¯

Post by dbcm
Glodenox wrote:I've been able to get this to work consistently in Firefox after a couple of changes to the code of dbcm. The if statement around the proxy for require was unnecessary and I had to use window.require instead of just require to get it to work with GreaseMonkey. I've uploaded my version to GreasyFork, but I'd gladly take it down again if dbcm adjusts his version so it works on Firefox as well. I've checked with TamperMonkey and this new version works there as well.
In case you want to merge the code, do a pull request.
https://github.com/dbcm/waze/pulls

Double check that works also in Chrome with Tampermonkey
dbcm
Coordinators
Coordinators
Posts: 644
Has thanked: 201 times
Been thanked: 698 times
Send a message
It's so Magic™ | Y U N0 W0RK? ¯\_(ツ)_/¯

Post by dbcm
Glodenox wrote:...

Teamwork is awesome sauce
dbcm
Coordinators
Coordinators
Posts: 644
Has thanked: 201 times
Been thanked: 698 times
Send a message
It's so Magic™ | Y U N0 W0RK? ¯\_(ツ)_/¯

Post by dbcm
valFix 1.0.3 is out
https://dbcm.github.com/waze/valfix/valfix.user.js

Also adds Validator to layer menu.


Thanks to justins83
dbcm
Coordinators
Coordinators
Posts: 644
Has thanked: 201 times
Been thanked: 698 times
Send a message
Last edited by dbcm on Wed Mar 15, 2017 4:09 pm, edited 1 time in total.
It's so Magic™ | Y U N0 W0RK? ¯\_(ツ)_/¯

Post by dbcm
valFix 1.0.4 is out to enforce layer menu

https://dbcm.github.io/waze/valfix/valfix.user.js

it will appear after 5 seconds, ±
dbcm
Coordinators
Coordinators
Posts: 644
Has thanked: 201 times
Been thanked: 698 times
Send a message
It's so Magic™ | Y U N0 W0RK? ¯\_(ツ)_/¯

Post by dbcm
Let him die, they say. LET. HIM. DIE™.

Something new is coming. soon™

https://cdn.evbuc.com/eventlogos/425022 ... fmagic.jpg
dbcm
Coordinators
Coordinators
Posts: 644
Has thanked: 201 times
Been thanked: 698 times
Send a message
It's so Magic™ | Y U N0 W0RK? ¯\_(ツ)_/¯

Post by dbraughlr
I request additional options:
  • Exclude any segment with name containing "CONST ZN".
  • Flag any segments with name containing "CONST ZN".
dbraughlr
Posts: 569
Has thanked: 164 times
Been thanked: 98 times
Send a message