Open mapsam opened 6 years ago
The Tippecanoe mechanism is pretty straightforward if you want to adapt it:
droprate
(default 2.5) and basezoom
(default same as maxzoom).The thing that will be hard if you're only working one tile at a time is to keep the features that are preserved consistent from one zoom to the next. Even without that, I think dropping in quadkey order will still tend to look better than random dropping (which develops clumps).
It is possible to write a custom algorithm to simplify multipoints I believe, but I think we might struggle to do this with sets of features. The reasoning for this is the current processing pipeline doesn't know about other features when simplification takes place. https://github.com/mapbox/mapnik-vector-tile/blob/master/src/vector_tile_geometry_simplifier.hpp#L32
I don't do anything special in Tippecanoe with MultiPoints (it either includes or drops the entire feature) but I probably should. I got into the habit of thinking that nobody used MultiPoint geometries because Mapnik would only render the first point (not sure if that's still true).
For very large point datasets, it'd be great to build a path for simplifying them at low zoom levels like z0, z1, z2 to avoid huge individual tiles. I'm not sure what the best route is, but perhaps we can take a clue from Tippecanoe?
cc @flippmoke @ericfischer