From e8c5b1e8577ef33e9440ca5766dd4bb70c6b0d64 Mon Sep 17 00:00:00 2001 From: Greg Mooney Date: Wed, 6 Nov 2024 12:05:33 +0100 Subject: [PATCH] Add nodata to geotiff source (#198) --- packages/base/src/mainview/mainView.tsx | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/packages/base/src/mainview/mainView.tsx b/packages/base/src/mainview/mainView.tsx index 81590c50..5a597f12 100644 --- a/packages/base/src/mainview/mainView.tsx +++ b/packages/base/src/mainview/mainView.tsx @@ -395,8 +395,12 @@ export class MainView extends React.Component { case 'GeoTiffSource': { const sourceParameters = source.parameters as IGeoTiffSource; + const addNoData = (url: (typeof sourceParameters.urls)[0]) => { + return { ...url, nodata: 0 }; + }; + newSource = new GeoTIFFSource({ - sources: sourceParameters.urls, + sources: sourceParameters.urls.map(addNoData), normalize: sourceParameters.normalize, wrapX: sourceParameters.wrapX });