Skip to content

Commit

Permalink
Finalize minor improvements
Browse files Browse the repository at this point in the history
  • Loading branch information
rhugonnet committed Mar 19, 2024
1 parent 0ec4e73 commit 9281f8d
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion examples/basic/plot_dem_subtraction.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
Subtracting a DEM with another one should be easy.
xDEM allows to use any operator on :class:`xdem.DEM` objects, such as :func:`+<operator.add>` or :func:``-<operator.sub>`` as well as most NumPy functions
xDEM allows to use any operator on :class:`xdem.DEM` objects, such as :func:`+<operator.add>` or :func:`-<operator.sub>` as well as most NumPy functions
while respecting nodata values and checking that georeferencing is consistent. This functionality is inherited from `GeoUtils' Raster class <https://geoutils.readthedocs.io>`_.
Before DEMs can be compared, they need to be reprojected to the same grid and have the same 3D CRSs. The :func:`geoutils.Raster.reproject` and :func:`xdem.DEM.to_vcrs` methods are used for this.
Expand Down Expand Up @@ -50,6 +50,7 @@

# Load the outlines
glacier_outlines = gu.Vector(xdem.examples.get_path("longyearbyen_glacier_outlines"))
glacier_outlines = glacier_outlines.crop(ddem, clip=True)
ddem.plot(cmap="coolwarm_r", vmin=-20, vmax=20, cbar_title="Elevation change (m)")
glacier_outlines.plot(ref_crs=ddem, fc="none", ec="k")

Expand Down

0 comments on commit 9281f8d

Please sign in to comment.