Skip to content

Commit

Permalink
added main dem panel plot func
Browse files Browse the repository at this point in the history
  • Loading branch information
Jack-Hayes committed Jan 27, 2025
1 parent 5ccc7db commit a21e19a
Show file tree
Hide file tree
Showing 8 changed files with 1,192 additions and 7 deletions.
281 changes: 281 additions & 0 deletions docs/examples/elevation_plotting.ipynb

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -35,10 +35,10 @@ dependencies = [
"geopandas>=1.0.1,<2",
"maxar-platform>=1.0.2,<2",
"odc-stac>=0.3.10,<0.4",
"pyarrow>=18.0.0,<19",
"pyarrow>=18.0.0,<=19",
"pystac-client>=0.8.3,<0.9",
"requests>=2.32.3,<3",
"rioxarray>=0.17.0,<0.18",
"rioxarray>=0.17.0,<0.19",
"stac-asset>=0.4.3,<0.5",
"stac-geoparquet>=0.6.0,<0.7",
]
Expand Down
26 changes: 24 additions & 2 deletions src/coincident/plot/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,28 @@

from __future__ import annotations

from coincident.plot.matplotlib import plot_esa_worldcover, plot_maxar_browse
from coincident.plot.matplotlib import (
clear_labels,
compare_dems,
create_hillshade,
get_elev_diff,
plot_altimeter_points,
plot_dem,
plot_diff_hist,
plot_esa_worldcover,
plot_maxar_browse,
plot_worldcover_custom_ax,
)

__all__ = ["plot_esa_worldcover", "plot_maxar_browse"]
__all__ = [
"plot_esa_worldcover",
"plot_maxar_browse",
"create_hillshade",
"clear_labels",
"plot_dem",
"plot_altimeter_points",
"get_elev_diff",
"plot_diff_hist",
"plot_worldcover_custom_ax",
"compare_dems",
]
Loading

2 comments on commit a21e19a

@Jack-Hayes
Copy link
Member Author

@Jack-Hayes Jack-Hayes commented on a21e19a Jan 27, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@scottyhq I added a bunch of functions and tests to the plot module to create the main panel figure as discussed in #33 . There are still a lot of minor tweaks to be made with only a couple main problems being:

  • docs/examples/elevation_plotting.ipynb is giving me issues with codespell as seen below (I couldn't figure these out, seems like there was some unexpected JSON interpretation of the notebook). Also, the example DSMs and altimeter points used could be improved upon a lot (especially given the heavy GEDI bias). There are more detailed notes within the notebook itself.
    docs/examples/elevation_plotting.ipynb:180: te ==> the, be, we, to docs/examples/elevation_plotting.ipynb:180: te ==> the, be, we, to docs/examples/elevation_plotting.ipynb:180: vAI ==> via, vie docs/examples/elevation_plotting.ipynb:180: fOf ==> for docs/examples/elevation_plotting.ipynb:180: te ==> the, be, we, to docs/examples/elevation_plotting.ipynb:180: OEPn ==> open docs/examples/elevation_plotting.ipynb:180: AkE ==> ache docs/examples/elevation_plotting.ipynb:180: Nd ==> And, 2nd docs/examples/elevation_plotting.ipynb:180: tHN ==> then docs/examples/elevation_plotting.ipynb:226: ot ==> to, of, or, not, it
  • plot_worldcover_custom_ax() at https://github.com/uw-cryo/coincident/blob/panel2/src/coincident/plot/matplotlib.py#L99 is a bit redundant but it was the only way I could get the main panel plotting function to work dynamically
  • I don't want to flood the modules with library imports and play with the dependencies too much, but I couldn't work without the changes to rioxarray and pyarrow

Let me know how you want to move forward with this - thanks!

@scottyhq
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks @Jack-Hayes ! I'll have a look at things either later this week or early next week. Feel free to keep tinkering in the meantime

Please sign in to comment.