[Script] WME Tools (WMET) v0.3.4 / 2013-12-27

WMET.0.3.1.release.png
The new version of WMET is called WME Validator
and it’s available here: forum link

WMET is an ultimate reporting tool. It reports issues with street/city names and connection issues. For some countries WMET also reports incorrect abbreviations, incorrectly named ramps/highways/freeways and incorrect lock levels.
Here is an example of WMET report: forum link
Here is the list of available reports: forum link
How to download?

  • For Google Chrome browser please download WMET.0.3.4.crx: link to Crome CRX package
    Then drag and drop it into your Chrome Extensions Tab (chrome://extensions/)
  • For Tampermonkey/Greasemonkey/Firefox please install the script from userscripts.org: link
    This release expires at 2014-02-01

Changelog:
27.12.2013 v0.3.4:

  • beta reports for Malaysia
  • beta fixes for United States
  • other minor fixes
    14.12.2013 v0.3.3:
  • WMET reports are now available for Lvl 1 editors
  • few reports fixed
    29.11.2013 v0.3.2:
  • few reports fixed
    28.11.2013 v0.3.1:
  • secure
  • user friendly
  • reports
    13.09.2013 v0.2:
  • implemented segments interface
  • integration with WME Toolbox

Known issues:

  • None!
    Please note, WMET does not work on certain territories (there are no reports to select). It’s not a bug.

If it would be available for CM’s only, then it could be a very nice tool :wink:

I thought this is available in another script available for CMs? If not mistaken it’s Toolbox where CMs can fix revcons or no end nodes at one click.

Sent from my GT-I9300 using Tapatalk 4

I’m very interested in an abbreviation script… though I don’t think I want it to be applied universally. The process it should follow is:

  1. select street segment
  2. activate script:
    2a. select entire street
    2b. update street name with appropriate abbreviations

I’m very much against a “do stuff, then pan, then do it again” sort of script – if it was that universal of a change, it should probably be done by Waze on the database backend.

Oops. After re-read the 1st post using my laptop, now I get it that the concept is different from Toolbox. I was using my S3 to read the post and interpret it differently. My apologies. :oops:

Sure, there are scripts like Toolbox or JNF which fix nodes/turns/etc etc. Those scripts are quite mature and already tested by many editors. There is no reason to implement the same functionality once again, so this WMET script can just initiate some of the JNF functions, but in large scales, i.e. for a whole city.

Well, here are just a couple of examples when it is safe IMO to alter street name:

  1. “St.X” -> “St.[space]X” or vice versa.
  2. “P” -> “[P]”
  3. “A4 (E40)” -> “A4 - E40” or vice versa.
  4. “st.” -> “St.” (case)
    etc etc

Also we can safely abbreviate (or expand the abbreviation) with thoroughly defined rules, like:
if the length of the street name is > 15, abbreviate “Saint” to “St.”

Most of those rules will be country-specific (i.e. will work only in certain countries) and will be agreed with country managers.

You might be right. But on the other hand we could get it done in few minutes rather than days. And it’s my main concern to make the script safe.

Actually I came up with the idea after I asked few times to unlock a road. The road was unlocked but some of the segments were still locked. So I asked to unlock them too. And then a nearby road… So I thought why can’t we just have a script to lock/unlock roads in an area…

So I guess I’ll start with this mass lock/unlock functionality and we’ll see how it goes :wink:

This mass lock/unlock is for CMs only?

Sent from my GT-I9300 using Tapatalk 4

Be carefull with mass-editing scripts available to all users. Even if you add a filtee based on user level in javascript, it’s easy to reverse-engineer the code. In the Toolbox script, code is generated live, so dangerous code is not even viewable to unexperimented users.

Sent with Tapatalk

Agreed. But to simplify things now I’m leaning towards closed distribution scheme…

Hi!
The v0.2 is ready.
At the moment this script is not available for download.

To test the script just over the current map view, please use “1 (run once)” button.

[description is removed]

So here is a really simple script for a start. It abbreviates Saint to St., Street to St and Avenue to Ave. But only if the street name has more than 15 letters.

if('<your country>' == segment.country)
{
    if(segment.street.length > 15)
        segment.street = segment.street
            // please reference javascript replace for details
            .replace(/\bSaint\b/, "St.")
            .replace(/\bStreet\b/, "St")
            .replace(/\bAvenue\b/, "Av")
        ;
}

Copy and paste it into WMET then position your view over few streets and use ‘1 (run once)’ button to test it.

Here is another script for tidying up railroads. This script sets lvl -5 trails back to rails and for all the rails sets no city, lvl -5, lock 5, two way properties.

// please put your country name below
if('<your country>' == segment.country)
{
    if(segment.isTypeOf("rail")
        || (segment.isTypeOf("trail") && segment.level == -5)
        )
    {
        // please change the street name below
        segment.street = 'Railroad';
        segment.city = '';
        segment.type = 'railroad';
        segment.level = -5;
        segment.direction = 'two way';
        segment.lock = 5;
    }
}

Copy and paste it into WMET and set your country and street names (i.e. segment.country = ‘France’). Then position your view over the railroad or lvl -5 walking trail and use ‘1 (run once)’ button to test it.

To unlock all segments in an area:

segment.lock = 1;

To lock the segments according to a lock map use the following script.
Please adjust the lock levels according to your country guidelines.

if('<your country>' == segment.country)
{
    // 'road type': lock level
    // use zero to leave lock untouched
    var lockMap = {
        'Railroad': 0,
        'Walking Trail': 0,
        'Pedestrian Boardwalk': 1,
        'Stairway': 1,
        'Private Road': 1,
        'Dirt Road': 1,
        'Runway': 1,
        'Parking Lot Road': 1,
        'Service Road': 1,
        'Street': 1,
        'Primary Street': 3,
        'Minor Highway': 3,
        'Ramp': 3,
        'Major Highway': 3,
        'Freeway': 5,
    };
    var newLock = lockMap[segment.type];
    if(newLock) segment.lock = newLock;
}

Couldn’t disapprove of this tool more!

My proposal is to send the download link to lvl 6s only. At the moment the links are sent to the following editors:
orbitc
argus-cronos
petervdveen
MdSyah

I hope you have no objections regarding those 4. And all of them were asked to do not redistribute the script further.

All of my scripts are local, they do not download any code every time you start WME like many other scripts do. So you can review my code before you use it. None of my scripts is logging on a server when you use it.

IMO distributing open source script just among lvl 6 editors is a way more secure in comparison with other scripts here on the forum and there on the wiki.

That is just my opinion.

Please understand that we appreciate your efforts in scripting. I can see how this script could be very useful in the right hands. The real worry is that some of this script is already “out there”.

Your original post was just the basic template for scanning across a large area. I downloaded it to see what it was doing and I’m sure that many others did as well. Now that you’re posting code to go “inside” the script, that’s available to anyone who downloaded the original script. Also, to be honest, you’re supplying ideas to the sort of people who are simply looking for ways of gaining points.

There’s also a UK-specific reason for resistance to the script. The main examples you have posted so far all touch on the UK in particular ways. We have script-based access to an open government database of road names, so for UK editors, a single click will set the road name, correctly abbreviated. In combination with the Highlighting script, incorrect abbreviations are actually a very small problem. We also have most of our railroads correctly mapped, because one of our CMs blitzed most of them a while back. Finally, we have a local problem with unnecessary locking/unlocking - something we’re working to bring under control.

Really, I would be far more comfortable if your script was distributed like WME-Toolbox. It sounds like you have some reasonable reservations about this. Perhaps if you got together with Oyyodams, you guys might be able to work something out. The source code for Toolbox has been made available to the global champs only for review.

As I said, we’ve got nothing against you, or the intentions you have with this script. It’s the potential for abuse that is making people nervous.

+1
100% agree.
We already have WME Toolbox that does very similar things. Your code requires someone comfortable with scripts and coding. It’s very easy to cause major problems to the map. Interface should be different. You could include options as buttons rather those examples you had in the form above. An editor could easily make mistake entering/modifying those small scripts or have bad intentions to get points. I strongly agree with iainhouse that you should get together with Oyyodams work something together and limit distribution of this script to Champs only. I also, don’t think it’s enough to just ask “Not to distribute” You may have to put some kind of lock like Oyyo’s script in a way that only champs could download.

Either way, I’m NOT comfortable using this at all and you can count me out. Sorry….

Thanks you guys for the feedback!

  1. My intentions are open and sincere. I’m not looking for ways of gaining points. That is why I shared the idea and the script with you.

  2. I contacted to some champs in PM before my first post on the forum and after that. Nobody told me “Don’t do this”. There were two main concerns and I really tried to meet them: 1) the script was passed to waze champs only and 2) the button ‘1 (run once)’ was implemented.

  3. The script is BETA, and I do agree that it’s not that user friendly. My plan was to create a set of scripts with your guys help and then in v0.3 I would create a list of those scripts with editor level/country restrictions.

  4. The difference between v0.1 and v0.2 is huge - ~200 vs ~1200 lines of code. So you can’t just throw those example scripts inside v0.1 - it simply does not have any functionality but panning the map.

  5. There are other WME extensions on wiki/forum which allow to select hundreds of segments in one click and then edit them. And they are available for lvl 1 editors and downloadable.

So, I passed the link to 4 champs I mentioned before. I have few more requests from CMs but I put them on hold until we resolve this issue.

I propose you guys appoint some of the champs to distribute the script, I’m totally ok with that. If anyone interested in user friendly v0.3 please let me know.

Thanks!

I’d love to take a look at it…

I’ve played little bit around with the script this afternoon with not saving anything at all, and i must admit that it has enormous potential and on the other hand enormous potential to harm the map. I was a little bit shocked to see what is possible with this and what would be if an editor is messing up the code and hit save after only one function i.e. abbreviations, unbeliebable what all can be screwed up in a short time. So it is definitely better to never share it to the mass. The fact that it is not fully userfriendly makes it more dangerous.
I hope it will be used wisely from those who have the code until now.