如何简化形状中的边界几何 [英] How to simplify boundary geometries in shapely

查看:114
本文介绍了如何简化形状中的边界几何的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在整齐地使用GIS,但是在将每个邮政编码的几何图形加载到内存时遇到了内存错误,因为几何图形参差不齐且非常复杂.

I'm working with shapely to do GIS, but I'm running into memory errors when loading the geometry of each zip code into memory because the geometry is so jagged and complicated.

我想通过尽可能减少边界点的数量而不使形状过度失真来使形状更小.使用凸包似乎是一个可能的答案,因为可以简单地从边界上扔掉很多点.我想知道是否已经有解决该问题的东西.

I'd like to make the shape smaller in memory by reducing the number of boundary points as low as possible without distorting the shape too much. Using the convex hull seems like one potential answer, as could simply throwing away lots of points from the boundary. I'm wondering if there's something already out there that solves this problem.

推荐答案

尝试使用几何图形的简化方法,指定公差距离.

Try using the geometry's simplify method, specifying a tolerance distance.

这篇关于如何简化形状中的边界几何的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