From e1feb4156fc318cad0aea27eef7b3d4fc846937c Mon Sep 17 00:00:00 2001 From: Taylor Denouden Date: Fri, 31 Jan 2025 14:39:18 -0800 Subject: [PATCH] Add output min and max metadata to slope algorithm (#1089) * Add output min and max metadata to slope algorithm * Update changelog --- CHANGES.md | 6 ++++++ src/titiler/core/titiler/core/algorithm/dem.py | 2 ++ 2 files changed, 8 insertions(+) diff --git a/CHANGES.md b/CHANGES.md index 79e0e9ad9..335f0337a 100644 --- a/CHANGES.md +++ b/CHANGES.md @@ -1,5 +1,11 @@ # Release Notes +## Unreleased + +### titiler.core + +* add `output_min` and `output_max` metadata attributes to `slope` algorithm (@tayden, https://github.com/developmentseed/titiler/pull/1089) + ## 0.21.1 (2025-01-29) ### titiler.core diff --git a/src/titiler/core/titiler/core/algorithm/dem.py b/src/titiler/core/titiler/core/algorithm/dem.py index f85a927a1..8c5a2ed2c 100644 --- a/src/titiler/core/titiler/core/algorithm/dem.py +++ b/src/titiler/core/titiler/core/algorithm/dem.py @@ -76,6 +76,8 @@ class Slope(BaseAlgorithm): input_nbands: int = 1 output_nbands: int = 1 output_dtype: str = "float32" + output_min: float = 0 + output_max: float = 90 def __call__(self, img: ImageData) -> ImageData: """Calculate degrees slope from DEM dataset."""