Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

POC CNES/CS PR #611

Draft
wants to merge 1 commit into
base: main
Choose a base branch
from
Draft
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading