Skip to content

Dropping polygons based on their size #978

@vincentvd1

Description

@vincentvd1

I have a polygon layer that should be visible from Z10 to Z13. I am having troubles though letting tippecanoe drop polygons to not create a to crowded map. I can let it drop polygons but tippecanoe often prefers dropping the largest features while I would like it to drop the smallest features at low zoomlevels and slowly make them visible.

I tried to parameters below but that does not give the desired output (see also the example dataset below).

tippecanoe -Z10 -z13 -o output/leisure_tourism_z10.pmtiles output/leisure_tourism_z10.geojson --no-simplification-of-shared-nodes --drop-polygons --drop-rate=1.5 --cluster-distance=7 --no-clipping

Is there a way to keep the largest polygons and slowly show the smaller polygons as you zoom in?

I generate the geojson files by exporting them from Postgressql/postgis. Another approach would be to create a geojson per zoomlevel and let postgis drop some features with a sql selection. Given that this method is less dynamic it is not my preferred way.

Sample dataset:
leisure_tourism_z10.zip

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions