Code-for-All / geodata-scripts

Various scripts for processing geodata
1 stars 0 forks source link

Pass geojson file through tippecanoe to show shapes at zoom 0 #7

Open Mike-Honey opened 5 years ago

Mike-Honey commented 5 years ago

Is it possible to automate passing a geojson file through tippecanoe?

When I upload a geojson file into mapbox as a Tileset, it limits the "Zoom extents", typically to z6 ~ z12. The effect is when the map is first opened, it does not show any data shapes from the tileset. The user has to zoom in to see them, which is a clunky UX and prevents a view across the area of interest (Legal Amazon in Brazil).

This link is provided by mapbox for more info: https://docs.mapbox.com/help/troubleshooting/adjust-tileset-zoom-extent/

Following those instructions I was able to get tippecanoe running over the geojson file to produce a .mbtiles file. I used parameters -Z 0 -z 13. When I uploaded that as a mapbox Tileset, the zoom extents are z0 ~ z13, and it shows dots for each shape without the user zooming - a much better UX.

I'm running windows, and tippecanoe is a linux app, so I had to install Cygwin64. Within that I run: tippecanoe/tippecanoe -o deter.mbtiles -Z 0 -z 13 deter-amz.geojson

It takes a long time e.g. 30 minutes +

milovanderlinden commented 5 years ago

Hi Mike, Mikel Maron from Mapbox promised to look at the faulty shapefile that doesn't upload correct on monday. Till he gets back to me, I prefer to pause development.