Published
Edited
Aug 4, 2021
6 forks
19 stars
Insert cell
Insert cell
geotiff = require("geotiff.js@1.0.1/dist/geotiff.bundle.min.js")
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

One platform to build and deploy the best data apps

Experiment and prototype by building visualizations in live JavaScript notebooks. Collaborate with your team and decide which concepts to build out.
Use Observable Framework to build data apps locally. Use data loaders to build in any language or library, including Python, SQL, and R.
Seamlessly deploy to Observable. Test before you ship, use automatic deploy-on-commit, and ensure your projects are always up-to-date.
Learn more