[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 0.9.4 (BETA) / 30.03.2014

Postby davielde » Fri Apr 04, 2014 2:01 pm

As mentioned earlier in this thread and discussed in a split one, I thought that we were going to let the elevation issue sleep ;)
[ img ]
CM: USA
SM: Michigan, Vermont
AM: Ann Arbor, MI & Thunder Bay, ON
WME Michigan
davielde
 
Posts: 1219
Joined: Tue Sep 17, 2013 2:01 pm
Location: Michigan, USA
Has thanked: 461 times
Been thanked: 759 times

Re: City Smudges

Postby davielde » Tue Apr 08, 2014 3:12 am

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 https://www.waze.com/forum/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.
[ img ]
CM: USA
SM: Michigan, Vermont
AM: Ann Arbor, MI & Thunder Bay, ON
WME Michigan
davielde
 
Posts: 1219
Joined: Tue Sep 17, 2013 2:01 pm
Location: Michigan, USA
Has thanked: 461 times
Been thanked: 759 times

Re: [Script] WME Validator 1.1.2 / 01.10.2014

Postby davielde » Sun Oct 05, 2014 7:41 pm

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: https://www.waze.com/forum/viewtopic.ph ... 69#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.
[ img ]
CM: USA
SM: Michigan, Vermont
AM: Ann Arbor, MI & Thunder Bay, ON
WME Michigan
davielde
 
Posts: 1219
Joined: Tue Sep 17, 2013 2:01 pm
Location: Michigan, USA
Has thanked: 461 times
Been thanked: 759 times

Re: [Script] WME Validator 1.1.19 / 04.06.2016

Postby dbcm » Mon Aug 29, 2016 9:05 am

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.

[ img ]
[ img ]


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!!!");
               }
            }
         }
      }
   }

}
It's so Magic™ | Y U N0 W0RK? ¯\_(ツ)_/¯
dbcm
Coordinators
Coordinators
 
Posts: 636
Joined: Mon Feb 08, 2010 12:25 pm
Location: Berlengas, Portugal
Has thanked: 289 times
Been thanked: 693 times

Re: [Script] WME Validator 1.1.20 / 03.11.2016

Postby dbcm » Mon Feb 13, 2017 9:44 am

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

https://github.com/dbcm/waze#valfix-tm-plugin
It's so Magic™ | Y U N0 W0RK? ¯\_(ツ)_/¯
dbcm
Coordinators
Coordinators
 
Posts: 636
Joined: Mon Feb 08, 2010 12:25 pm
Location: Berlengas, Portugal
Has thanked: 289 times
Been thanked: 693 times

Re: [Script] WME Validator 1.1.20 / 03.11.2016

Postby dbcm » Mon Feb 13, 2017 7:27 pm

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
It's so Magic™ | Y U N0 W0RK? ¯\_(ツ)_/¯
dbcm
Coordinators
Coordinators
 
Posts: 636
Joined: Mon Feb 08, 2010 12:25 pm
Location: Berlengas, Portugal
Has thanked: 289 times
Been thanked: 693 times

Re: [Script] WME Validator 1.1.20 / 03.11.2016

Postby dbcm » Mon Feb 13, 2017 8:41 pm

Glodenox wrote:...



Teamwork is awesome sauce
It's so Magic™ | Y U N0 W0RK? ¯\_(ツ)_/¯
dbcm
Coordinators
Coordinators
 
Posts: 636
Joined: Mon Feb 08, 2010 12:25 pm
Location: Berlengas, Portugal
Has thanked: 289 times
Been thanked: 693 times

Re: [Script] WME Validator 1.1.20 / 03.11.2016

Postby dbcm » Wed Mar 15, 2017 3:38 pm

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

Also adds Validator to layer menu.


Thanks to justins83
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? ¯\_(ツ)_/¯
dbcm
Coordinators
Coordinators
 
Posts: 636
Joined: Mon Feb 08, 2010 12:25 pm
Location: Berlengas, Portugal
Has thanked: 289 times
Been thanked: 693 times

Re: [Script] WME Validator 1.1.20 / 03.11.2016

Postby dbcm » Wed Mar 15, 2017 4:21 pm

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, ±
It's so Magic™ | Y U N0 W0RK? ¯\_(ツ)_/¯
dbcm
Coordinators
Coordinators
 
Posts: 636
Joined: Mon Feb 08, 2010 12:25 pm
Location: Berlengas, Portugal
Has thanked: 289 times
Been thanked: 693 times

Re: [Script] WME Validator 1.1.20 / 03.11.2016

Postby dbcm » Sat Jul 01, 2017 6:48 am

Let him die, they say. LET. HIM. DIE™.

Something new is coming. soon™

[ img ]
It's so Magic™ | Y U N0 W0RK? ¯\_(ツ)_/¯
dbcm
Coordinators
Coordinators
 
Posts: 636
Joined: Mon Feb 08, 2010 12:25 pm
Location: Berlengas, Portugal
Has thanked: 289 times
Been thanked: 693 times

PreviousNext

Return to Addons, Extensions, and Scripts

Who is online

Users browsing this forum: BenEnmen, jm6087, RichardPyne, The_Cre8r

cron