-
-
Notifications
You must be signed in to change notification settings - Fork 58
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
COG not projected correctly #122
Comments
Hi, @brianloss . Thank you for reporting this issue. I think the bad orientation is a result of poor geotransform support in the georaster ecosystem. I'm in the process of improving that, but it will probably take some more time though. I'm not sure about the rendering difference. My best guess is that georaster-layer-for-leaflet isn't respecting that ColorInterp=Gray metadata tag (as described by gdalinfo). I'll have to look into this. |
If this helps, I also have this issue, with a dataset that specifies Here is the dataset (public): https://dea-public-data.s3.ap-southeast-2.amazonaws.com/derivative/ga_ls_tc_pc_cyear_3/1-0-0/x17/y37/2022--P1Y/ga_ls_tc_pc_cyear_3_x17y37_2022--P1Y_final_wet_pc_50.tif |
This is likely a duplicate of #77. |
@staffordsmith83 your misalignment issues are definitely #77 since they go away when loaded via an ArrayBuffer. I suspect @brianloss is a different projection problem but I can't find his data file. |
@jcphill yes I agree, the misalignment part is definitely #77 . But the incorrect colouring is not covered in #77 and should be a separate ticket. Daniel says "I'm not sure about the rendering difference. My best guess is that georaster-layer-for-leaflet isn't respecting that ColorInterp=Gray metadata tag (as described by gdalinfo). I'll have to look into this." .Just trying to help, thanks. |
@jcphill It looks like maybe the bucket changed, but I get the incorrect projection and shading with any GEC image from Umbra. The entry point to their public data set is here: https://registry.opendata.aws/umbra-open-data/. Here's an updated example (image is of the Panama Canal): https://geotiff.github.io/georaster-layer-for-leaflet-example/examples/load-cog-via-url-param.html?url=https://umbra-open-data-catalog.s3.amazonaws.com/sar-data/tasks/Panama%20Canal,%20Panama/4ced9d34-b5da-490b-a564-7454e7d86b71/2023-02-20-14-43-17_UMBRA-05/2023-02-20-14-43-17_UMBRA-05_GEC.tif |
Thanks @brianloss, from gdalinfo I see that these files have a GeoTransform applying a scaling and rotation:
The geotiff.js library reads this as fileDirectory.ModelTransformation but doesn't handle the rotation part outside of getBoundingBox() and nothing else in the stack even looks for it. |
Hey, all. Thanks so much for digging into this. Definitely loads of opportunity to improve the ecosystem! A few newish updates:
At the moment, I can't think of any other libraries that support custom geotransforms, yet, so definitely lots more work to do, but just wanted to provide a progress update. The future is bright! |
Describe the bug
Georaster for leaflet does not appear to be projecting some COGs correctly. The scale, orientation, and shading are all incorrect. The image appears to have the grayscale colors inverted, and it does not appear to be honoring the EPSG:32630 projection in the source COG.
To Reproduce
Steps to reproduce the behavior:
Expected behavior
The image should display using the proper scale, orientation, and shading.
Screenshots
Here's what I see loading that sample image in the load-cog-via-url-param example:
Here's what I see when loading the image in qGIS. Note that the image is correctly oriented, and the shading is correct too:
Desktop (please complete the following information):
Additional context
I have verified with GDAL and rasterio that the image appears to be a valid COG. If I re-project to EPSG:4326 using GDAL, the image orientation seems to be ok, but the shading is still incorrect. Everything looks great in qGIS.
The text was updated successfully, but these errors were encountered: