mapbox / mapbox/tippecanoe

Dropping polygons based on their size

Open
#978 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
C++
Stars
3.1k
Forks
430
PR merge metrics
No merged PRs in 30d

Description

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](https://github.com/mapbox/tippecanoe/files/12464655/leisure_tourism_z10.zip)

Contributor guide

Open the contributing guide

Research direction

Reproduce the behavior with the command in the issue and the linked leisure_tourism_z10.zip dataset. Compare the generated tiles across zoom levels 10–13, then determine whether the existing drop-polygons and drop-rate options can retain the largest polygons while revealing smaller ones at higher zooms; done means the output follows that size-based ordering.

Written by the indexing model from the issue text.

Assessment

Tech stack
cpp, postgresql
Domain
data
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
30/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.