【问题标题】:Extract EPSG code from GeoDataFrame.crs result从 GeoDataFrame.crs 结果中提取 EPSG 代码
【发布时间】:2023-03-20 19:45:01
【问题描述】:

假设我有一个 GeoDataFrame 和一个 CRS 集。

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

这是&lt;class 'pyproj.crs.crs.CRS'&gt; 类型。 有没有办法从中提取EPSG Code,从而提取25833

【问题讨论】:

    标签: python geopandas pyproj


    【解决方案1】:

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

    gdf.crs.to_epsg()
    

    pyproj docs

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2017-07-01
      • 2016-06-24
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多