Add governed SPW bathymetry analysis
This commit is contained in:
@@ -48,6 +48,8 @@ from app.schemas import (
|
||||
FloodHazardSelectionRequest,
|
||||
BathymetryPartitionFinalizeRequest,
|
||||
BathymetryProfileAcquireRequest,
|
||||
BathymetryRasterSelectionRequest,
|
||||
BathymetryRasterSelectionResponse,
|
||||
ThematicRasterAcquireRequest,
|
||||
ThematicRasterProductRead,
|
||||
ThematicRasterSelectionResponse,
|
||||
@@ -89,6 +91,7 @@ from app.services.terrain_analysis_service import TerrainAnalysisService
|
||||
from app.services.flood_hazard_acquisition_service import FloodHazardAcquisitionService
|
||||
from app.services.flood_hazard_analysis_service import FloodHazardAnalysisService
|
||||
from app.services.bathymetry_profile_acquisition_service import BathymetryProfileAcquisitionService
|
||||
from app.services.bathymetry_raster_analysis_service import BathymetryRasterAnalysisService
|
||||
from app.services.mdk_bathymetry_probe_service import MdkBathymetryProbeService
|
||||
from app.services.thematic_raster_acquisition_service import ThematicRasterAcquisitionService
|
||||
from app.services.thematic_raster_analysis_service import ThematicRasterAnalysisService
|
||||
@@ -888,6 +891,33 @@ def raster_terrain_image(
|
||||
)
|
||||
|
||||
|
||||
@router.post(
|
||||
"/datasets/{dataset_id}/raster/bathymetry/select",
|
||||
response_model=Envelope[BathymetryRasterSelectionResponse],
|
||||
)
|
||||
def raster_bathymetry_selection(
|
||||
project_id: UUID,
|
||||
dataset_id: UUID,
|
||||
payload: BathymetryRasterSelectionRequest,
|
||||
db: Session = Depends(get_db),
|
||||
):
|
||||
return envelope(BathymetryRasterAnalysisService.analyze(db, project_id, dataset_id, payload))
|
||||
|
||||
|
||||
@router.get("/datasets/{dataset_id}/raster/bathymetry/image")
|
||||
def raster_bathymetry_image(
|
||||
project_id: UUID,
|
||||
dataset_id: UUID,
|
||||
db: Session = Depends(get_db),
|
||||
):
|
||||
content = BathymetryRasterAnalysisService.render_png(db, project_id, dataset_id)
|
||||
return Response(
|
||||
content=content,
|
||||
media_type="image/png",
|
||||
headers={"Cache-Control": "private, max-age=86400"},
|
||||
)
|
||||
|
||||
|
||||
@router.post(
|
||||
"/datasets/{dataset_id}/raster/flood-hazard/select",
|
||||
response_model=Envelope[FloodHazardSelectionResponse],
|
||||
|
||||
Reference in New Issue
Block a user