-
Notifications
You must be signed in to change notification settings - Fork 11
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
Get rasterize working #3
Comments
See e.g. here:
And discussion in # geo channel of holoviz Discord. |
I tried implementing the rasterization option on both holoviews and hvplot.xarray. I was only able to add the OSM tiles with hvplot (in holoviews it shows a blank map). However, when zooming in/out, the RGB image is filled with a black background: screen-capture.webmAnd it's laggy, sometimes the image is clipped and not fully rendered... |
Interesting, thanks for giving this a shot. I thought that black area was due to nodata=0 happening somewhere, but it looks like it extends beyond the tile. We could consider using your visualization as our "Layer Editor" and then push those to a leaflet map once holoviz/panel#5064 is released. |
For context - image-to-tiles with ipyleaflet had been working really well even for quite large (merged) S2 tiles. I just got stuck on the layer reload issue. The biggest benefits I see to hv are easy data tooltips for raster (idk if I've seen this in leaflet) & linked plots. I don't think we have to pick one, I just want to be specific about where/ how each will be used. For the contest, I think sticking with close to the current layout is the right call. |
holoviz/holoviews#5351 - related per @ hoxbro, also: Try setting expand=False in the call |
The expand option works on both holoviews and hvplot with some differences. Check the gists and comments: |
Personally good to close this. I will try an xarray contrast stretch today and see if that fixes the issue I'm seeing. We can add some other polish items to a new ticket. (My latest thinking is we should return these plot(s) and controls all together in one chatbox response.) |
For the contrast stretch try changing np.clip(out_data, 0, 255) to out_data.clip(0, 255). |
Merging the function is not working. If you apply a selector, the plot acts independently of each other. Investigating... |
Why don't I push by UI updates to main and you can start working off of that? I think this would be a nice setup to work towards:
The fewer tool wrappers the better for this first release. If RGB vs. spectral really need to be separate functions we can just have a flag that switches between those in the single load_datacube python function. (That then gets wrapped as langchain tool.) |
One nice thing about the about is you could do time comparison slider as well as RGB vs. index. |
|
Added Rasterization for RGB/single band #17. I think that we'll need to remove the stac_load from the image plots and load the required data once (if this is possible). |
Nice, I agree with this. I am going to work on app state tonight, got a bit
overwhelmed looking at it last night.
It was working well to do this in my prior version, just a bit of work to
reintegrate.
…On Thu, Jun 22, 2023, 9:44 AM ivandortenzio ***@***.***> wrote:
Added Rasterization works for RGB/single band #17
<#17>. I think that we'll
need to remove the stac_load from the image plots and load the required
data once.
—
Reply to this email directly, view it on GitHub
<#3 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/ACZIQK76X2EWDLO3SHTMEIDXMRY5XANCNFSM6AAAAAAZJ46EWE>
.
You are receiving this because you authored the thread.Message ID:
***@***.***>
|
Closing this :) Can track any improvements elsewhere. |
Per holviz channels, we should be able to use delayed rasterization for the holoviz plot objects. This would let us remove the resolution slider and just load what makes sense for the zoom level, hopefully avoid crashing with memory overages.
The text was updated successfully, but these errors were encountered: