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

Support other projection types using proj4js #196

Closed
annefou opened this issue Oct 27, 2024 · 7 comments
Closed

Support other projection types using proj4js #196

annefou opened this issue Oct 27, 2024 · 7 comments
Labels
enhancement New feature or request

Comments

@annefou
Copy link
Contributor

annefou commented Oct 27, 2024

With QGIS, I can easily add a raster layer with https://pangeo-eosc-minioapi.vm.fedcloud.eu/afouilloux-work/srtm_41_19.tif and it works out of the box. However, it does not seem to work with JupyterGIS.

If I open a QGIS project with such COG, I don't see it on the map and I have the same issue if I try to add such COG as a raster layer in JupyterGIS.

Below is what I see in QGIS:

image

@martinRenou
Copy link
Member

Thanks for the issue! Do you have an error in the console with that specific file?

@martinRenou martinRenou added the bug Something isn't working label Nov 4, 2024
@annefou
Copy link
Contributor Author

annefou commented Nov 4, 2024

I don't have any error in the console. By the way, I checked the content of this file more carefully and it is not a COG but a simple geotiff stored online (which is common with small raster files). I generated the COG for the same image and I also got the same issue e.g. I don't see anything but a black screen. The validated COG is https://pangeo-eosc-minioapi.vm.fedcloud.eu/afouilloux-work/srtm_41_19_cog.tif

@gjmooney
Copy link
Collaborator

gjmooney commented Nov 6, 2024

It looks like the tif is loading, just around Strasbourg instead of Cape Town. The huge black square is probably because of how OpenLayers handles nodata values. We should look into making those transparent by default.

196

@martinRenou
Copy link
Member

So the project is probably using a projection we're not supporting yet?

@gjmooney
Copy link
Collaborator

gjmooney commented Nov 6, 2024

Yea it looks like the tif is using EPSG:32733, and OpenLayers only supports EPSG:4326 and EPSG:3857 out of the box

Reference

@martinRenou
Copy link
Member

martinRenou commented Nov 6, 2024

We may want to start looking into using https://github.com/proj4js/proj4js to support other projection types

There is an example here https://openlayers.org/en/latest/examples/wms-image-custom-proj.html using proj4js with OpenLayers

@martinRenou martinRenou changed the title COG format not recognised? Support other projection types using proj4js Nov 6, 2024
@martinRenou martinRenou added enhancement New feature or request and removed bug Something isn't working labels Nov 6, 2024
@martinRenou
Copy link
Member

martinRenou commented Nov 6, 2024

Actually let's close this issue in favor of #191, let's continue discussing there

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

No branches or pull requests

3 participants