Skip to content

Commit

Permalink
minor: remove unnecessary else
Browse files Browse the repository at this point in the history
  • Loading branch information
adebardo committed Oct 25, 2024
1 parent d55cc43 commit 83a0b1e
Showing 1 changed file with 11 additions and 13 deletions.
24 changes: 11 additions & 13 deletions xdem/dem.py
Original file line number Diff line number Diff line change
Expand Up @@ -251,8 +251,7 @@ def ccrs(self) -> CompoundCRS | CRS | None:
if self.vcrs is not None:
ccrs = _build_ccrs_from_crs_and_vcrs(crs=self.crs, vcrs=self.vcrs)
return ccrs
else:
return None
return None

@overload
def to_vcrs(
Expand Down Expand Up @@ -362,17 +361,16 @@ def to_vcrs(
self.set_vcrs(new_vcrs=vcrs)
return None
# Otherwise, return new DEM
else:
return DEM.from_array(
data=new_data,
transform=self.transform,
crs=self.crs,
nodata=self.nodata,
area_or_point=self.area_or_point,
tags=self.tags,
vcrs=vcrs,
cast_nodata=False,
)
return DEM.from_array(
data=new_data,
transform=self.transform,
crs=self.crs,
nodata=self.nodata,
area_or_point=self.area_or_point,
tags=self.tags,
vcrs=vcrs,
cast_nodata=False,
)

@copy_doc(terrain, remove_dem_res_params=True)
def slope(
Expand Down

0 comments on commit 83a0b1e

Please sign in to comment.