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_Ispra" 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-02-10/250m/${z}/${y}/${x}.jpg-180.090396.0-198821topEPSG:43265125123
gdal_translate -of GTiff -outsize 960 720 -projwin 2.5294 49.0366 14.7389 42.5615 GIBS_Terra_MODIS_true.xml AERONET_Ispra.tif
gdal_translate -of JPEG AERONET_Ispra.tif AERONET_Ispra.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 960 720 -projwin 2.5294 49.0366 14.7389 42.5615 'https://gibs.earthdata.nasa.gov/wmts/epsg4326/best/MODIS_Terra_CorrectedReflectance_TrueColor/default/2019-02-10/250m/${z}/${y}/${x}.jpg-180.090396.0-198821topEPSG:43265125123' AERONET_Ispra.tif
gdal_translate -of JPEG AERONET_Ispra.tif AERONET_Ispra.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