Question on using .crs - Rioxarray Help #113
-
Hi all, I'm following the labs through the YouTube playlist and I'm struggling to understand why the output of
I'm expecting to just get something like: Why is printing out the WKT (Well-known text) and not the shorthand EPSG code? Any help here would be greatly appreciated! |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 2 replies
-
The output you’re seeing from data.rio.crs is the complete Well-Known Text (WKT) representation of the Coordinate Reference System (CRS), which includes detailed information about the projection, datum, and units. If you're expecting a simpler output like EPSG:32611, you can use the to_epsg() method to extract the EPSG code directly. Here’s how you can do it: epsg_code = data.rio.crs.to_epsg()
print(epsg_code) |
Beta Was this translation helpful? Give feedback.
The output you’re seeing from data.rio.crs is the complete Well-Known Text (WKT) representation of the Coordinate Reference System (CRS), which includes detailed information about the projection, datum, and units.
If you're expecting a simpler output like EPSG:32611, you can use the to_epsg() method to extract the EPSG code directly. Here’s how you can do it: