Examples of using the API in QGIS
Flow of how to use the API in QGIS
- Launch QGIS on your computer.
- Click Browser → XYZ tiles → OpenStreetMap to fix CRS (Coordinate Reference System) to EPSG3857 and to detect bounding box.
- Zoom up/down to set your region of interest.
- Open Plugins → Python Console.
- In Python console, click Show Editor icon to open editor.
- In editor window, make a new script or open your Python script.
- Execute your Python script by clicking Run Script icon.
Get and show an image in QGIS
Check the location of the installed module:
The location will be similar to:
If you have not installed the module, add the path to the unzipped folder:
Note
Use / instead of \\ in module path text.
Instead of show_images, use show_images_qgis in QGIS to acquire raster files.
The raster files are saved in a temporary folder — quit QGIS with saving to keep the data.
import sys
sys.path.append("C://YOUR-FOLDER-PATH/jaxa-earth-0.1.4")
from jaxa.earth import je
# Get an image (ppu and bbox are auto-detected from the QGIS view if omitted)
data = je.ImageCollection(ssl_verify=True) \
.filter_date() \
.filter_resolution() \
.filter_bounds() \
.select() \
.get_images()
# Show in QGIS as a raster layer
img = je.ImageProcess(data) \
.show_images_qgis()

Warning
show_images_qgis is only valid in a QGIS Python Console environment.