如何将 epsg:4326 形状几何投影到 epsg:3857?

问题描述 投票:0回答:0

我正在处理字段地理数据集。我想在地图上显示每个地块时动态计算它们的表面(其原理与此处无关)。

当我能够操作数据集时,我只需执行以下操作:

# I know 3857 is not optimal everywhere but that will do for the example
gdf["surface"] = gdf.to_crs(3857).area 

现在我拥有的是以下内容:

feat = gdf[gdf.id == change["new"]].squeeze()
# this is a shaely geometry in 4326 and before computing area,
# I would need to reproject it
surface = feat.geometry  
python projection shapely
© www.soinside.com 2019 - 2024. All rights reserved.