我有一个数据框,其中有一列名为NewPolygon:
NewPolygon
[(1.23,10),(4.4, 10)...]
[(16.0,10),(8.1, 10)...]
[(2.2,10),(0, 10)...]
我的代码:
from shapely.geometry import Point
from shapely.geometry.polygon import Polygon
polygon = pd.read_csv(file_path)
point = Point(10, 1.1)
polygon = Polygon() ####How to apply the value from column `NewPolygon` here iteratively
print(polygon.contains(point))
如何NewPolygon迭代地将所有值应用到 Polygon()? Polygon()将元组列表作为值,例如Polygon([(1.23,10),(4.4, 10)...])
元芳怎么了
相关分类