georaster
Version:
Wrapper around Georeferenced Rasters like GeoTIFF, NetCDF, JPG, and PNG that provides a standard interface
31 lines (29 loc) • 1.09 kB
HTML
<html>
<head>
<script src="../dist/georaster.browser.bundle.min.js"></script>
</head>
<body>
<div id="container"></div>
<script>
fetch("https://s3.amazonaws.com/geoblaze/wildfires.tiff")
.then(response => response.arrayBuffer())
.then(parseGeoraster)
.then(georaster => {
console.log("georaster", georaster);
const canvas = georaster.toCanvas({ height: 500, width: 500 });
console.log("canvas:", canvas);
document.getElementById("container").appendChild(canvas);
});
fetch("https://s3.amazonaws.com/geoblaze/LC08_L1TP_045032_20180811_20180815_01_T1_B7_100x100.TIF")
.then(response => response.arrayBuffer())
.then(parseGeoraster)
.then(georaster => {
console.log("georaster", georaster);
const canvas = georaster.toCanvas({ height: 500, width: 500 });
console.log("canvas:", canvas);
document.getElementById("container").appendChild(canvas);
});
</script>
</body>
</html>