You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Similar to Xarray, directly allow for plotting from a Grid Object (compared to a DataArray).
Proposed Functionality
Calling .plot() on a Grid object with no data variables (only grid info) would render an unfilled mesh
Calling .plot() on a Grid object with an argument for data variables, indexing, etc, would render a filled mesh according to the user inputs
PolyMesh Specific
Goal is to incorporate my PolyMesh code to handle visualizations, however due to package dependencies starting off with SciPy's or MPL's triangulation might be better (having both options would be good too)
Any mesh that's constructed during plotting would be stored in the Grid object to reduce computation time on repeated plots (ex. plotting multiple data variables on the same mesh)
Any comments or suggestions? I think it might be worth discussing this topic during one of our bi-weekly meetings since there is a lot of design decisions we need to make before we can start working on it.
Any comments or suggestions? I think it might be worth discussing this topic during one of our bi-weekly meetings since there is a lot of design decisions we need to make before we can start working on it.
What are the dependencies of PolyMesh? Is setting this up with SciPy or MPL's triangulation easy? IMO MPL has been the most reliable over the years.
PolyMesh is written around Datashader, with the main dependencies being Shapely (since PyGEOS merged with Shapely), Spatial Pandas, and GeoViews. Shapely2.0 is currently in an alpha release, and is still merging a lot of the PyGEOS work as we speak.
Starting off with triangulation support using one of the SciPY or MPL methods would be a good start. We wouldn't be able to visualize large grids very efficiently, however it would be very easy to implement once we settle on a design.
I keep coming back to the comments in #46 (comment) ... I think it's important for any unstructured viz to reflect (or at least have a boolean switch) to reflect the underlying mesh and cell topology.
So for the latter (Calling .plot() on a Grid object with an argument for data variables), I would consider that a relatively desirable feature that such contour maps properly show the underlying mesh.
One of the benefits of having a full grid description (i.e., having cell edges and vertices versus just lat/lon points) means viz tools using the description can be faithful to the computational mesh!
Activity
philipc2 commentedon Sep 13, 2022
@dcherian @rajeeja @paullric @erogluorhan
Any comments or suggestions? I think it might be worth discussing this topic during one of our bi-weekly meetings since there is a lot of design decisions we need to make before we can start working on it.
rajeeja commentedon Oct 5, 2022
What are the dependencies of PolyMesh? Is setting this up with SciPy or MPL's triangulation easy? IMO MPL has been the most reliable over the years.
philipc2 commentedon Oct 5, 2022
@rajeeja
PolyMesh is written around Datashader, with the main dependencies being Shapely (since PyGEOS merged with Shapely), Spatial Pandas, and GeoViews. Shapely2.0 is currently in an alpha release, and is still merging a lot of the PyGEOS work as we speak.
Starting off with triangulation support using one of the SciPY or MPL methods would be a good start. We wouldn't be able to visualize large grids very efficiently, however it would be very easy to implement once we settle on a design.
zarzycki commentedon Oct 8, 2022
This sounds most excellent @philipc2.
I keep coming back to the comments in #46 (comment) ... I think it's important for any unstructured viz to reflect (or at least have a boolean switch) to reflect the underlying mesh and cell topology.
So for the latter (Calling .plot() on a Grid object with an argument for data variables), I would consider that a relatively desirable feature that such contour maps properly show the underlying mesh.
A potentially relevant example @cdeciampa shared with me this AM is: https://psyplot.github.io/examples/maps/example_ugrid.html
Note https://psyplot.github.io/examples/_images/maps_example_ugrid_18_0.png, where the cells with more than 3 edges are correctly filled as one scalar value (it's possible the quads are really just two triangles glued together, I haven't dug deep enough into the source).
One of the benefits of having a full grid description (i.e., having cell edges and vertices versus just lat/lon points) means viz tools using the description can be faithful to the computational mesh!