Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
row.push(value);
}
}
}
values.push(row);
}
const metadata = _.pick(georaster, ...[
'noDataValue',
'projection',
'xmin',
'ymax',
'pixelWidth',
'pixelHeight'
]);
return parseGeoraster([values], metadata).then(georaster => resolve(georaster));
} catch(e) {
console.error(e);
return reject(e);
}
});
};
row.push(value);
}
}
}
values.push(row);
}
const metadata = _.pick(georaster, ...[
'noDataValue',
'projection',
'xmin',
'ymax',
'pixelWidth',
'pixelHeight'
]);
return parseGeoraster([values], metadata).then(georaster => resolve(georaster));
} catch(e) {
console.error(e);
return reject(e);
}
});
};
async function parseGeorasterWithErrorHandling (arrayBuffer) {
try {
return await parseGeoraster(arrayBuffer);
} catch (error) {
throw new Error(ERROR_PARSING_GEOTIFF);
}
}