gpt4 book ai didi

python - 从 GeoDataFrame.crs 结果中提取 EPSG 代码

转载 作者:行者123 更新时间:2023-12-05 01:27:03 28 4
gpt4 key购买 nike

假设我有一个 GeoDataFrameCRS设置。

gdf.crs

给我

<Projected CRS: EPSG:25833>
Name: ETRS89 / UTM zone 33N
Axis Info [cartesian]:
- [east]: Easting (metre)
- [north]: Northing (metre)
Area of Use:
- undefined
Coordinate Operation:
- name: UTM zone 33N
- method: Transverse Mercator
Datum: European Terrestrial Reference System 1989
- Ellipsoid: GRS 1980
- Prime Meridian: Greenwich

这是类型 <class 'pyproj.crs.crs.CRS'> .有没有办法提取 EPSG Code由此,因此25833

最佳答案

.crs 返回一个 pyroj.CRS 对象。这应该从对象中获取 EPSG 代码:

gdf.crs.to_epsg()

pyproj docs

关于python - 从 GeoDataFrame.crs 结果中提取 EPSG 代码,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/69797728/

28 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com