This is a sample codes for JAXA Earth API for JavaScript Version 2.0.1. You can download the entire file set below. For detailed explanation, please refer to the comments in the source code. For an overview of the entire API, please see here.
This sample uses JavaScript in ES Module format. To run it, you need to access it through a server; opening the HTML file directly (e.g., by double-clicking) will not work. When running locally on your device, please use Live Server for VS Code or similar tools.
Also, some execution results are displayed in the browser console. For example, in Chrome on Windows, you can open the console by opening the browser menu [Menu](three dots) -> [More tools] -> [Developer Tools], or by pressing [Shift] + [Ctrl] + [I].
A sample for retrieving images and displaying them on a browser.
A sample using the je.getDataObject feature to easily retrieve DataObjects.
A sample that creates je.ImageCollection by specifying collection.json, extracts je.Image at arbitrary times, and visualizes DataObjects extracted from latitude, longitude, and image size. More complex processing is possible compared to je.getDataObject.
A sample that extracts je.Image at arbitrary times from je.ImageCollection and visualizes DataObjects extracted from latitude, longitude, and image size. Time specification, loading status display, color map replacement, and more are possible.
Samples for changing color maps or performing custom visualizations.
A sample for creating color maps and images.
HTMLCanvasElement and ImageData are used for custom visualization by evaluating colors on a pixel-by-pixel basis.
You can also convert to files for integration with various applications and allow downloads.
A sample for creating and downloading CSV files. CSV files can be opened in Excel, QGIS, and other applications.
A sample for creating and downloading GLB files. Uses Three.js. GLB files can be opened in Blender and other applications.
A sample for creating and downloading KMZ files. KMZ files can be opened in Google Earth and other applications.
Samples for performing operations between data. Using je.data.compute allows you to convert units, calculate anomalies, apply masking, and more.
A sample for converting data in Kelvin units to data in Celsius units.
A sample for calculating anomaly (deviation) = observed value - climatological value from observed and climatological values.
A sample for creating a mask image from administrative boundary GeoJSON, applying the mask image, and calculating statistics.
Simple analysis processing samples using data.
An example of acquiring time series data, displaying it with animation, and graphing it. Using je.data.compute, an image showing the seasonal change for each location is also created. Plotly is used for graphing.
An example of finding correlations from multiple data sets.
Samples for using je.ImageGenerator or je.TileGenerator to integrate with various map APIs that allow interactive movement. je.ImageGenerator, which renders as a single image, is faster and allows the displayed data to be handled as a numeric array. On the other hand, je.TileGenerator renders on a tile-by-tile basis like WMTS, which is somewhat slower, but can integrate with many map APIs and can be used with any projection method by using proj4.js.
OpenLayers samples for creating layers that can be imported. The following samples use the main thread of the browser.
By using je.ImageGenerator and ImageCanvas, it renders as a single image.
By using je.TileGenerator and ImageTile, it renders on a tile-by-tile basis like WMTS.
The following samples use je.ImageGenerator on the browser's web worker. By parallel processing with web workers, the map API operations processed on the main thread are less likely to become slow even when displaying large maps, so this method is recommended for practical use.
Leaflet samples for creating layers that can be imported.
MapLibre GL JS samples for creating layers that can be imported.
CesiumJS samples for creating layers that can be imported.
ArcGIS Maps SDK for JavaScript samples for creating layers that can be imported.