代码之家  ›  专栏  ›  技术社区  ›  four-eyes

使用CRS信息GeoDataFrame.CRS结果

  •  0
  • four-eyes  · 技术社区  · 2 年前

    假设我有一个 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
    

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

    0 回复  |  直到 2 年前
        1
  •  9
  •   DNy    2 年前

    .crs 返回一个pyroj。CRS对象。这将从对象中获得EPSG代码:

    gdf.crs.to_epsg()
    

    pyproj docs