Stamen Maps for QGIS

Stamen’s maps are amongst the most creative and beautiful OpenStreetMap visualizations and it would be great to have them as base maps in QGIS.

No problem! Nathaniel Kelso has already done all the work for us and we can download the extended OpenLayers plugin from his Github page. (There is a pull request in place to add Stamen to the default plugin too.)

Simply unpack the plugin into QGIS’ plugin folder. As you can see in the following screen shot, I’ve put it besides the “original” OpenLayers 0.6.2 plugin. In QGIS plugin manager, I then switched to Nathaniel’s version.

It adds the possibility to load Stamen’s Watercolor, Toner and Terrain tiles into the QGIS project:

Like all other OpenLayers layers, these can now be overlaid with more data such as this heatmap which is based on Twitter data I presented in a previous post, processed using Heatmap plugin and semi-transparently overlaid onto Stamen’s Toner map:

24 comments
  1. Nick Hopton said:

    Hi Anita, this looks good but I haven’t had any luck installing it. In Ubuntu and in Win Vista I get the message that this is not a valid plug-in. Any ideas? Nick.

    • The procedure that worked for me was: 1) download the .zip from Github, 2) unzip it, 3) copy the contained openlayers folder to QGIS plugins folder. (I renamed it to openlayers_kelso as you can see above.) Don’t copy the whole unzipped folder into plugins.

  2. Nick Hopton said:

    Thanks, this worked. Pretty mapping too, but lots of problems here with tiles not downloading as they should.

    • Great. Thanks! I had the impression that tiles loaded well for the US but that it didn’t work as well for other parts of the world.

  3. mapbaker said:

    I don’t seem to have access to my qgis plugins folder in Ubuntu, so I can’t paste in the plugin.

    Incidentally, I can’t figure out why the repository isn’t displaying any results in QGIS when I try to find them…

    • The repository which hosts OpenLayers plugin is currently down (or very unstable). That’s why Plugin Installer might not find anything.

      You should have access to the /home/username/.qgis/python/plugins folder. Did you try this one?

      • mapbaker said:

        Revisiting this today after your blog post…
        I don’t have permission to the qgis/plugins folder in Ubuntu…

      • Maybe try changing to super user and give yourself the permissions necessary. I’m no Linux guru myself, sorry.

  4. No needs to use the OpenLayers Plugin. You can accessing stamen maps directly with this XML file opened as a raster layer :
    http://www.gdal.org/frmt_wms_openstreetmap_tms.xml
    The GDAL WMS driver gives us this ability :
    http://www.gdal.org/frmt_wms.html
    For more information we wrote this blog post :
    OpenStreetMap Tiles in QGIS : How to display OpenStreetMap data tiles with no plugin inside Qgis
    http://www.3liz.com/blog/rldhont/index.php?post/2012/07/17/OpenStreetMap-Tiles-in-QGIS

    • Thanks. I saw that post before too. But I think having the options in OpenLayers plugin is more comfortable for me.

  5. Garrett said:

    As always, thanks so much! Things like this make me want to go up to all my ESRI-only friends and say “See? See what you can do with QGIS?”

    • Yes, Nathaniel’s branch should be merged with the original one. There is a pull request in place. Until then, you can have both installed.

  6. Excited about this!
    However, a basic question: I’ve tried downloading and installing the plugin twice, following your instructions. Each time, it shows up in my plugin installer window, in red type, and “broken” and invalid. Any idea what might be going on here? I use the complete unzipped file, including subfiles like “Goodies” etc. Should I be doing something else? Or is it just a bad download? Thanks for any pointers you might offer.

    • Copy only the contained “openlayers” folder into plugins. That should work.

      • I tried that, and now the plugin doesn’t show up in the Installer window at all.
        I just realized — I am using QGIS 1.8, and I think these instructions were written pre-1.8? And I can’t find this plugin in the new central repository. Should this plugin work for 1.8?

      • The version I downloaded when I wrote the post still works in 1.8 and current developer version. I provided instructions because this version of the plugin is not in the central repo. The repo version 1.0.0 (http://plugins.qgis.org/plugins/openlayers_plugin/) does not include Stamen layers.

      • I got it to work and it’s beautiful! It was in my plug-in manager — just not under the name I had given it.
        Thanks for your help and fast responses.

  7. James said:

    Hi,
    Thanks for this post, your instructions worked and I now have these great basemaps. You say your image uses the toner basemap…how do you make it greyscale?

    • I overlaid a half-transparent white layer to make toner lighter.

  8. James said:

    Ahh I see. Brilliant – thanks.