-
Notifications
You must be signed in to change notification settings - Fork 237
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
GeoJSON as alternative to shapefiles #630
Conversation
This and b278569 are very cool together. It came just in time to solve a problem I had been deferring solving. Problem: I'm building a map where national/state parks are treated specially -- different features are emphasized vs the broader map. I still want the broader map to have these features in order to orient the user, but in the broader map, the features might only appear at higher zooms, or are styled with less contrast. Solution with this PR:
My real profile does have this hacky bit in its config file: {
"layers": {
"parks": {
"minzoom": 15,
"maxzoom": 15,
"source": "../parks.geojson",
"index": true
},
...
},
"settings": {
"basezoom": 14
... Since I'm only using the parks layer for spatial queries, I set its minzoom to a zoom greater than my map's basezoom to prevent it from being materialized into the output. This is a bit of an OSM ouroboros...but it seems to work? Maybe it'll fall over if I scale it up. (Maybe there is a better way to do this? I have close to zero familiarity with the GIS toolchain outside of OSM-related tools.) |
Ah, related: when shp/geojson files are configured to be indexed, it looks like StoreGeometry needs a lock to avoid corrupting indexedGeometries/indices[layerName]/indexedGeometryNames |
Good spot - I’ve got a couple of tweaks including that which I’ll push tomorrow. |
Small push which fixes threading and another couple of issues.
That's quite ingenious! Not particularly a priority but we could perhaps integrate that as a separate The most common way to get individual features out of OSM in GeoJSON format is by using Overpass Turbo. But I'd guess you could also do it using |
Thanks for the pointers to Overpass and ogr2ogr. Yes, this is fairly removed from Tilemaker's core reason for being. I'll let it kick around in my repo while I get a feel for it. #556 is another user who might be served by it (or something similar to it) |
This enables GeoJSON files to be used in exactly the same way that shapefiles are.
Also refactor shapefile processing into its own class.