[Script] WME MagicWand

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

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.

[Script] WME MagicWand

Postby WazingArch » Thu Dec 07, 2017 8:51 am

Hello, I am using this script mainly to geometrically edit places - simplify, ortogonize and rotate places.

It seems that the rotation tool doesn't work any more. Also I noticed that when the script is enabled it disables Toolbox feature "Select in area place or map comment".
Last edited by WazingArch on Thu Dec 07, 2017 2:30 pm, edited 1 time in total.
Country Manager Bulgaria • Waze Balkan Champs • Translator
Image
Уики България | Best map editing practice
WazingArch
Coordinators
Coordinators
 
Posts: 352
Joined: Thu May 24, 2012 6:02 am
Location: Bulgaria
Has thanked: 159 times
Been thanked: 62 times

Re: [Script] WME MagicWand

Postby wasd42 » Fri Jan 19, 2018 11:54 am

lg1992 wrote:Was this report noticed? Am I the only one with the problem?

Sorry, what HN mode is?
wasd42
Area Manager
Area Manager
 
Posts: 33
Joined: Sun Sep 09, 2012 6:19 pm
Location: Moscow, Russia
Has thanked: 12 times
Been thanked: 38 times

Re: [Script] WME MagicWand

Postby wasd42 » Tue Jan 09, 2018 3:50 pm

JustinS83 wrote:Not sure if you get a notification or anything, but I sent you a pull request.

Thanks for the pull request, works like a charm! Merged to master and re-uploaded to Greasyfork.
wasd42
Area Manager
Area Manager
 
Posts: 33
Joined: Sun Sep 09, 2012 6:19 pm
Location: Moscow, Russia
Has thanked: 12 times
Been thanked: 38 times

Re: [Script] WME MagicWand

Postby wasd42 » Tue Jan 09, 2018 1:26 pm

Hey everyone, the script has been updated to v2.1.3 that supports a current version of the editor. Rotation, resize and cloning tools work as intended again.

Also, I've changed the license to MIT and created a Github project (https://github.com/WASD42/WME-MagicWand) so that everyone could participate in the plugin development. Please, feel free to report bugs and create pull requests.

bz2012 wrote:Just spent close to an hour doing a 'binary search' to figure out which extension was killing ctrl-c, keeping me from using it to copy text from various windows in WME.

Could you please provide more details about your OS and browser as I cannot reproduce the issue on Mac/Windows Chrome/Firefox. Ctrl+C and Ctrl+X shortcuts work perfectly for me across with MagicWand installed. Do anyone else have this problem?

JustinS83 wrote:I made a few tweaks to this script. Hopefully the author will come back and consider implementing them :)

Thanks for your efforts! Not sure what "Fixes the label names when a Place is selected" is though, could you please clarify?
wasd42
Area Manager
Area Manager
 
Posts: 33
Joined: Sun Sep 09, 2012 6:19 pm
Location: Moscow, Russia
Has thanked: 12 times
Been thanked: 38 times

Re: [Script] WME MagicWand

Postby wasd42 » Mon Mar 20, 2017 6:41 pm

Iridium1 wrote:- Parameters used as described.
- Editing in Germany
- Tried it with the Sat Image Layer only and even with Map Overlays, still no success.

Cannot reproduce the case, everything works perfectly for me in Germany too.

I've updated the script to log some debug information to the console. Could you:
* update the script to 2.1.1,
* open the Developer Console,
* reload the Editor page,
* write "window.wme_magic_wand_debug = true",
* press Enter to set the variable,
* and try to use Magic Wand, please?

The script should log something like:
Code: Select all
WME MagicWand algorithm: LAB
WME MagicWand sensitivity: 6
WME MagicWand simplification: 3
WME MagicWand landmark type: PROFESSIONAL_AND_PUBLIC
WME MagicWand sampling mask size: 4
WME MagicWand concave hull detailing: 40
WME MagicWand: clicked pixel data [104, 101, 84, 255]
WME MagicWand: iterations done (should be way less than 1,000,000) 1167344
WME MagicWand: non-processed pixels left (should be 0) 0
WME MagicWand: pixels processed 171714
WME MagicWand: Found pixels (should be way more than 3) 5101


