Skip to content

Commit

Permalink
issue 496 - area_or_point
Browse files Browse the repository at this point in the history
  • Loading branch information
liuh886 committed Mar 26, 2024
1 parent 453932c commit ed4d79e
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion xdem/dem.py
Original file line number Diff line number Diff line change
Expand Up @@ -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"]
Expand All @@ -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)

Expand Down

0 comments on commit ed4d79e

Please sign in to comment.