Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

st_simplify() is your friend.

http://postgis.org/docs/ST_Simplify.html




As mentioned in the post, take a look at TopoJSON's topology-preserving simplification:

https://github.com/mbostock/topojson/wiki

TopoJSON's --simplify flag uses Visvalingam's algorithm. And, since it's the mesh that is simplified rather than independent features, shared borders between features will be preserved. Without this feature, you end up with something that resembles shattered glass:

http://twitter.yfrog.com/z/mn13gp


Specific implementation for d3 GeoJSON datasets http://bost.ocks.org/mike/simplify/




Consider applying for YC's Fall 2025 batch! Applications are open till Aug 4

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: