Skip to content

Commit

Permalink
Add nodata to geotiff source (#198)
Browse files Browse the repository at this point in the history
  • Loading branch information
gjmooney authored Nov 6, 2024
1 parent 6ecdd6f commit e8c5b1e
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion packages/base/src/mainview/mainView.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -395,8 +395,12 @@ export class MainView extends React.Component<IProps, IStates> {
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
});
Expand Down

0 comments on commit e8c5b1e

Please sign in to comment.