简体   繁体   English

计算 python 中两个不规则多边形的重叠/相交面积

[英]Calculating overlapping/intersecting area of two irregular polygons in python

I don't know if this problem is trivial.我不知道这个问题是否微不足道。 But I want to calculate the overlapping area of two polygons.但我想计算两个多边形的重叠面积。 So with my case, I have the coordinates of the vertices of each polygon, eg.所以在我的情况下,我有每个多边形的顶点坐标,例如。 PolygonA = {(a1,b1),(a2,b2),...,(an,bn)}.多边形A = {(a1,b1),(a2,b2),...,(an,bn)}。

Can anybody point me to an algorithm that does this?任何人都可以指出我这样做的算法吗? Or a library maybe?或者图书馆? Thanks!谢谢!

The shapely library has an intersection function and an area function. shapely库有一个交叉点function 和一个区域function。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM