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

Revert "fix titiler parameters for 0.11.x api" #208

Merged
merged 1 commit into from
Jul 24, 2023
Merged
Show file tree
Hide file tree
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: 0 additions & 10 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,16 +5,6 @@ All notable changes to this project will be documented in this file.
The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/)
and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.html).

## Unreleased

## Fixed

- Parameters used by scene tiling updated for TiTiler 0.11.x. Previously, parameters
were for TiTiler 0.6.0. The `bidx`
parameter was named `asset_bidx` and the `assets` parameter was to be passed once for
each value instead of with a comma-separated list of values. It is unknown when these
parameters changed, but it is recommended that TiTiler >= 0.11.x is used.

## 2.1.0

### Changed
Expand Down
16 changes: 0 additions & 16 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@
- [Summary](#summary)
- [Screenshots](#screenshots)
- [Running](#running)
- [TiTiler](#titiler)
- [Environment Files](#environment-files)
- [Links](#links)
- [Scripts](#scripts)
Expand Down Expand Up @@ -54,21 +53,6 @@ Sentinel-2 L2A Mosaic View

## Running

### TiTiler

The scene and mosaic views require instances of TiTiler be deployed and configured.

The configuration `SCENE_TILER_URL` must be pointed at a TiTiler deployment. At
least 0.11.x is recommended, but this may work with other versions 0.7.x and greater.

The configuration `MOSAIC_TILER_URL` must be pointed at a deployment of the
[Element 84 TiTiler MosaicJSON fork](https://github.com/Element84/titiler-mosaicjson)
of the [NASA IMPACT Titiler fork](https://github.com/NASA-IMPACT/titiler). This
adds support for creating mosaics from STAC API searches to Titiler.

If the Mosiac TiTiler is deployed, it can be used for both the scene and mosaic tiler URL
configurations.

### Environment Files

For local development, you should create an `.env` & `./src/assets/config.js` file with appropriate variables outlined in the table below.
Expand Down
7 changes: 5 additions & 2 deletions src/utils/mapHelper.js
Original file line number Diff line number Diff line change
Expand Up @@ -410,7 +410,10 @@ const constructSceneAssetsParam = (collection, tilerParams) => {
console.log(`Assets not defined for ${collection}`)
return [null, '']
}
return [assets[0], `assets=${assets.join(',')}`]
// titiler accepts multiple `assets` parameters for compositing
// multiple files, so add extra params here if there's more than
// one asset specified
return [assets[0], `assets=${assets.join('&assets=')}`]
}

const parameters = {
Expand All @@ -435,7 +438,7 @@ const parameters = {
// for scene tiler
if (asset) {
const assetBidx = asset && value ? `${asset}|${value}` : null
return assetBidx && `bidx=${assetBidx}`
return assetBidx && `asset_bidx=${assetBidx}`
} else {
return value && `bidx=${value}`
}
Expand Down