Add demo raster workflow smoke
This commit is contained in:
@@ -199,6 +199,13 @@ class RasterOperationsService:
|
||||
preview_width = 1
|
||||
return preview_width, preview_height
|
||||
|
||||
@staticmethod
|
||||
def _window_bounds_to_list(bounds: Any) -> list[float]:
|
||||
if isinstance(bounds, (list, tuple)) and len(bounds) == 4:
|
||||
left, bottom, right, top = bounds
|
||||
return [float(left), float(bottom), float(right), float(top)]
|
||||
return [float(bounds.left), float(bounds.bottom), float(bounds.right), float(bounds.top)]
|
||||
|
||||
@staticmethod
|
||||
def _normalize_preview_data(data: Any) -> Any:
|
||||
try:
|
||||
@@ -972,7 +979,7 @@ class RasterOperationsService:
|
||||
{
|
||||
"path": str(tile_path),
|
||||
"pixel_window": [int(xoff), int(yoff), int(tile_width), int(tile_height)],
|
||||
"bounds": [float(bounds.left), float(bounds.bottom), float(bounds.right), float(bounds.top)],
|
||||
"bounds": RasterOperationsService._window_bounds_to_list(bounds),
|
||||
"transform": [float(item) for item in transform.to_gdal()],
|
||||
"index": tile_index,
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user