Closed chudlerk closed 1 year ago
This is indeed strange. Because it works on a GeoTiff, it makes me wonder if there is an underlying GDAL issue instead of a rioxarray issue. Probably need to find a test case using GDAL that does the same thing to verify.
Same issue if I do this:
gdal_translate -of AAIGrid test_tiff.tiff test_tiff.asc
When I open the ascii data, it is flipped.
Issue addressed upstream: https://github.com/OSGeo/gdal/issues/6946
Using the following netcdf file for input: url
If I read in the netcdf file an plot it, I get this image
If I then save the file as an ASCII grid (.asc), reopen it and plot it, the image is flipped about the y-axis. Note that the y-axis coordinates are different too. The bottom of the original image (~36.5) is the top of the ASC image below.
However, if I save the image as a TIFF and reopen/plot it, the result is correct (matches the original image)
Why does saving the file as an ASCII grid flip the image?
Environment Information
Installation method
conda install -c conda-forge rioxarray
Conda environment information (if you installed with conda):
Environment (
conda list
):Details about
conda
and system (conda info
):