我需要帮助将多边形的CSV文件重新格式化为QGIS可读的格式。 我下载的数据在多边形坐标之前有一堆看似不必要的文本。
坐标的格式如下:
{"geodesic":false,"type":"Polygon","coordinates":[[[-124.26718718727625,49.10353039748446],[-124.26664819810578,49.1037998920697],[-124.26718718727625,49.1037998920697],[-124.26718718727625,49.10353039748446]]]}
我需要将它们格式化为:
MULTIPOLYGON [[[-124.26718718727625,49.10353039748446],[-124.26664819810578,49.1037998920697],[-124.26718718727625,49.1037998920697],[-124.26718718727625,49.10353039748446]]]
答案 0 :(得分:0)
假设你已经在文本文件中逐行记录了所有坐标,你可以复制文件,使用NotePad ++并执行以下步骤:
({"geodesic":false,"type":"Polygon","coordinates":)(.+)(\}$)
MULTIPOLYGON \2
点击全部替换或 Alt + A
完成......
MULTIPOLYGON [[[-124.26718718727625,49.10353039748446],...,...,[-124.26718718727625,49.10353039748446]]]
MULTIPOLYGON [[[-124.26718718727625,49.10353039748446],...,...,[-124.26718718727625,49.10353039748446]]]
MULTIPOLYGON [[[-124.26718718727625,49.10353039748446],...,...,[-124.26718718727625,49.10353039748446]]]
MULTIPOLYGON [[[-124.26718718727625,49.10353039748446],...,...,[-124.26718718727625,49.10353039748446]]]