Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add tiling object example and description in the README #28

Conversation

abarciauskas-bgse
Copy link

@abarciauskas-bgse abarciauskas-bgse commented Sep 27, 2023

Adds tiling as an optional value for the format of processing:expression. Also adds a collection example and description in the README.

@abarciauskas-bgse
Copy link
Author

I don't have the power to assign reviewers so tagging @emmanuelmathot @vincentsarago and @smohiudd

"rescale": [-215,215],
"resampling": "bilinear",
"colormap_name": "rdbu_r",
"bidx": 1

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Minor comment: the bidx property was expected to be an array. I.e. "bidx":[1]

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Technically for titiler, when using the stac endpoint it should be assets_bidx in form of list of string {asset_name}|{bidx,bidx,bidx}

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

oh interesting. Perhaps we should include an example for doing it either way in case the client is not using the stac endpoint and is calling titiler with the asset href directly?

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think it's fine, it really dependent if we want to make this a titiler extension or not. I think keeping bidx is fine!

@@ -88,6 +90,9 @@ Potential expression formats with examples:
| `gdal-calc` | string | A [`gdal_calc.py`](https://gdal.org/programs/gdal_calc.html) expression based on numpy syntax. | `A*logical_or(A<=177,A>=185)` |
| `openeo` | object | [openEO process](https://openeo.org/documentation/1.0/developers/api/reference.html#section/Processes) | [Example](https://raw.githubusercontent.com/Open-EO/openeo-processes/1.2.0/normalized_difference.json) |
| `rio-calc` | string | A [rio-calc](https://rasterio.readthedocs.io/en/latest/topics/calc.html) (RasterIO) expression | `(b4-b1)/(b4+b1)` |
| `tiling` | object | key value pairs describing how to tile the data, for example `{ "colormap": "viridis", "rescale": [0,1], "resampling": "nearest" }`. See [`collection-modis-landcover-houston.json`](./examples/collection-modis-landcover-houston.json) for an example. |
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Wouldn't rescale be solved by providing statistics (i.e. bands can have min/max statistics).

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

depends if you want to rescale using custom min/max instead of dataset min/max

@m-mohr
Copy link
Contributor

m-mohr commented Sep 27, 2023

I don't think this is the right place. The field description says: "An expression or processing chain that describes how the data has been processed." But here it is how the data is meant to be processed/visualized,.

@abarciauskas-bgse
Copy link
Author

@m-mohr good point - @emmanuelmathot I was under the impression that this processing:expression indicated how the data should be processed in order to generate the virtual asset. I realize it may not be acceptable to relax the definition so that it could be either how the data has been processed or how the data should be processed so which one should it be and do we need another way to indicate the alternative.

@abarciauskas-bgse
Copy link
Author

recapping discussion with @emmanuelmathot we are going to discuss how to include tiling parameters elsewhere (perhaps in assets or in web_map_links). This is because, from what I understand, processing is not the right place for how the data should be processed by a tiling server.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants