Tips on using the open source Geospatial Data Abstraction Library (GDAL) to download imagery from NASA's Global Imagery Browse Services (GIBS) for the "AERONET_Helsinki" region.
Requires GDAL version 1.9.1 or greater with cURL support enabled. To check if cURL is enabled for GDAL, type "gdalinfo --format WMS". If cURL is enabled you will see information about the WMS format, if not, you will get an error message and you will need to reconfigure GDAL to support cURL.
Option 1 - Configuration File Input
Create a local service description XML file and invoke gdal_translate. The contents of GIBS_Terra_MODIS_true.xml would be:
https://gibs.earthdata.nasa.gov/wmts/epsg4326/best/MODIS_Terra_CorrectedReflectance_TrueColor/default/2019-01-10/250m/${z}/${y}/${x}.jpg
-180.0
90
396.0
-198
8
2
1
top
EPSG:4326
512
512
3
gdal_translate -of GTiff -outsize 3840 2880 -projwin 16.329420615787 63.439198728745 33.596375987175 56.964090464475 GIBS_Terra_MODIS_true.xml AERONET_Helsinki.tif
gdal_translate -of JPEG AERONET_Helsinki.tif AERONET_Helsinki.jpg
In very limited testing, our experience has been that better image quality is obtained by using the GeoTIFF output format from the GDAL WMS,
then converting this to other formats, if desired, using a second gdal_translate command, or other programs such as ImageMagick convert.
Option 2 - Command Line Input
Invoke gdal_translate with the content of the local service description XML file embedded into the command.
This approach is useful for automated scripting to download various layers, dates, etc. To generate the same image as above:
gdal_translate -of GTiff -outsize 3840 2880 -projwin 16.329420615787 63.439198728745 33.596375987175 56.964090464475 'https://gibs.earthdata.nasa.gov/wmts/epsg4326/best/MODIS_Terra_CorrectedReflectance_TrueColor/default/2019-01-10/250m/${z}/${y}/${x}.jpg-180.090396.0-198821topEPSG:43265125123' AERONET_Helsinki.tif
gdal_translate -of JPEG AERONET_Helsinki.tif AERONET_Helsinki.jpg
For more information on GDAL: http://gdal.org/
For more information on using GDAL with GIBS: https://wiki.earthdata.nasa.gov/display/GIBS/GIBS+API+for+Developers#GIBSAPIforDevelopers-Script-levelAccessviaGDAL
("Anchor" may not work so you may need to scroll to the bottom of the page, or search for "GDAL".)
This page also contains a link to the list of all the available layers in GIBS.
Questions? support@earthdata.nasa.gov