From ed4d79e5ab2ee49f0f02b37d49bb1491d2d1c167 Mon Sep 17 00:00:00 2001 From: Zhihao <7567311+liuh886@users.noreply.github.com> Date: Tue, 26 Mar 2024 03:41:32 +0100 Subject: [PATCH] issue 496 - area_or_point --- xdem/dem.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/xdem/dem.py b/xdem/dem.py index b81cb1ff..90b93494 100644 --- a/xdem/dem.py +++ b/xdem/dem.py @@ -159,6 +159,8 @@ def from_array( transform: tuple[float, ...] | Affine, crs: CRS | int | None, nodata: int | float | None = None, + area_or_point: Literal["Area", "Point"] | None = None, # Add this line + tags: dict[str, Any] = None, vcrs: Literal["Ellipsoid"] | Literal["EGM08"] | Literal["EGM96"] @@ -181,7 +183,7 @@ def from_array( :returns: DEM created from the provided array and georeferencing. """ # We first apply the from_array of the parent class - rast = SatelliteImage.from_array(data=data, transform=transform, crs=crs, nodata=nodata) + rast = SatelliteImage.from_array(data=data, transform=transform, crs=crs, nodata=nodata, area_or_point=area_or_point) # Then add the vcrs to the class call (that builds on top of the parent class) return cls(filename_or_dataset=rast, vcrs=vcrs)