[Script] WME Geometries - 2025.03.25.002

I’ve uploaded a new version (v1.0) to Greasyfork that fixes the missing GML format, thanks to crazycaveman. Chrome Web Store to follow shortly…

I’ve also increased the threshold for displaying labels from 50 features up to 100. YMMV.

Just loaded this awesome script up finally for the first time preparing for a project. I was wondering if there was a way for the script to optionally remember the Geometry files loaded, so I don’t have to manually reload each one everytime I refresh the window.
Thanks for developing this it is making my project immensely easier.

Not easily, as browsers don’t let scripts load local files without interaction from the user. It might be possible to stuff the geometry file into localStorage, but they can be exceedingly large. Loading a file directly from a remote server would be do able, but comes with other overheads.

:ugeek:

Perhaps as an option with the size warning. My files are 2-10kb each sometimes up to 100kb .

Sent from Android using Tapatalk

This would be extremely convenient.
So far, I have only used WME Geometries for overlaying DOT project files, and haven’t been much bothered by frequent reloads.

It would be really useful for use with US Census cartographic boundary files such as County Subdivisions and Places, which seem to run in the range of 500-ish to 1000-ish KB.
https://www.census.gov/geo/maps-data/data/kml/kml_place.html
https://www.census.gov/geo/maps-data/data/kml/kml_cousub.html

Even if human interaction were required to reload the files – would it be possible for WME Geometries to remember which files to reload, and then just prompt to allow them to be loaded?

I’ve been having trouble getting WME Geometries to load at all. I’m running Firefox 44 on Mac OSX 10.8.5 and the option to load a file doesn’t show up on loading the WME window, even when enabled with Greasemonkey. I have tried disabling the script, reloading the window, re-enabling the script and reloading the window again and it’s still not coming up. Anyone know what might be causing this issue and/or how to resolve it?

Nevermind, it started working after I restarted my computer. Something must’ve been stuck and the restart jarred it loose again.

I’m trying to import a geojson file, but it gets stuck on loading, in the console I see

Uncaught TypeError: Cannot read property 'length' of null(anonymous function) @ VM306:156

When I load the same file (coverted to KML) it works fine.

Here is the contents of the file that is failing.

{ "type": "FeatureCollection", "features": [ { "type": "Feature", "id": "6", "geometry": { "type": "Point", "coordinates": [ -73.97566426545382, 40.77579732136521, -1 ] }, "properties": { "name": "SL", "description": "Speed Limits", "Type": "note", "speed limit": "", "Comment": "no left turn", "created": "2016-03-15-19-50-28", "changed": "", "pictureFolder": "", "pictureName": "", "picturePath": "", "altitude": -1, "accuracy": -1 } }, { "type": "Feature", "id": "5", "geometry": { "type": "Point", "coordinates": [ -73.96929066628218, 40.77328066755879, -1 ] }, "properties": { "name": "SL", "description": "Speed Limits", "Type": "End Work Zone", "speed limit": "30", "Comment": "", "created": "2016-03-15-19-50-17", "changed": "", "pictureFolder": "", "pictureName": "", "picturePath": "", "altitude": -1, "accuracy": -1 } }, { "type": "Feature", "id": "4", "geometry": { "type": "Point", "coordinates": [ -73.97115513682365, 40.77082308038672, -1 ] }, "properties": { "name": "SL", "description": "Speed Limits", "Type": "School Zone Speed Limit", "speed limit": "20", "Comment": "", "created": "2016-03-15-19-49-50", "changed": "", "pictureFolder": "", "pictureName": "", "picturePath": "", "altitude": -1, "accuracy": -1 } }, { "type": "Feature", "id": "3", "geometry": { "type": "Point", "coordinates": [ -73.97395066916943, 40.76771408588452, -1 ] }, "properties": { "name": "SL", "description": "Speed Limits", "Type": "Work Zone Speed Limit Sign", "speed limit": "35", "Comment": "test wz", "created": "2016-03-15-19-49-38", "changed": "", "pictureFolder": "", "pictureName": "", "picturePath": "", "altitude": -1, "accuracy": -1 } }, { "type": "Feature", "id": "2", "geometry": { "type": "Point", "coordinates": [ -73.97642333060503, 40.76477889299113, -1 ] }, "properties": { "name": "SL", "description": "Speed Limits", "Type": "Speed Limit Sign", "speed limit": "35", "Comment": "test", "created": "2016-03-15-19-49-27", "changed": "", "pictureFolder": "", "pictureName": "", "picturePath": "", "altitude": -1, "accuracy": -1 } }, { "type": "Feature", "id": "1", "geometry": { "type": "Point", "coordinates": [ -73.9790753647685, 40.76010730387821, -1 ] }, "properties": { "name": "SL", "description": "Speed Limits", "Type": "Speed Limit Sign", "speed limit": "25", "Comment": "", "created": "2016-03-15-19-49-13", "changed": "", "pictureFolder": "", "pictureName": "", "picturePath": "", "altitude": -1, "accuracy": -1 } } ] }

