[Script] WME Geometries

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.

[Script] WME Geometries

Postby Timbones » Sat Feb 21, 2015 10:50 am

Prompted by this request for city boundaries, and inspired by now defunct WME GPS Track View...

WME Geometries can load a geometry file and overlay it directly in the Waze Map Editor. Simply go to the Areas tab on the left, and scroll down to the new controls that have been added.

The data format is detected automatically using the file extension, and the following formats are supported: GeoJSON, GML, WKT, KML, and GPX; and coordinate systems ESPG 3857, 4269 and 4326. If you have a (free to use) ArcGIS or ESRI Shapefile, then this can be converted into one of these text formats.

If you're having trouble with your geometry data, then please get in touch with me and I'll see if I can help.

It is possible to load very large geometry files, of order 10 Mb, and the editor still performs moderately well. Files that closer to 100 Mb will probably make the editor struggle when panning/zooming. This can be mitigated by 'simplifying' the original geometry before converting it to a supported format.

Labels will be shown for files with less than 50 features, if an appropriately named attribute can be found: name, Name, NAME or NAME0. Displaying labels for larger numbers of features really kills performance due to how OpenLayers handles them.

Development background: the functionality to parse geometries files is built in to OpenLayers, and so it does the majority of the processing. The ability to handle KML and GPX was tricky, as Waze seem to be using a crippled version of the library that was missing those two. I eventually figured out how to patch the missing functions in.

Possible future work:
  • Dedicated parsing for Waze GPS files
  • Finer control of options and layers
Timbones(6) • UK Coordinator • Forum Moderator • Global Wiki Moderator • Routing Expert
Extensions: WME Colour HighlightsWME Route TesterWME Geometries
Timbones
Coordinators
Coordinators
 
Posts: 6890
Joined: Wed Feb 09, 2011 10:33 am
Location: York, UK
Has thanked: 1013 times
Been thanked: 2870 times

Tips for WME Geometries

Postby Timbones » Sat Feb 21, 2015 10:50 am

Tools for converting Shapefies
  • MyGeoData - Free Online GIS Data Converter
  • QGIS - OpenSource Desktop Application for Windows, Mac, Linux
Conversion Tips (using QGIS)
  • Where possible, stick to standard "lat,lon" coordinate system: WGS 84 (EPSG:4326)
  • The "Simplify Geometries" tool can reduce the size of the data before exporting.
    Experiment with tolerances around 0.0002 - 0.0005 (assuming WGS 84 coordinates).
  • When exporting large files, tick "Skip attribute creation" to save space.
  • When saving as GeoJSON, you can reduce "coordinate precision" to 4.
    To make GeoJSON files even smaller, delete all space characters (20% saving!).
  • If anyone can work out how to remove coastlines, that will make a huge difference...
Example Geometry Files
Timbones(6) • UK Coordinator • Forum Moderator • Global Wiki Moderator • Routing Expert
Extensions: WME Colour HighlightsWME Route TesterWME Geometries
Timbones
Coordinators
Coordinators
 
Posts: 6890
Joined: Wed Feb 09, 2011 10:33 am
Location: York, UK
Has thanked: 1013 times
Been thanked: 2870 times

Re: [Script] WME Geometries

Postby kukimonsta » Fri Feb 27, 2015 2:10 am

I've been using your tool Tim, and it's a valuable tool for countries like Indonesia that's lacking any clear information on regions.

I've got a suggestion for the tool though: Possible to have the boundary colors be different than dark blue? Sometimes it's difficult to see the lines when the maps are dark.

Other than that, this is great.
[ img ]
CM: Indonesia, Timor-Leste / Global Champ
iPhone 6s Plus | Waze Indonesia Wiki https://wazeopedia.waze.com/wiki/Indonesia
kukimonsta
Coordinators
Coordinators
 
Posts: 912
Joined: Thu Feb 28, 2013 7:56 am
Location: Indonesia
Has thanked: 61 times
Been thanked: 286 times

