Replies: 1 comment 3 replies
-
When re-projecting, the shape is not usually the same. rasterio/GDAL automatically choose what it believes are the best dimensions in the new projection. If you want to preserve the same shape, you can pass it into the |
Beta Was this translation helpful? Give feedback.
3 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hi,
Thanks for a great Python package! I have a dataset I want to convert to a regular cartesian coordinate system. The files contain sea-ice concentration from the NSIDC whom provides the data as netCDF files. However, the projection of the data is in EPSG:3411. When converting these data using rioxarray
reproject
I run into a few issues and fail to create a valid file and I hope someone can help me get this correct.I read the files (two example files can be found here:
Then I rename
xgrid
tox
andygrid
to have both dimensions and coordinates with the same name as expected by rioxarray. Next I convert the order of the y-dimension as data goes from north to south and I want south to north.This creates a dataset that is supposedly an
EPSG:3411
projection and makes sense:Next I add the crs and reproject:
This results in a new dataset where values, dimensions, and values are wrong:
First, the x-dimension is now 1052 while y is 75 compared to earlier 304 and 448. I assume something in my approach is not correct and creates this erroneous result and I hope someone can help me find the error and get this conversion correct. I really appreciate it.
Cheers, Trond
Beta Was this translation helpful? Give feedback.
All reactions