Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Polygon simplification with penalty for sharp corners #708

Unanswered
wipfli asked this question in Q&A
Discussion options

When doing polygon simplification, I often get sharp corners when I increase the pixel tolerance. I personally find this looks bad.

Is there a method which gives a penalty for sharp corners when doing the polygon simplification?

I would be happy to trade off area accuracy for fewer sharp corners...

You must be logged in to vote

Replies: 4 comments 3 replies

Comment options

Wang-Müller might be a good choice. Playing around at the moment with a QGIS plugin that implements it: https://github.com/NRCan/geo_sim_processing

You must be logged in to vote
1 reply
Comment options

There's also visvalingham wyatt meant to smooth out edges. I believe natural earth uses visvalingham wyatt with effective area from https://mapshaper.org to generalize shapes at low zooms

Comment options

Love esri docs...

Screenshot_20231104-190016

You must be logged in to vote
2 replies
Comment options

Nice, those are good names that describe what they do too. In general I think planetiler should have flexible support for multiple kinds of simplification/smoothing with more flexible options, or maybe even pipelines that compose multiple operations like this in a row.

Comment options

Oh yeah a geometry pipeline could be fun!

Comment options

For polygonized raster data an easy way could also be to do a bit of midpoint smoothing, see https://github.com/wipfli/midpoint-smoothing :

image

You must be logged in to vote
0 replies
Comment options

IGN, the French National Institute of Geographic and Forest Information, implemented various cartographic algorithms in Java. See their web page and code repository. They appear to have switched to Python, see here, but the Java code might still be interesting to read.

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet

AltStyle によって変換されたページ (->オリジナル) /