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 band index description to markdown cells #814

Merged
merged 1 commit into from
May 7, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 8 additions & 2 deletions docs/src/examples/notebooks/Working_with_STAC_simple.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -261,7 +261,7 @@
"cell_type": "markdown",
"metadata": {},
"source": [
"Apply Expression between assets"
"Use an expression to calculate a band index (NDVI) based on information contained in multiple assets."
]
},
{
Expand Down Expand Up @@ -302,6 +302,13 @@
"m"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"If you don't use the `asset_as_band=True` option, you need to append the band to the asset name within the expression. For example, `nir` becomes `nir_b1`."
]
},
{
"cell_type": "code",
"execution_count": null,
Expand All @@ -313,7 +320,6 @@
" f\"{titiler_endpoint}/stac/WebMercatorQuad/tilejson.json\",\n",
" params = (\n",
" (\"url\", stac_item),\n",
" # if you don't use `asset_as_band=True` option you need to pass the band indexes within the expression\n",
" (\"expression\", \"(nir_b1-red_b1)/(nir_b1+red_b1)\"), # NDVI\n",
" (\"rescale\", \"-1,1\"),\n",
" (\"minzoom\", 8),\n",
Expand Down