首先很抱歉这个简单的问题。我有一个清单(只是一个例子)
points = [[663963.7405329756, 6178165.692240637],
[664101.4213951868, 6177971.251818423],
[664099.7474887948, 6177963.323432223],
[664041.432877932, 6177903.295650704],
[664031.8017317944, 6177895.797176996],
[663963.7405329756, 6178165.692240637]]
我需要将其转换为以下形式
points = [(663963.7405329756, 6178165.692240637),
(664101.4213951868, 6177971.251818423),
(664099.7474887948, 6177963.323432223),
(664041.432877932, 6177903.295650704),
(664031.8017317944, 6177895.797176996),
(663963.7405329756, 6178165.692240637)]
为了使用shapely 模块Polygon
创建对象。我写了几个循环,但真的不优雅且耗时。您知道将第一个列表转换为第二个列表的最佳方法吗?
谢谢