Re: [Script] WME Geometries

Postby Timbones » Sun Mar 01, 2015 11:49 am

Tools, tips and examples added to second post. :)
Timbones(6) • UK Coordinator • Forum Moderator • Global Wiki Moderator • Routing Expert
Extensions: WME Colour HighlightsWME Route TesterWME Geometries
Timbones
Coordinators
Coordinators
 
Posts: 6890
Joined: Wed Feb 09, 2011 10:33 am
Location: York, UK
Has thanked: 1013 times
Been thanked: 2870 times

Re: [Script] WME Geometries

Postby JJohnston84 » Wed Mar 11, 2015 6:06 pm

I'm trying to add a missing city using the Census Designated Places data found here (California): https://www.census.gov/geo/maps-data/da ... place.html

This add-on seems just what I need to get a nice overlay. Unfortunately, I can't seem to get the conversion right. I've converted it to GeoJSON using the MyGeoData link above, but I always get the error message "JSON format not supported :(" when I try to import the data. Any advice?
-- Jacob
[ img ]
JJohnston84
 
Posts: 68
Joined: Tue Oct 14, 2014 3:45 pm
Location: Southern California, USA
Has thanked: 45 times
Been thanked: 52 times

Re: [Script] WME Geometries

Postby Timbones » Wed Mar 11, 2015 7:56 pm

^ You need to rename it so it has a .geojson extension.
Timbones(6) • UK Coordinator • Forum Moderator • Global Wiki Moderator • Routing Expert
Extensions: WME Colour HighlightsWME Route TesterWME Geometries
Timbones
Coordinators
Coordinators
 
Posts: 6890
Joined: Wed Feb 09, 2011 10:33 am
Location: York, UK
Has thanked: 1013 times
Been thanked: 2870 times

Re: [Script] WME Geometries

Postby JJohnston84 » Wed Mar 11, 2015 8:53 pm

Doh! So simple! It worked beautifully for this purpose!

bounds.jpg
(135.27 KiB) Downloaded 9408 times
-- Jacob
[ img ]
JJohnston84
 
Posts: 68
Joined: Tue Oct 14, 2014 3:45 pm
Location: Southern California, USA
Has thanked: 45 times
Been thanked: 52 times

Re: [Script] WME Geometries

Postby iamrioo » Tue Mar 17, 2015 10:47 am

Its a simple, light, and easy!
Unfortunately it failed to show name in different shape.

[ img ]
the yellow highlight above supposed to have the same name (Bangil)

Maybe if you can do color beside its name it can be help, some area in my country has 20+ shapes with the same name

Great work anyway! :D
[ img ]
telegram me
The best of people are those who bring most benefit for others
iamrioo
Waze Global Champs
Waze Global Champs
 
Posts: 818
Joined: Mon Aug 18, 2014 4:04 am
Location: Indonesia
Has thanked: 427 times
Been thanked: 293 times

Re: [Script] WME Geometries

Postby kdevries » Thu Mar 19, 2015 10:31 pm

Great usefull script :D
[ img ]
Country Manager: The Netherlands, Belgium, Luxembourg
Country Manager: Denmark
Bekijk de wiki
Waze woordenlijst
kdevries
Waze Global Champs
Waze Global Champs
 
Posts: 2616
Joined: Thu Jan 05, 2012 10:28 pm
Location: Friesland, The Netherlands
Has thanked: 1300 times
Been thanked: 665 times

Re: [Script] WME Geometries

Postby HavanaDay » Wed Apr 08, 2015 7:34 pm

Thanks Tim for the script. By chance have you given any more thought for selectable colors? Or a way for us to set the colors by file load.
HavanaDay
Country Manager
Country Manager
 
Posts: 1149
Joined: Fri Sep 03, 2010 6:08 pm
Has thanked: 219 times
Been thanked: 212 times

Next

Return to Addons, Extensions, and Scripts

Who is online

Users browsing this forum: ArjoPoldervaart, fjsawicki