coincident.plot.compare_dems#
- coincident.plot.compare_dems(dem_list, gdf_dict=None, ds_wc=None, elevation_cmap='inferno', add_hillshade=True, diff_cmap='RdBu', elevation_clim=None, diff_clim=(-10, 10), figsize=(17, 11))#
Create a panel figure comparing DEM and altimetry elevations.
Where the first row shows elevation maps over hillshades (if add_hillshade is True) altimetry points will be plotted over the hillshade of the first DEM (if add_hillshade is True) The second row shows elevation differences, with the first plot being the Landcover of the scene First DEM provided will be the ‘source’ DEM where all other elevations will be compared to The third row shows the histograms of these differences
- Parameters:
dem_list (list) – List of xr.Datasets. Each Dataset should have .elevation and .hillshade variables. The first DEM in this list will be the ‘source’ DEM and will served as a reference for differencing e.g. [dem_1,dem_2,dem_3] will result in diff_1 = dem_2 - dem_1 and diff_2 = dem_3 - dem_1
gdf_dict (Optional Dict[str, Tuple[gpd.GeoDataFrame, str]]) – Dictionary where keys are subplot names and values are (GeoDataFrame, column_name) pairs. column_name denotes elevation values to plot (e.g. h_li for ICESat-2 ATL06)
ds_wc (Optional xr.Dataset) – WorldCover dataset to plot. If this is not provided, ESA WorldCover is used.
elevation_cmap (Optional str) – Colormap for elevation. Default: ‘inferno’
add_hillshade (Optional bool) – Whether to plot hillshades under your DEMs. Default True. If True, your DEMs should have a .hillshade variable
diff_cmap (Optional str) – Colormap for elevation differences. Default: ‘RdBu’
elevation_clim (Optional Tuple[float, float]) – Tuple for elevation color limits
diff_clim (Optional Tuple[float, float]) – Tuple for difference color limits. Default (-10,10)
figsize (Optional Tuple[int, int]) – Figure size tuple. Will be dynamically adjusted based on number of DEMs and GeoDataFrames so you typically don’t want to adjust this
- Return type:
Axes- Returns:
Dictionary containing the axes objects for each subplot
Notes
All inputs assumed to have the same CRS and to be aligned All DEMs must have variable ‘elevation’ A minimum requirement of 2 DEMs in dem_list A maximum of 5 total datasets (dem_list + gdf_dict) to be passed