Saturday 26 December 2015

postgis - Simplifying polygons to linestring?


I would like to simplify some polygons that represent rivers into linestrings. I assume that holes in polygons can be omitted. Anybody has some good idea how to simply do it?


It would be nice, if it was possible to be done directly in postgis or by another open source tool, but brief algorithm description will be sufficient.



Answer



What you need is called "skeletisation algorithm".


Have a look at this article:


Haunert, J.-H., Sester, M., Jun. 2008. Area collapse and road centerlines based on straight skeletons. GeoInformatica 12 (2), 169-191. URL http://dx.doi.org/10.1007/s10707-007-0028-x


Some of these algorithms are developped in the CGAL library.



No comments:

Post a Comment

arcpy - Changing output name when exporting data driven pages to JPG?

Is there a way to save the output JPG, changing the output file name to the page name, instead of page number? I mean changing the script fo...