Closed JinIgarashi closed 5 months ago
@vincentsarago I added title
and description
based on #786
for title and description, I copied text from comments in source code, but there might be better title and description for algorithms (especially for terrarium and terrainrgb)
new response of /algorithm endpoint is shown at the below.
@vincentsarago I just got notification email for CI. I have no idea why only 3.10 failed. Could you rerun this job for 3.10?
@JinIgarashi it failed because of linting issue. do you have pre-commit installed?
@vincentsarago ah, I see. sorry I missed the info at CONTRIBUTING.md. I will install pre-commit. also, thank you for merging the PR
@vincentsarago
Based on the discussion here (https://github.com/developmentseed/titiler/discussions/760), I added min/max settings for algorithms parameters. I think these min/max values can be useful to create UI parts dynamically from titiler endpoint.
some parameters are straightforward to set min/max values, but some are not easy to set. Could you also check these min/max values are appropriate?
settings are shown as follow.
Hillshade
Contours
/algorithms endpoint response
```json { "hillshade":{ "inputs":{ "nbands":1 }, "outputs":{ "nbands":1, "dtype":"uint8", "min":null, "max":null }, "parameters":{ "azimuth":{ "default":90, "exclusiveMaximum":360, "minimum":0, "title":"Azimuth", "type":"integer" }, "angle_altitude":{ "default":90, "exclusiveMaximum":90, "minimum":-90, "title":"Angle Altitude", "type":"number" }, "buffer":{ "default":3, "exclusiveMaximum":99, "minimum":0, "title":"Buffer", "type":"integer" } } }, "contours":{ "inputs":{ "nbands":1 }, "outputs":{ "nbands":3, "dtype":"uint8", "min":null, "max":null }, "parameters":{ "increment":{ "default":35, "minimum":0, "title":"Increment", "type":"integer" }, "thickness":{ "default":1, "minimum":0, "title":"Thickness", "type":"integer" }, "minz":{ "default":-12000, "exclusiveMaximum":99999, "minimum":-99999, "title":"Minz", "type":"integer" }, "maxz":{ "default":8000, "exclusiveMaximum":99999, "minimum":-99999, "title":"Maxz", "type":"integer" } } }, "normalizedIndex":{ "inputs":{ "nbands":2 }, "outputs":{ "nbands":1, "dtype":"float32", "min":[ -1 ], "max":[ 1 ] }, "parameters":{ } }, "terrarium":{ "inputs":{ "nbands":1 }, "outputs":{ "nbands":3, "dtype":"uint8", "min":null, "max":null }, "parameters":{ } }, "terrainrgb":{ "inputs":{ "nbands":1 }, "outputs":{ "nbands":3, "dtype":"uint8", "min":null, "max":null }, "parameters":{ "interval":{ "default":0.1, "exclusiveMaximum":1, "minimum":0, "title":"Interval", "type":"number" }, "baseval":{ "default":-10000, "exclusiveMaximum":99999, "minimum":-99999, "title":"Baseval", "type":"number" } } } } ```