Any chance we could make the limit of 50 user selectable?

I would like more…

Thanks

Thanks to this awesome script i was able to map all the national forest and national parks in my state. And I’ve even imported county roads to the map. I haven’t been able to figure out is to import GiS address from parcels.

Only one thing, it possible to make the script remember the last imports so when you refresh you dont have to go and grab the file again??

thanks again!

nidnarb just told me about this script.

GIGANTIC lifesaver, this is an amazing tool. THANK YOU!

This looks awesome, but I can’t get it to work on Firefox 45. If I am reading things correctly, it should put new controls in the areas tab. Is that right?

I’m no expert here, but in the United States, works by the federal government, such as maps of national parks created by the US Census Bureau (I am assuming nidnarb imported TIGER data), are in the public domain and are not subject to copyright in the USA. This is different from Creative Commons licensing, in which the owner retains copyright and allows free usage, and it’s fairly unique. After all, our basemap comes from Census data.

Look it up on the wiki. We are allowed to state and federal data. Don’t spread false info please.

Sent from my Nexus 6P using Tapatalk

That’s not what your wiki quote says. Your quote only refers to external information under copyright.

As I said, US Forest Service or Census maps are not under copyright in the United States. That’s why we have used this information for years. This is from https://www.usa.gov/government-works

CC and open data sources are under copyright, and I agree that they cannot be used, but that’s not what we’re talking about.

I appreciate the concern, and I enjoyed reading the discussion on sources that you were involved in on the Australia forum https://www.waze.com/forum/viewtopic.php?f=56&t=195213. However, copyright is the central issue in this discussion, and the links that glomp provided only talk about the use of copyrighted information, even in statements from Waze staff. I know that most governments, such as Australia, other countries and some US states, copyright their work. The US federal government really is unique in not doing this in the USA. In my job I read hundreds of journal articles daily, and the only time copyright is explicitly given up in articles is when they are the work of US government agents.

Does anyone know of an easy online way to convert GIS data in MDB format to a shapefile compatible with this script? I’ve searched online and found some applications that can be installed, but I do much of a my mapping work on a PC where I do not have full admin access and can’t install anything like that.

Alternatively, is there anyone here with routine access to ArcGIS willing to do those conversions every once in a while if we ask really nice and don’t do it too often?

I have ArcGIS and can do conversions for you, although it might not get done for a few weeks…
Send me a PM with details, and I’ll (eventually) look into it.

:ugeek:

Unfortunately, for security reasons, browsers don’t allow scripts to load local files directly without user interaction. The only available solution is to store the entire file in “local storage”, but I’m reluctant to do that as they can be very large. (As I mentioned previously)

As requested by several people, I’ve updated the script to show labels for larger geometry files, up to 2500. I’ve not tested it much, but I think it will probably be okay for most people. It will also now show a label for the first attribute it finds that starts or ends with ‘name’. Please comment here with feedback.

If you need to tweak the script, then the variables maxlabels and labelname at the top of the file might be useful to you.

See Greasyfork for latest version. I’ll update the Chrome version whenever I can get around to it.

:ugeek:

1 Like