Published
Edited
Jun 4, 2021
1 star
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
geotiff = require("geotiff")
Insert cell
Insert cell
Insert cell
Insert cell
example = geotiff.fromUrl(url)
Insert cell
Insert cell
image = example.getImage()
Insert cell
Insert cell
image.getBoundingBox()
Insert cell
image.getWidth()
Insert cell
Insert cell
example.getImageCount()
Insert cell
thumbnail = example.getImage(5)
Insert cell
Insert cell
md`That’s much more manageable. Let’s load it:`
Insert cell
{
let data = await readImageData(thumbnail);
let c = DOM.context2d(data.width, data.height, 1);
c.putImageData(data, 0, 0);
return c.canvas;
}
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell

Purpose-built for displays of data

Observable is your go-to platform for exploring data and creating expressive data visualizations. Use reactive JavaScript notebooks for prototyping and a collaborative canvas for visual data exploration and dashboard creation.
Learn more