From 65bba2f186d2c70a44e3eb10d839a33f6e6387b7 Mon Sep 17 00:00:00 2001 From: vincentsarago Date: Wed, 1 Mar 2023 17:04:35 +0100 Subject: [PATCH] fix documentation issue about asset_bidx --- CHANGES.md | 1 + docs/src/endpoints/stac.md | 20 +++++++++---------- src/titiler/core/titiler/core/dependencies.py | 6 +++--- 3 files changed, 14 insertions(+), 13 deletions(-) diff --git a/CHANGES.md b/CHANGES.md index a2eabe420..4922f3796 100644 --- a/CHANGES.md +++ b/CHANGES.md @@ -6,6 +6,7 @@ * switch to `ruff` for python linting * update pre-commit configuration * documentation fixes 🙏 (authors @jthetzel, @neilsh) +* fix documentation about `asset_bidx` ### titiler.core diff --git a/docs/src/endpoints/stac.md b/docs/src/endpoints/stac.md index f142aa01a..604a3eed1 100644 --- a/docs/src/endpoints/stac.md +++ b/docs/src/endpoints/stac.md @@ -45,7 +45,7 @@ The `/stac` routes are based on `titiler.core.factory.MultiBaseTilerFactory` but - **assets** (array[str]): asset names. - **expression** (str): rio-tiler's math expression with asset names (e.g `Asset1_b1/Asset2_b1`). - **asset_as_band** (bool): tell rio-tiler that each asset is a 1 band dataset, so expression `Asset1/Asset2` can be passed. - - **asset_bidx** (array[str]): Per asset band math expression (e.g `Asset1|1;2;3`). + - **asset_bidx** (array[str]): Per asset band math expression (e.g `Asset1|1,2,3`). - **nodata** (str, int, float): Overwrite internal Nodata value. - **unscale** (bool): Apply dataset internal Scale/Offset. - **resampling** (str): rasterio resampling method. Default is `nearest`. @@ -80,7 +80,7 @@ Example: - **assets** (array[str]): asset names. - **expression** (str): rio-tiler's math expression with asset names (e.g `Asset1_b1/Asset2_b1`). - **asset_as_band** (bool): tell rio-tiler that each asset is a 1 band dataset, so expression `Asset1/Asset2` can be passed. - - **asset_bidx** (array[str]): Per asset band math expression (e.g `Asset1|1;2;3`). + - **asset_bidx** (array[str]): Per asset band math expression (e.g `Asset1|1,2,3`). - **max_size** (int): Max image size, default is 1024. - **height** (int): Force output image height. - **width** (int): Force output image width. @@ -123,7 +123,7 @@ Example: - **assets** (array[str]): asset names. - **expression** (str): rio-tiler's math expression with asset names (e.g `Asset1_b1/Asset2_b1`). - **asset_as_band** (bool): tell rio-tiler that each asset is a 1 band dataset, so expression `Asset1/Asset2` can be passed. - - **asset_bidx** (array[str]): Per asset band math expression (e.g `Asset1|1;2;3`). + - **asset_bidx** (array[str]): Per asset band math expression (e.g `Asset1|1,2,3`). - **max_size** (int): Max image size, default is 1024. - **nodata** (str, int, float): Overwrite internal Nodata value. - **unscale** (bool): Apply dataset internal Scale/Offset. @@ -161,7 +161,7 @@ Example: - **assets** (array[str]): asset names. - **expression** (str): rio-tiler's math expression with asset names (e.g `Asset1_b1/Asset2_b1`). - **asset_as_band** (bool): tell rio-tiler that each asset is a 1 band dataset, so expression `Asset1/Asset2` can be passed. - - **asset_bidx** (array[str]): Per asset band math expression (e.g `Asset1|1;2;3`). + - **asset_bidx** (array[str]): Per asset band math expression (e.g `Asset1|1,2,3`). - **max_size** (int): Max image size, default is 1024. - **nodata** (str, int, float): Overwrite internal Nodata value. - **unscale** (bool): Apply dataset internal Scale/Offset. @@ -197,7 +197,7 @@ Example: - **assets** (array[str]): asset names. - **expression** (str): rio-tiler's math expression with asset names (e.g `Asset1_b1/Asset2_b1`). - **asset_as_band** (bool): tell rio-tiler that each asset is a 1 band dataset, so expression `Asset1/Asset2` can be passed. - - **asset_bidx** (array[str]): Per asset band math expression (e.g `Asset1|1;2;3`). + - **asset_bidx** (array[str]): Per asset band math expression (e.g `Asset1|1,2,3`). - **nodata** (str, int, float): Overwrite internal Nodata value. - **unscale** (bool): Apply dataset internal Scale/Offset. - **resampling** (str): rasterio resampling method. Default is `nearest`. @@ -221,7 +221,7 @@ Example: - **assets** (array[str]): asset names. - **expression** (str): rio-tiler's math expression with asset names (e.g `Asset1_b1/Asset2_b1`). - **asset_as_band** (bool): tell rio-tiler that each asset is a 1 band dataset, so expression `Asset1/Asset2` can be passed. - - **asset_bidx** (array[str]): Per asset band math expression (e.g `Asset1|1;2;3`). + - **asset_bidx** (array[str]): Per asset band math expression (e.g `Asset1|1,2,3`). - **tile_format** (str): Output image format, default is set to None and will be either JPEG or PNG depending on masked value. - **tile_scale** (int): Tile size scale, default is set to 1 (256x256). - **minzoom** (int): Overwrite default minzoom. @@ -259,7 +259,7 @@ Example: - **assets** (array[str]): asset names. - **expression** (str): rio-tiler's math expression with asset names (e.g `Asset1_b1/Asset2_b1`). - **asset_as_band** (bool): tell rio-tiler that each asset is a 1 band dataset, so expression `Asset1/Asset2` can be passed. - - **asset_bidx** (array[str]): Per asset band math expression (e.g `Asset1|1;2;3`). + - **asset_bidx** (array[str]): Per asset band math expression (e.g `Asset1|1,2,3`). - **tile_format** (str): Output image format, default is set to None and will be either JPEG or PNG depending on masked value. - **tile_scale** (int): Tile size scale, default is set to 1 (256x256). - **minzoom** (int): Overwrite default minzoom. @@ -334,7 +334,7 @@ Example: - QueryParams: - **url** (str): STAC Item URL. **Required** - **assets** (array[str]): asset names. Default to all available assets. - - **asset_bidx** (array[str]): Per asset band math expression (e.g `Asset1|1;2;3`). + - **asset_bidx** (array[str]): Per asset band math expression (e.g `Asset1|1,2,3`). - **asset_expression** (array[str]): Per asset band math expression (e.g `Asset1|b1\*b2`). - **max_size** (int): Max image size from which to calculate statistics, default is 1024. - **height** (int): Force image height from which to calculate statistics. @@ -360,7 +360,7 @@ Example: - **assets** (array[str]): asset names. Default to all available assets. - **expression** (str): rio-tiler's math expression with asset names (e.g `Asset1_b1/Asset2_b1`). - **asset_as_band** (bool): tell rio-tiler that each asset is a 1 band dataset, so expression `Asset1/Asset2` can be passed. - - **asset_bidx** (array[str]): Per asset band math expression (e.g `Asset1|1;2;3`). + - **asset_bidx** (array[str]): Per asset band math expression (e.g `Asset1|1,2,3`). - **max_size** (int): Max image size from which to calculate statistics, default is 1024. - **height** (int): Force image height from which to calculate statistics. - **width** (int): Force image width from which to calculate statistics. @@ -388,7 +388,7 @@ Example: - **assets** (array[str]): asset names. Default to all available assets. - **expression** (str): rio-tiler's math expression with asset names (e.g `Asset1_b1/Asset2_b1`). - **asset_as_band** (bool): tell rio-tiler that each asset is a 1 band dataset, so expression `Asset1/Asset2` can be passed. - - **asset_bidx** (array[str]): Per asset band math expression (e.g `Asset1|1;2;3`). + - **asset_bidx** (array[str]): Per asset band math expression (e.g `Asset1|1,2,3`). - **max_size** (int): Max image size from which to calculate statistics, default is 1024. - **height** (int): Force image height from which to calculate statistics. - **width** (int): Force image width from which to calculate statistics. diff --git a/src/titiler/core/titiler/core/dependencies.py b/src/titiler/core/titiler/core/dependencies.py index f9a436839..64f822537 100644 --- a/src/titiler/core/titiler/core/dependencies.py +++ b/src/titiler/core/titiler/core/dependencies.py @@ -161,16 +161,16 @@ class AssetsBidxExprParams(DefaultDependency): asset_indexes: Optional[Sequence[str]] = Query( None, title="Per asset band indexes", - description="Per asset band indexes", + description="Per asset band indexes (coma separated indexes)", alias="asset_bidx", examples={ "one-asset": { "description": "Return indexes 1,2,3 of asset `data`.", - "value": ["data|1;2;3"], + "value": ["data|1,2,3"], }, "multi-assets": { "description": "Return indexes 1,2,3 of asset `data` and indexes 1 of asset `cog`", - "value": ["data|1;2;3", "cog|1"], + "value": ["data|1,2,3", "cog|1"], }, }, )