Closed emmanuelmathot closed 4 months ago
thanks @emmanuelmathot
I believe, this is a rio-tiler issue.
Can you open an issue there? the problem is somewhere in https://github.com/cogeotiff/rio-tiler/blob/main/rio_tiler/expression.py#L12-L37
Trying to reproduce the error in rio-tiler, I think the error comes from the data. I make more tests and open an issue if the problem comes from there
Issue due to wrong statistics in STAC Item. Fixed in https://github.com/cogeotiff/rio-tiler/pull/695
Problem description
Doing a request similar to
/stac/tiles/WebMercatorQuad/9/451/76.png?url=s3%3A%2F%2Fdc-development-catalog%2Fcalls%2Fcall-969%2FcalibratedDatasets%2FS2A_MSIL2A_20230928T042551_N0509_R133_T54XVM_20230928T053752-calibrated%2FS2A_MSIL2A_20230928T042551_N0509_R133_T54XVM_20230928T053752-calibrated.json&rescale=0%2C1&resampling_method=average&resampling=nearest&expression=where((s2cloudless_clp%3E0.5)%2C1%2C0)%3B&asset_as_band=true
Titiler returns the following error:
The error is raised when the
expression
parameter contains a reference to an asset with a name containing an underscore_
. Heres2cloudless_clp
. Using a asset name with no underscore works well (e.g.red
)Expected Output
Correctly processed tile
Environment Information
Titiler from 0.14.0 to 0.18.0 container
ghcr.io/developmentseed/titiler:0.18.0
+boto3
andrio-stac
Debug log
Analysis
Problem seems to come from
rio-tiler
. Checking further that way.