planetiler icon indicating copy to clipboard operation
planetiler copied to clipboard

[FEATURE] Other input formats

Open msbarry opened this issue 3 years ago • 6 comments

Add support for other geographic encoding formats, for example:

msbarry avatar Dec 30 '21 12:12 msbarry

do you envision that planetiler might pick up where tippecanoe left off? i regularly use tippecanoe with newline separated geojson, and it's a great piece of software, but it doesn't seem like it's getting much maintenance/development these days.

durkie avatar Jan 09 '22 06:01 durkie

Interesting, I didn't realize the last commit to tippecanoe was almost a year ago. My guess is it's deprecated in favor of their new proprietary tiling service.

I think there are some jobs people use tippecanoe for that planetiler could handle, but not sure about all of the density-based geometry filtering. Planetiler actually looks more like an alternative to the tiling service.

The initial motivation was talking with someone trying to generate contour lines from DEM data. They used gdal contour to generate 1x1 degree contour flatgeobuf tiles then they tried to use tippecanoe but it fell over trying to hold the planet in memory. Planetiler should be able to fill that gap since it does the same job but only holds a single input and output tile in memory at a time.

Supporting more input formats, and exposing more through config (#18) so you can do more without writing Java code would open up handling more use-cases from tippecanoe.

msbarry avatar Jan 09 '22 12:01 msbarry

What do you think about supporting GeoPackage as an input format too? It's essentially a standardised SQLite database format — a bit like MBTiles — and it's supposed to be a replacement for the venerable shapefile. I've seen it used quite a bit for government data.

flother avatar Feb 07 '22 18:02 flother

Makes sense! As long as you can read shapes with key/value tags from it then we should be able to use it as an input source.

msbarry avatar Feb 08 '22 01:02 msbarry

Can planetiler handle shapefiles (https://en.wikipedia.org/wiki/Shapefile)?

The Swiss government distributes shapefiles (https://data.geo.admin.ch/) for example for natural protected areas. In the past, I converted shapefiles to GeoJSON and then to mbtiles with tippecanoe.

wipfli avatar Feb 24 '22 21:02 wipfli

Can planetiler handle shapefiles (https://en.wikipedia.org/wiki/Shapefile)?

Yes, in fact planetiler currently can only handle shapefiles, natural earth sqlite file, and .osm.pbf files. The openmaptiles profile uses shapfiles for water polygons and lakelines:

https://github.com/onthegomap/planetiler/blob/4ad4d952a6e13587d2b670d09e20d11b8d09bcf7/planetiler-basemap/src/main/java/com/onthegomap/planetiler/basemap/BasemapMain.java#L28-L50

msbarry avatar Feb 25 '22 11:02 msbarry