How to intelligently degrade or smooth GIS data (s

2019-01-16 03:41发布

I have detailed US county maps, from the TIGER LINE data sets. How might I sample, smooth, or degrade the data so that I get straighter, more boxy, less "noisy" shapes to represent the geographical features -- in this case just county boundaries and state lines, but maybe also in the general case?

The sampling could happen at rendering time if that can be done efficiently, or a parallel data set could be generated and stored. I am using PostGIS, and the lines are multi-polylines generated by shp2pgsql -- but any solution where you take a squiggly line and reduce it to a smoother line of roughly the same significance to a human interpreter would be very useful.

7条回答
Melony?
2楼-- · 2019-01-16 04:14

Here's a simple iterative smoothing algorithm:

for each three sequential points on any path, if the middle point has no intersections and is within some small threshold angle of the direct path between the two outer points, remove it.

Repeat until satisfied.

查看更多
登录 后发表回答