@@ -809,38 +809,6 @@ def sar_backscatter(self, args: SarBackscatterArgs) -> "DryRunDataCube":
809
809
def resolution_merge (self , args : ResolutionMergeArgs ) -> "DryRunDataCube" :
810
810
return self ._process ("resolution_merge" , args )
811
811
812
- def resample_spatial (
813
- self ,
814
- resolution : Union [float , Tuple [float , float ]],
815
- projection : Union [int , str ] = None ,
816
- method : str = "near" ,
817
- align : str = "upper-left" ,
818
- ):
819
- #resampled_metadata = self._resample_spatial_metadata(resolution, projection)
820
- return self ._process (
821
- "resample_spatial" ,
822
- arguments = {"resolution" : resolution , "projection" : projection , "method" : method , "align" : align },
823
- #metadata=resampled_metadata
824
- )
825
-
826
- def _resample_spatial_metadata (self , resolution : Union [float , Tuple [float , float ]], projection : Union [int , str ] = None ):
827
- dims : Dict [str ,SpatialDimension ] = {dim .name :dim for dim in self .metadata .spatial_dimensions }
828
-
829
- if "x" in dims and "y" in dims :
830
- box = BoundingBox (west = dims ["x" ].extent [0 ], south = dims ["y" ].extent [0 ], east = dims ["x" ].extent [1 ],
831
- north = dims ["y" ].extent [1 ])
832
- if projection is not None :
833
- box = box .reproject (projection )
834
- resolution = (resolution , resolution ) if isinstance (resolution , float ) else resolution
835
- if resolution is None :
836
- resolution = (dims ["x" ].step , dims ["y" ].step )
837
- return (self .metadata .drop_dimension ("x" ).drop_dimension ("y" )
838
- .add_dimension (SpatialDimension (name = "x" , extent = [box .west ,box .east ], step = resolution [0 ], crs = projection or dims ["x" ].crs ))
839
- .add_dimension (SpatialDimension (name = "y" , extent = [box .south , box .north ], step = resolution [1 ],crs = projection or dims ["x" ].crs )))
840
-
841
- else :
842
- return self .metadata
843
-
844
812
845
813
def apply_kernel (self , kernel : numpy .ndarray , factor = 1 , border = 0 , replace_invalid = 0 ) -> 'DriverDataCube' :
846
814
cube = self ._process ("process_type" , [ProcessType .FOCAL_SPACE ])
0 commit comments