I am trying to unify the geosystem of a shp file and a DEM file. I tried to use rasterstats.zonal_stats
to find the overlap between these two data but it returns None. So I assume there is some problem with the geo system.
I printed the shp file crs by using geopandas. The crs shows
<Projected CRS: EPSG:26917>
Name: NAD83 / UTM zone 17N
Axis Info [cartesian]:
- E[east]: Easting (metre)
- N[north]: Northing (metre)
Area of Use:
- name: North America - between 84°W and 78°W - onshore and offshore. Canada - Nunavut; Ontario; Quebec. United States (USA) - Florida; Georgia; Kentucky; Maryland; Michigan; New York; North Carolina; Ohio; Pennsylvania; South Carolina; Tennessee; Virginia; West Virginia.
- bounds: (-84.0, 23.81, -78.0, 84.0)
Coordinate Operation:
- name: UTM zone 17N
- method: Transverse Mercator
Datum: North American Datum 1983
- Ellipsoid: GRS 1980
- Prime Meridian: Greenwich
The crs of the DEM file is got by rasterio, it shows the crs is
CRS.from_epsg(26917)
It looks like both two files are using CRS 26917. But when I plot the two files. The x axile of the shp file is from -81.9 to -81.5. The x axile of the DEM file is from 420000 to 500000. So there must be something wrong about the geo system.
How should I unify this two so I can plot them in the same picture and do rasterstats.zonal_stats
?