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

Cannot display hillshade as 3D map #176

Closed
bidhya opened this issue Jan 29, 2021 · 4 comments
Closed

Cannot display hillshade as 3D map #176

bidhya opened this issue Jan 29, 2021 · 4 comments
Assignees
Labels
bug Something isn't working

Comments

@bidhya
Copy link

bidhya commented Jan 29, 2021

I am looking at example 1_Surface.ipynb . The following line of code only shows the 2D image. The lower part of the image show how the plot should look.

I observed similar issue when running 8_Remote_Sensing.ipynb example for bump mapping

Environment:
Python 3.8 (windows 10 and linux)
xarray-spatial 0.1.2 conda-forge
xarray 0.16.2 conda-forge
datashader 0.12.0 conda-forge

from xrspatial import hillshade

illuminated = hillshade(terrain, angle_altitude=100)
shade(illuminated, cmap=['gray', 'white'], alpha=255, how='linear')

image

@brendancol
Copy link
Contributor

@bidhya hey thanks for the report...taking a look now...

@dericksm
Copy link

Hey guys...
I've just checked the hillshade function return, and it's supposedly a 2D DataArray. I'm not quite sure, but to have a 3D image we'd need to use a 3D array at the shade function from Datashader, so I don't think it would work given the current returned data.

@brendancol
Copy link
Contributor

@dericksm datashder to my knowledge doesn't handle 3D arrays for shading unless they are categorical arrays generated by datashader's count_cat aggregate function. Right now hillshade expects 2D arrays and outputs 2D arrays.

@dericksm
Copy link

dericksm commented Oct 29, 2021

@dericksm datashder to my knowledge doesn't handle 3D arrays for shading unless they are categorical arrays generated by datashader's count_cat aggregate function. Right now hillshade expects 2D arrays and outputs 2D arrays.

@brendancol, you know that I'm not too familiar with all this, but for what I've searched, I think you're right, but the point is that in the Hillshade example from xarray-spatial it says:

Applying hillshade reveals a lot of detail in the 3D shape of the terrain.

I think this is why @bidhya opened this issue.

@thuydotm thuydotm moved this to 🆕 New in Xarray-Spatial Dec 20, 2022
@brendancol brendancol closed this as not planned Won't fix, can't repro, duplicate, stale Jun 2, 2023
@github-project-automation github-project-automation bot moved this from 🆕 New to ✅ Done in Xarray-Spatial Jun 2, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
Status: Done
Development

No branches or pull requests

4 participants