Can you post it here along with the link to the area you are trying to edit, please?
wasd42
Area Manager
Area Manager
 
Posts: 33
Joined: Sun Sep 09, 2012 6:19 pm
Location: Moscow, Russia
Has thanked: 12 times
Been thanked: 38 times

Re: [Script] WME MagicWand

Postby wasd42 » Mon Mar 20, 2017 3:56 pm

New version posted: 2.1
- NEW: Highly experimental support of Magic Wand on custom layers via Map Overlays browser extension (https://chrome.google.com/webstore/deta ... babdkfbbia). Please, do not use layers for editing the maps unless you comply with the terms of use specific to each layer provider.
wasd42
Area Manager
Area Manager
 
Posts: 33
Joined: Sun Sep 09, 2012 6:19 pm
Location: Moscow, Russia
Has thanked: 12 times
Been thanked: 38 times

Re: [Script] WME MagicWand

Postby wasd42 » Mon Mar 20, 2017 3:51 pm

JustinS83 wrote:Could you update the namespace in the header to point to your greasyfork?


Unfortunately, updating namespace will break automatic upgrades for all those users who has Magic Wand installed, as far as I can see.

Iridium1 wrote:- The toggling of the button (red/green) is working now, unfortunatiely I still cannot pick any color (same message).
- Whe trying to use "Human Eye" for the algorithm and clicking on the map to pick a color the browser tab freezes.


Now that's strange... What options do you use, what layers do you have enabled and in which country are you trying to use the Magic Wand? Please, try these parameters:
* Color match algorithm: Color Distance
* Tolerance: 8
* Sampling mask size: 3

In regards of "Human Eye" algo, it is very complex and slow, maybe it would be better to remove it for the best in one of the future versions.
wasd42
Area Manager
Area Manager
 
Posts: 33
Joined: Sun Sep 09, 2012 6:19 pm
Location: Moscow, Russia
Has thanked: 12 times
Been thanked: 38 times

Re: [Script] WME MagicWand

Postby wasd42 » Mon Mar 20, 2017 2:37 pm

Thanks, Iridium1! The bug should be fixed now, please update to version 2.0.2.
wasd42
Area Manager
Area Manager
 
Posts: 33
Joined: Sun Sep 09, 2012 6:19 pm
Location: Moscow, Russia
Has thanked: 12 times
Been thanked: 38 times

Re: [Script] WME MagicWand

Postby wasd42 » Mon Mar 20, 2017 2:03 pm

Iridium1 wrote:- For me I always get the "Please, try again, no useful points found" status when trying to pick a color.
- I cannot "toggle" back to the green status when clicking on the (activated) red button - only a reload of the page helps.?


You are most welcome! :)

Both issues seem to be connected. As you are using Chrome, would you open the Developer Console (Options -> More tools -> Developer Tools), reload the Editor page, try to use Magic Wand and take a look whether any errors will appear in the console, please?
wasd42
Area Manager
Area Manager
 
Posts: 33
Joined: Sun Sep 09, 2012 6:19 pm
Location: Moscow, Russia
Has thanked: 12 times
Been thanked: 38 times

Re: [Script] WME MagicWand

Postby wasd42 » Sun Mar 19, 2017 2:12 pm

Hey, everyone!
Sorry for the long response! I've fixed the script (rotate, resize options) AND finally introduced a proper concave hull algorithm, which means that now landmarks of any complex layout can be created automatically! Thanks, Andrii Heonia (http://stackoverflow.com/users/2561331/andriiheonia) for help!

Error "Cannot create landmark, need at least 3 points to create polygon" means that the script was unable to find enough pixels of the similar colour where you clicked to build a concave hull. Please, try some other point nearby. Also, it happens that the server stops responding to tiles request for some reason, so try to refresh the page.
Last edited by wasd42 on Mon Mar 20, 2017 2:05 pm, edited 1 time in total.
wasd42
Area Manager
Area Manager
 
Posts: 33
Joined: Sun Sep 09, 2012 6:19 pm
Location: Moscow, Russia
Has thanked: 12 times
Been thanked: 38 times

Next

Return to Addons, Extensions, and Scripts

Who is online

Users browsing this forum: dfortney, Google Feedfetcher, RichardPyne