napari / napari

napari: a fast, interactive, multi-dimensional image viewer for python
https://napari.org
BSD 3-Clause "New" or "Revised" License
2.18k stars 422 forks source link

napari for geodata #973

Open jni opened 4 years ago

jni commented 4 years ago

🚀 Feature

We've had some interest in using napari for geodata. In addition to physical coordinate systems, we'll need tiling and geographic transforms. It turns out there is a project implementing these things, which I heard about on gitter.im/vispy/vispy: https://github.com/codypiersall/vismap

I have nothing more to add here, only opening this to track interest and progress here.

sofroniewn commented 4 years ago

Very cool, maybe @freeman-lab can help us out ;-)

GenevieveBuckley commented 4 years ago

Is this tiling purely for map data, or could you also tile images with the same mechanics?

jni commented 4 years ago

That specific package is for map data, but yes, it certainly can and should be generalised when it comes to napari.

EmanuelCastanho commented 2 years ago

I'm trying to use GeoTiffs and Shapefiles in napari and I consider this feature very important to create a 3D visualization that facilitates the analysis of certain parameters over time. Can you provide more information on how to implement vismap in napari and how to add a projection (example EPSG 4326)?

This is what I've achieved so far:

a

s

Without a geographic coordinate system it is difficult to use this type of data, any tips? I would like to help develop this feature for napari. I think it would be interesting to achieve something similar to this (but simpler and open source): https://www.esa.int/ESA_Multimedia/Videos/2018/07/Earth_System_Data_Lab/

Screenshot 2021-10-20 at 22 23 21
GenevieveBuckley commented 2 years ago

This is great! More geodata examples would be wonderful. I have started a "napari for geoscience" playlist on youtube, which currently has only Draga's talk in it, but ideally we can add more in the future: https://www.youtube.com/channel/UCbTgw84ew4pxTJ9qu3W2hqg/playlists

jni commented 2 years ago

@EmanuelCastanho awesome. I'd love to do a bit of pair programming with you to help you get to where you're going! Bonus points for repeating the above analysis on Tabuaeran! :smiley: Anyway you can book a slot with me at: https://twitter.com/jnuneziglesias/status/1385754529639985152 I think @DragaDoncila will join us. :smiley:

For geographic transforms, we'll probably need to do a bit of an overhaul of our transform system to enable user- or plugin-defined transforms, but I'm hoping it's not too terrible. :grimacing:

sofroniewn commented 2 years ago

Super cool you're excited about napari for geosciences!

For geographic transforms, we'll probably need to do a bit of an overhaul of our transform system to enable user- or plugin-defined transforms, but I'm hoping it's not too terrible. 😬

I'd be interested to know what this requires too, I'm not so familiar with geographic transforms. cc @andy-sweet who was worked on the napari transform system too

DragaDoncila commented 2 years ago

Definitely excited for this and happy to contribute to napari and/or any plugins we need to get this work across.

andy-sweet commented 2 years ago

I'm also unfamiliar with geographic transforms, but happy to learn about them. In the architecture working group, we split off a topic on potentially revamping transforms in napari, so I added this issue to the list.

In general, it feels like transforms may be coupled with the layer data slicing problem (e.g. if we want to handle tiled data). Currently, I think napari's model is mostly about getting all the data in memory then providing vispy with the forwards matrix transform (though I think that's a bit of a simplification, because we do have Layer._transforms['tile2data']). But I have been thinking about whether we want to invert that model - i.e. mostly think about the viewer/canvas requesting the data required for some field of view. It would be good to understand how much existing packages (like vismap and others) can help us to implement something like that.

sofroniewn commented 2 years ago

But I have been thinking about whether we want to invert that model - i.e. mostly think about the viewer/canvas requesting the data required for some field of view.

@perlman might be interest in that approach too as we think about the "level of detail" rendering - cc @nclack

GenevieveBuckley commented 2 years ago

Just adding a note here to say that Vlad is maybe interested in writing a GeoJSON writer plugin for napari https://forum.image.sc/t/annotation-file-specification/58910/2 (it doesn't look like Vlad specifically uses geodata, but a plugin for this would obviously be useful in lots of situations, so I think it fits this thread too)