-
Notifications
You must be signed in to change notification settings - Fork 179
Closed
Labels
enhancementNew feature or requestNew feature or request
Description
titiler/titiler/endpoints/stac.py
Lines 24 to 74 in 5a87f85
@dataclass | |
class AssetsBidxParams(DefaultDependency): | |
"""Asset and Band indexes parameters.""" | |
assets: Optional[str] = Query( | |
None, | |
title="Asset indexes", | |
description="comma (',') delimited asset names (might not be an available options of some readers)", | |
) | |
bidx: Optional[str] = Query( | |
None, title="Band indexes", description="comma (',') delimited band indexes", | |
) | |
def __post_init__(self): | |
"""Post Init.""" | |
if self.assets is not None: | |
self.kwargs["assets"] = self.assets.split(",") | |
if self.bidx is not None: | |
self.kwargs["indexes"] = tuple( | |
int(s) for s in re.findall(r"\d+", self.bidx) | |
) | |
@dataclass | |
class AssetsBidxExprParams(DefaultDependency): | |
"""Assets, Band Indexes and Expression parameters.""" | |
assets: Optional[str] = Query( | |
None, | |
title="Asset indexes", | |
description="comma (',') delimited asset names (might not be an available options of some readers)", | |
) | |
expression: Optional[str] = Query( | |
None, | |
title="Band Math expression", | |
description="rio-tiler's band math expression (e.g B1/B2)", | |
) | |
bidx: Optional[str] = Query( | |
None, title="Band indexes", description="comma (',') delimited band indexes", | |
) | |
def __post_init__(self): | |
"""Post Init.""" | |
if self.assets is not None: | |
self.kwargs["assets"] = self.assets.split(",") | |
if self.expression is not None: | |
self.kwargs["expression"] = self.expression | |
if self.bidx is not None: | |
self.kwargs["indexes"] = tuple( | |
int(s) for s in re.findall(r"\d+", self.bidx) | |
) |
Metadata
Metadata
Assignees
Labels
enhancementNew feature or requestNew feature or request
Activity