-
Notifications
You must be signed in to change notification settings - Fork 142
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
Create a RasterData from in-memory 2D array #127
Comments
@kilroy68 The primary issue here is the process which owns the memory allocated by gdal. Jupyter's architecture includes two separate process spaces, one for python execution environment (the kernel) and one for serving web assets (tornado). Cell execution takes place in the kernel process, while tile requests are handled by the tornado process. Producing tiles with tornado from in-memory kernel results will require some form of inter-process communication (ideally using shared memory between processes). The feature you're suggesting is a high priority for us, but we need to do more research to identify the best approach given the Jupyter architecture. If you (or others) have solved similar problems we'd love to hear about your approach! |
I don't have any experience in this space, but I would look at matplotlib's implementation. It has a similar problem in that the data i'm plotting is in the python kernel, but it needs to produce interactive web visuals through tornado. |
matplotlib generates image data in the kernel process space and jupyter wraps a rendering backend to push those images to the client via a
This is basically as far as we've gotten. There are still avenues to explore, and I'm hopeful we'll be able to come up with a solid solution so we can deliver this feature (you're not the only one who has asked!). But as I hope I've illustrated, its a non-trivial effort to implement. |
The RasterData class needs to be able to be instantiated with an in-memory 2D array. When doing analysis it is common to have in-memory results that you don't want to write to file before viewing. For instance, consider this code:
at this point, I should be able to instantiate a RasterData from the band I just created.
The text was updated successfully, but these errors were encountered: