Skip to content

Commit

Permalink
Merge pull request #208 from Element84/pv/titiler-param-changes
Browse files Browse the repository at this point in the history
Revert "fix titiler parameters for 0.11.x api"
  • Loading branch information
Phil Varner authored Jul 24, 2023
2 parents feeb165 + 5ec4b95 commit 350ce8c
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 28 deletions.
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

0 comments on commit 350ce8c

Please sign in to comment.