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

Problem displaying GeoTIFF #13

Closed
giswqs opened this issue Jun 27, 2020 · 8 comments
Closed

Problem displaying GeoTIFF #13

giswqs opened this issue Jun 27, 2020 · 8 comments

Comments

@giswqs
Copy link

giswqs commented Jun 27, 2020

I was trying to display a small DEM (epsg:4326) on the map. However, I noticed the DEM was being displayed at three locations with varying sizes. Only the smallest one at the upper left is the correct one.

Here is the notebook to reproduce the issue.

@davidbrochart
Copy link
Collaborator

It works fine on my local setup but it's not even pushed to master yet, we need an ipyleaflet release before.
I will let you know when it's done, thanks for reporting the issue.

@davidbrochart
Copy link
Collaborator

It should be fixed in v0.1.9.

@giswqs
Copy link
Author

giswqs commented Jul 1, 2020

It seems there is still some weird black background when displaying GeoTIFF with v0.1.9.

Here is the notebook to reproduce the issue.

@davidbrochart
Copy link
Collaborator

Can you try removing da = xr.where(da==nan, np.nan, da)?

@giswqs
Copy link
Author

giswqs commented Jul 1, 2020

Fantastic! Removing that line solves the issue. I will be integrating xarray_leaflet into geemap shortly. Loading local datasets and cloud optimized GeoTIFF is a highly desirable feature. Thank you very much for your excellent work!

@giswqs
Copy link
Author

giswqs commented Jul 1, 2020

BTW, can the color ramp be customized?

@davidbrochart
Copy link
Collaborator

Fantastic! Removing that line solves the issue.

I don't fully understand why removing this line makes it work though.

I will be integrating xarray_leaflet into geemap shortly. Loading local datasets and cloud optimized GeoTIFF is a highly desirable feature. Thank you very much for your excellent work!

Thanks! I'm excited to see what you will do with xarray-leaflet, I think that to have you using it is a great opportunity to improve it. I'll try to keep up with your feedback!

BTW, can the color ramp be customized?

Yes, for now it's just a matplotlib colormap so you can tweak it, see this example. Feedback is also welcome in #14.

@giswqs
Copy link
Author

giswqs commented Jul 1, 2020

I just figured it out.

@giswqs giswqs closed this as completed Jul 1, 2020
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