我有一個(gè)數(shù)據(jù)框,其中有一列名為NewPolygon:NewPolygon[(1.23,10),(4.4, 10)...][(16.0,10),(8.1, 10)...][(2.2,10),(0, 10)...]我的代碼:from shapely.geometry import Pointfrom shapely.geometry.polygon import Polygonpolygon = pd.read_csv(file_path)point = Point(10, 1.1)polygon = Polygon() ####How to apply the value from column `NewPolygon` here iterativelyprint(polygon.contains(point))如何NewPolygon迭代地將所有值應(yīng)用到 Polygon()? Polygon()將元組列表作為值,例如Polygon([(1.23,10),(4.4, 10)...])
將包含多邊形的列勻稱地應(yīng)用于 Polygon()
30秒到達(dá)戰(zhàn)場(chǎng)
2022-12-20 12:02:47