The URL of the collection.json of the dataset to use.
Optionaldate?: DateThe date and time of the data to retrieve. If omitted, it behaves as if the current date and time (new Date()) was specified, and returns the latest available data.
Optionalband?: stringThe band name of the dataset to use. If omitted, the first band name included in that dataset (the first in the order defined in collection.json) is used.
Optionalbbox?: BboxA Bbox indicating the latitude-longitude range. If omitted, it behaves as if [-180, -90, 180, 90] was specified.
Optionalwidth?: numberThe width [px] of the image to retrieve. If omitted, it behaves as if 1000 was specified.
Optionalheight?: numberThe height [px] of the image to retrieve. If omitted, it behaves as if 500 was specified.
Optionalresampling?: ResamplingThe resampling method. If omitted, it behaves as if nearest neighbor (je.Resampling.NEAREST) was specified.
Optionalonloading?: (progress: number, dataObject: DataObject) => voidA callback function that is executed each time a file is loaded. The callback function is passed progress (a progress value from 0 to 100) and the DataObject at each point in time as arguments. If omitted, it behaves as if a function that does nothing () => { } was specified.
import * as je from "./jaxa.earth.esm.js";
const dataObject = await je.getDataObject({
// Specify the URL of the collection.json of the dataset to use.
collectionUrl: "https://s3.ap-northeast-1.wasabisys.com/je-pds/cog/v1/JAXA.EORC_ALOS.PRISM_AW3D30.v3.2_global/collection.json",
// Specify the band name of the dataset to use.
band: "DSM",
// Specify the latitude-longitude range from which to retrieve data.
// [min longitude (west), min latitude (south), max longitude (east), max latitude (north)]
bbox: [-180, -90, 180, 90],
// Specify the size of the image to retrieve in number of pixels.
width: 1000,
height: 500,
// A callback function executed each time data is loaded.
onloading: (progress, dataObject) => {
console.log(progress, dataObject);
// Display the loading progress or visualize the intermediate state.
}
});
A method for easily retrieving a DataObject with the specified conditions, without having to deal with ImageCollection and Image operations.
This is equivalent to the following process.