Public
Edited
Feb 3
3 stars
Insert cell
Insert cell
Insert cell
Insert cell
je = require("https://data.earth.jaxa.jp/api/javascript/v1.2.3/jaxa.earth.umd.js");
Insert cell
Insert cell
image = {
//position of the Mt. Fuji
//富士山の位置(緯度、経度)
const lat = 35.3628;
const lng = 138.7304;

//margin for area
//読み込む範囲(度)
const dl = 0.2;
const img = await je.getImage({
collection: "https://s3.ap-northeast-1.wasabisys.com/je-pds/cog/v1/JAXA.EORC_ALOS.PRISM_AW3D30.v3.2_global/collection.json",
band: "DSM",
width: 400, //pixels
height: 400, //pixels
bbox: [lng - dl,lat - dl,lng + dl,lat + dl], //[west, south, east, north]
colorMap: {
min: 0,
max: 6000,
colors: "jet"
}
});
return img;
}
Insert cell
Insert cell
image.getLegend(400,30,10);
Insert cell
Insert cell
image.getCanvas();
Insert cell
Insert cell
data = image.getData();
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Plot.plot({
y: {
grid: true,
domain: [image.getColorMap().getMin(), image.getColorMap().getMax()]
},
marks: [
Plot.line(array, {x: "lng", y: "elevation"})
]
})
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