2017-02-08 81 views
0

我有一個包含像這樣以GeoJSON對象的列表:從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到傳統的緯度和經度,最好是在蟒蛇?

非常感謝。

回答

0

它看起來並不像在這個條目中有足夠的信息來轉換爲經度和緯度。爲此,您還需要點的座標參考系統。但是,假設以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的點是在經度/緯度。

+0

非常感謝,這工作 –