Skip to content

Commit

Permalink
Also use band name from raster:bands if present
Browse files Browse the repository at this point in the history
  • Loading branch information
m-mohr committed May 18, 2022
1 parent c97ebf8 commit 623a712
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions src/formats/geotiff.js
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,13 @@ class GeoTIFF extends SupportedFormat {
// Get min/max/nodata from STAC raster:bands
if (Array.isArray(this['raster:bands']) && this['raster:bands'].length > 0) {
this['raster:bands'].forEach((band, i) => {
// Get name from band
if (band.name) {
this.setBandInfo(i, {
name: band.name
});
}

// Set min/max from statistics
if (Utils.isObject(band.statistics)) {
this.setBandInfo(i, {
Expand Down

0 comments on commit 623a712

Please sign in to comment.