Skip to content

Landuse geometry simplification #500

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 7 commits into
base: main
Choose a base branch
from
Open

Landuse geometry simplification #500

wants to merge 7 commits into from

Conversation

wipfli
Copy link
Collaborator

@wipfli wipfli commented Jun 4, 2025

Is an alternative way to reduce tile size in the landuse layer. Instead of dropping kind values, we run some geometry post processing.

Uses Visvalingam Whyatt simplification.

When running on Switzerland, the landuse-only archive size goes from 171 MB (100%) on main to 110 MB (64%) on this branch. Projected space savings on planet 35 GB * (1 - 0.64) = 12.6 GB.

@wipfli
Copy link
Collaborator Author

wipfli commented Jun 4, 2025

Ugh this is #500. Congrats @bdon!

@wipfli
Copy link
Collaborator Author

wipfli commented Jun 4, 2025

@wipfli
Copy link
Collaborator Author

wipfli commented Jun 4, 2025

Somehow geometries are broken at zoom levels maybe 10 to 14

image
https://pub-cf7f11e26ace447db8f7215b61ac0eae.r2.dev/protomaps-500/index.html#map=12.12/47.65143/8.06254

@bdon
Copy link
Member

bdon commented Jun 5, 2025

Odd... first thought is maybe the snapAndFixPolygon is not being called at the end of the VW + smoothing simplification?

@wipfli
Copy link
Collaborator Author

wipfli commented Jun 5, 2025

image
need to update this render test...

@wipfli wipfli changed the title Landuse geometry improvements to reduce tile size Landuse geometry simplification Jun 5, 2025
Copy link

sonarqubecloud bot commented Jun 5, 2025

@wipfli
Copy link
Collaborator Author

wipfli commented Jun 5, 2025

I have updated the demo at https://pub-cf7f11e26ace447db8f7215b61ac0eae.r2.dev/protomaps-500/index.html#map=9.76/47.2065/8.2466 with just some data for Switzerland.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants