Extract nodata values from metadata when possible
This commit is contained in:
@@ -59,7 +59,7 @@ const map = new Map({
|
||||
],
|
||||
view: new View({
|
||||
center: [1900000, 6100000],
|
||||
zoom: 15,
|
||||
zoom: 13,
|
||||
minZoom: 10,
|
||||
}),
|
||||
});
|
||||
|
||||
@@ -80,13 +80,11 @@ const map = new Map({
|
||||
{
|
||||
// visible red, band 1 in the style expression above
|
||||
url: 'https://sentinel-cogs.s3.us-west-2.amazonaws.com/sentinel-s2-l2a-cogs/2020/S2A_36QWD_20200701_0_L2A/B04.tif',
|
||||
nodata: 0,
|
||||
max: 10000,
|
||||
},
|
||||
{
|
||||
// near infrared, band 2 in the style expression above
|
||||
url: 'https://sentinel-cogs.s3.us-west-2.amazonaws.com/sentinel-s2-l2a-cogs/2020/S2A_36QWD_20200701_0_L2A/B08.tif',
|
||||
nodata: 0,
|
||||
max: 10000,
|
||||
},
|
||||
],
|
||||
|
||||
@@ -4,8 +4,7 @@ title: Cloud Optimized GeoTIFF (COG)
|
||||
shortdesc: Rendering a COG as a tiled layer.
|
||||
docs: >
|
||||
Tiled data from a Cloud Optimized GeoTIFF (COG) can be rendered as a layer. In this
|
||||
example, a single 3-band GeoTIFF is used to render RGB data. The `nodata` property is
|
||||
used to avoid rendering pixels where all three bands are 0.
|
||||
example, a single 3-band GeoTIFF is used to render RGB data.
|
||||
tags: "cog"
|
||||
---
|
||||
<div id="map" class="map"></div>
|
||||
|
||||
@@ -26,7 +26,6 @@ const map = new Map({
|
||||
sources: [
|
||||
{
|
||||
url: 'https://sentinel-cogs.s3.us-west-2.amazonaws.com/sentinel-s2-l2a-cogs/2020/S2A_36QWD_20200701_0_L2A/TCI.tif',
|
||||
nodata: 0,
|
||||
},
|
||||
],
|
||||
}),
|
||||
|
||||
Reference in New Issue
Block a user