QGIS Version: 2.18.3

I am trying to add some basemaps layers from NASA's GIBS API, but I cannot seem to get the URL right to connect to it.

According to the site, I think I should just be able to use the REST endpoint at https://gibs.earthdata.nasa.gov/wmts/epsg4326/best/ Under "Add Layers from a WM(T)S Server" in QGIS. When I do this, however it is not recognized as a WMS server, because I get the error "The server you are trying to connect to does not seem to be a WMS server. Please check the URL.".

If I try the GetCapabilities link at https://gibs.earthdata.nasa.gov/wmts/epsg4326/best/1.0.0/WMTSCapabilities.xml, then I do get a list of services to choose from, but the map canvas is blank when I try to add anything.

The Layer Properties then shows this under the General > Layer Source tab:


Specifically I am trying to add the "Night Lights" layer.

  • is the dpimode really 7?
    – nmtoken
    May 14, 2018 at 13:07
  • How about the TileLayer plugin? QGIS 2.18 not 3. May 14, 2018 at 13:35

3 Answers 3


As an alternative you could use the Generic XYZ Tiles as documented.

QGIS 3.x

  • Open Browser
  • Right Click Tile Server (XYZ)
  • Click "New connection..."
  • Enter Name, Url and set zoomlevels.
  • Click "OK".
  • Double click on the new layer to add to map.

QGIS 2.x

  • Open "Browser Panel"
  • Right click "Tile Server (XYZ)"
  • Click "New connection..."
  • Insert XYZ tile layer URL, click "OK".
  • Enter name, click "OK".
  • Double click on the new layer to add to map.

You need to study the GetCapabilities a bit for the exact parameters but I worked some out:

VIIRS_Night_Lights https://gibs.earthdata.nasa.gov/wmts/epsg3857/best/VIIRS_Night_Lights/default/default/GoogleMapsCompatible_Level8/{z}/{y}/{x}.png

VIIRS_Black_Marble: https://gibs.earthdata.nasa.gov/wmts/epsg3857/best/VIIRS_Black_Marble/default/default/GoogleMapsCompatible_Level8/{z}/{y}/{x}.png

The syntax is: https://gibs.earthdata.nasa.gov/wmts/epsg3857/best/VIIRS_Black_Marble/default/Dimension/TileMatrixSet/{z}/{y}/{x}.png

You need to look up the Dimension:


And the TileMatrixSet:


Setting Dimension to Default will result in the most recent set available.

QGIS 3 with VIIRS_Black_Marble layer

  • I tried to put that in a file called "gibs.tsv" and then went into "Settings" and set the folder that it is located in as the External layer definition directory, but no entries under "gibs" appear, did I miss a step somewhere?
    – wfgeo
    May 14, 2018 at 14:05
  • @1saac I redid my answer, you don't need the TileLayer plugin anymore as TileLayers are standard in QGIS nowadays. May 15, 2018 at 5:20
  • This is great, thanks. I ended up having to take a much more manual approach, as I was hoping to be able to query the brightness values at individual pixels and summarize them, but this definitely answers my question and gives me enough info to automate scraping tiles
    – wfgeo
    May 15, 2018 at 15:24

I can get some of the layers from this server to work as WMTS layers in QGIS, however some don't seem to work. These seem to be the ones which have a time variable in the WMTS template URL. It seems that QGIS doesn't recognise this and leaves it out of the request.

A quick Google turns up this known bug.

  • That's frustrating. Would there be a way to just download some of the tiles manually and add them as a raster layer?
    – wfgeo
    May 14, 2018 at 13:18

The QGIS 3.14 release has added support for time-varying WMS layers. And in the intervening time since this question was initially posted, NASA GIBS has opened up public access to their visualizations via WMS. Information for how to register the GIBS WMS endpoints in QGIS can be found here.

Note that QGIS support of time-varying WMTS layers is not functional at this time.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.