WME MagicWand

The very same thing as same tool in graphic editor: select "similar" colored area and create landmark out of it + Clone, Orthogonalize, Rotate and Resize for landmarks

Autor
WASD42
Dziennych instalacji
0
Wszystkich instalacji
2 932
Oceny
14 1 1
Wersja
2.2
Utworzono
18-11-2014
Zaktualizowano
05-03-2018
Licencja
MIT
Dotyczy

Discussion: https://www.waze.com/forum/viewtopic.php?f=819&t=118064
Github: https://github.com/WASD42/WME-MagicWand

Installation

- Download script using Install button in the right top corner;
- Open Options -> Tools -> Extensions page;
- Drag & Drop downloaded file to Extensions page.
WME MagicWand has been tested in Chrome and Firefox. This is the early version, please report any bug you'll encounter and I'll try to fix it ASAP :)

Usage

Advanced editing tools

Clone landmark

Example video (GIF)
Select a landmark you want to clone and press "Clone landmark" button on the left hand menu or use Ctrl (Cmd) + C shortcut. The landmark will be cloned with a same venue type but otherwise empty.

Orthogonalize landmark

Example video (GIF)
Select a landmark and press "Orthogonalize" button on the left hand menu or use Ctrl (Cmd) + X shortcut. This algorithm will try to make "about" straight corners really strait to avoid ugly look in Waze client.

You can set "Enable Highlight" option ON to highlight those landmarks that need to be orthogonalized.

Simplify landmark

Remove excessive points in landmark geometry. Can be tuned by changing "Simplification landmark" parameter in Magic Wand options tab.

Options for Rotation and Resize

- Open the MagicWand tab in the left menu;
- Check or uncheck boxes to enable or disable Rotate and Resize functionality;
- Select landmark;
- ROTATE: drag the additional landmark's vertice to rotate it;
- RESIZE: drag the additional landmark's vertice to resize. Please note that when RESIZE option is enabled you cannot modify individual vertices.

Right angles helper

Hold SHIFT while editing a feature to display a helper circle that will help you to draw right angles.

Magic Wand tool

Example video (GIF)
- Open the MagicWand tab in the left menu;
- Choose the type of the supposed landmark (can be changed later);
- Toggle MAGIC WAND button: red means ACTIVE state;
- Click somewhere in the area you'd like to be converted to landmark based on the colour (best work with farmland, water, building and forests);
- Wait a bit (the actual time depend on your computer) for landmark to be created;
- Edit the created landmark to fine tune the area.

What does all that options mean?

Colour match algorithm - WME MagicWand can use two different algorithms to detect similar pixels on the tiles: based on colour "distance" and based on "human-eye similarity". Choose the best suitable option for you but please keep in mind that when changing algorithm you will need to play with Tolerance option too as both algorithms use it differently.
Tolerance option basically changes the sensitivity of the algorithm, what pixels would be supposed to have "similar" colour. Large values will select all pixels -- that is not what you want :)
Landmark simplification - as map tiles contain tonnes of pixels of different colour finding appropriate polygon to contain all of "similar" pixels is a difficult computational problem. The current implementation uses one of concave hull algorithms to do it. The problem is that it creates many points on the curves and corners and thus you can use simplification parameter to remove unnecessary points automatically.

Notes

* Please wait when map tiles will be fully loaded after moving or zooming to make the plugin work properly.
* As far as I understand we can make the script more accurate if it will compare not individual pixels but certain groups, say 5x5 or 10x10. Need an advice about it, though.
I'm really open to any suggestions and comments :)

Version history

2.2
- NEW: New option to draw a helper circle to draw right angels while holding SHIFT key.

2.1.5
- FIX: Upcoming WME changes (by justins83)

2.1.4
- FIX: Place UI will now re-insert itself after Place edit (by justins83)

2.1.3
- FIXed script to support latest Editor
- License changed to MIT
- Github project: https://github.com/WASD42/WME-MagicWand

2.1.1
- Some tweaks for speed
- NEW parameter "Detailing" for concave hull creation;
- NEW Set wme_magic_wand_debug = true in the Developer Console to display debug info and processed image

2.1
- NEW: Highly experimental support of Magic Wand on custom layers via Map Overlays browser extension (https://chrome.google.com/webstore/detail/map-overlays/ggbadcghmcpofonkoeepddbabdkfbbia). Please, do not use layers for editing the maps unless you comply with the terms of use specific to each layer provider.

2.0.2
- FIX: Fixed unrecoverable "Less than 3 points found" issue

2.0.1
- FIX: Fixed Rotate and Resize options

2.0
- NEW: Finally, I've managed to implement a correct concave hull algorithm, which means that now complex landmarks will be correctly covered! Thanks, AndriiHeonia, for the lib!
- FIX: Plugin was broken after the Editor update

1.0
- NEW: Highlight mode: set an Enable Highlight checkbox ON to highlight landmarks to be Orthogonalized.
- Compatibility with newer Editor version
- Minor fixes (thanks, skirda!)

0.9
- NEW: New feature: Simplify landmark (Ctrl+J shortcut). Can be tuned by changing "Simplification landmark" parameter in Magic Wand options tab.

0.8.2
- NEW: Auto-select created landmark after clone operation

0.8.1
- FIX: compatibility issues with new Editor version fixed

0.8
- NEW (Requested by AlanOfTheBerg): Resize and Rotate checkboxes moved to "Selected Landmark" tab
- NEW: Introduced "Angle threshold" option to allow user to make Orthogonalize method more or less aggressive
- FIX (Reported by davielde): "undefined" options in Landmark removed
- CHANGE (Requested by sketch): "CLICK TO START MAGIC WAND" changed to "CLICK TO STOP MAGIC WAND" while it was active

0.7
- NEW: Options will be saved between session
- NEW: Hotkeys: Press Ctrl (Cmd) + C to Clone or Ctrl (Cmd) + X to Orthogonalize selected landmark

0.6
- NEW: Orthogonalize functionality for landmarks: now you can easily make perfect straight angles on your landmarks
- Updated to support Venues and Places update

0.5
- NEW: Advanced Editing options for landmarks rotation and resize

0.3
- NEW: added sampling box setting
- CHANGED: a bit better UI
- FIX: Stability fixes
- FIX: Firefox performance hugely improved
0.2
- Stability fixes
0.1
- Initial release