Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

rasterio-generated geotiffs have wrong metadata #84

Open
SarahG-579462 opened this issue Oct 17, 2023 · 2 comments
Open

rasterio-generated geotiffs have wrong metadata #84

SarahG-579462 opened this issue Oct 17, 2023 · 2 comments

Comments

@SarahG-579462
Copy link

Describe the bug
A clear and concise description of what the bug is.
When opening a rasterio-generated geotiff with georaster, I get the wrong ymin and ymax, and likely other metadata. This is likely because rasterio has an opposite standard to GDAL/QGIS with respect to the grid ordering..

As a result of this, using georaster-for-leaflet, the map is subsequently displayed upside down. It is properly displayed in QGIS.

To Reproduce
Steps to reproduce the behavior:

  1. Create a geotiff with rasterio/rioxarray
  2. Open said geotiff with georaster
  3. See erroneous metadata
  4. When opening with georaster for leaflet, the raster is displayed upside down.

Upside down (from rioxarray):
image

Correct display (re-exported with QGIS):
image

@DanielJDufour
Copy link
Member

Hello, @SarahG-579462 . Thank you for sharing this important bug! Would you happen to be able to share the geotiff that is causing issues and I can add it to our test cases?

@SarahG-579462
Copy link
Author

Sure, here's an example that doesn't work:
scengen_tg_mean_annual_rcp45_p50_2031-2060.zip

and one that does:
QC_bool.zip

Note that, when I simply tried to change the ymin and ymax, the map continued to be displayed upside down, in the right location. Flipping them, or trying to change the sign of the pixelHeight, resulted in a crash for georaster for leaflet.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants