basemaps icon indicating copy to clipboard operation
basemaps copied to clipboard

Landuse geometry simplification

Open wipfli opened this issue 7 months ago • 7 comments

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 avatar Jun 04 '25 13:06 wipfli

Ugh this is #500. Congrats @bdon!

wipfli avatar Jun 04 '25 18:06 wipfli

Live demo: https://pub-cf7f11e26ace447db8f7215b61ac0eae.r2.dev/protomaps-500/index.html#map=9.22/47.1563/8.2537

new: image

old: image

wipfli avatar Jun 04 '25 19:06 wipfli

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

wipfli avatar Jun 04 '25 19:06 wipfli

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

bdon avatar Jun 05 '25 00:06 bdon

image need to update this render test...

wipfli avatar Jun 05 '25 08:06 wipfli

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.

wipfli avatar Jun 05 '25 08:06 wipfli