1

我有一个包含 GeoJSON 对象的列表,如下所示:

{ 
    "type": "Feature", 
    "properties": { 
        "ListEntry": 1440052.000000, 
        "Name": "Edmonton War Memorial", 
        "Location": "Enfield, London, N9", 
        "Grade": "II",
        "ListDate": "2017\/01\/13",
        "AmendDate": null, 
        "LegacyUID": null,
        "NGR": "TQ3435693567",
        "CaptureSca": "1:1250", 
        "Easting": 534356.190450,
        "Northing": 193567.535720
    },
    "geometry": { 
        "type": "Point",
         "coordinates": [ 
             534356.190499999560416,
             193567.535700000822544 
          ]
    }
}

geometry关键,如何将 转换为coordinates传统的经纬度,最好是在 Python 中?

非常感谢。

4

1 回答 1

1

仅此条目中似乎没有足够的信息来转换为纬度和经度。为此,您还需要点的坐标参考系。但是,假设 geojson 保存在文件“points.json”中并且您知道对应于坐标参考系统的 epsg 代码,您可以执行以下操作:

import geopandas as gp
gdf = gp.read_file("points.json")
epsg_code = 32630              # my guess based on a quick search, but evidently wrong
gdf.crs = {"init": "epsg:{}".format(epsg_code)}
gdf_reprojected = gdf.to_crs({"init": "epsg:4326"})

中的点将gdf_reprojected是经度/纬度。

于 2017-02-10T00:15:46.660 回答