From aab97c8be46684d403872cf32fc5a6f8b4f65dc3 Mon Sep 17 00:00:00 2001 From: Alessandro Amici Date: Sat, 10 Feb 2024 00:21:04 +0100 Subject: [PATCH] Take source_crs from dem_3d by default --- sarsen/scene.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/sarsen/scene.py b/sarsen/scene.py index fd9b0a2..1ac69c2 100644 --- a/sarsen/scene.py +++ b/sarsen/scene.py @@ -40,10 +40,12 @@ def convert_to_dem_3d( def transform_dem_3d( dem_3d: xr.DataArray, - source_crs: str, + source_crs: str = None, target_crs: str = ECEF_CRS, dim: str = "axis", ) -> xr.DataArray: + if source_crs is None: + source_crs = dem_3d.rio.crs try: x, y, z = warp.transform( source_crs,