19

With the implementation of the mapbox vector tiles begs the question of how these could be used as a basemap in a QGIS printed map (assuming anyone cares about printed maps anymore!).

To use OSM data in a high-quality printed map currently involves downloading the data, styling it, and using it as the basemap - rather than using the openlayers plugin basemaps, which are rasters and do not print well at large print sizes.

I'm intrigued as to whether a mapbox OSM vector tile layer could ever be used to alleviate the download and styling of OSM data (a pain in the rear...). When I hear the word 'vector' I think of print quality...

Perhaps a mapbox QGIS plugin that allows one to sign in and use their own mapbox layers as basemaps?

Any thoughts or insights appreciated!

1

The quantumink plugin suggested in Dane's accepted answer has not been updated for QGIS 2.x so I'm providing an update with what works for me today.

The official method is to use their WMTS (https://www.mapbox.com/help/mapbox-arcgis-qgis/), which requires at minimum the 49$/month standard plan. I have not tried it, but that's probably the easiest.

You can however use the TileLayer plugin to get Mapbox's styles into QGIS. You'll need both the mapid and your token:

mapid can be one of the Mapbox's defaults (mapbox.streets, mapbox.light, mapbox.satellite... - full list at https://www.mapbox.com/api-documentation/#maps), or one you create in Mapbox Editor.

Create the .tsv file for TileLayer plugin in this format (replace all the values in square brackets):

[layername] [attribution]   http://api.mapbox.com/v4/[mapid]/{z}/{x}/{y}.png?access_token=[yourtoken]

It of course eats up your monthly mapview quota.

  • I appreciate this, @Lukasz - vector tiles aren't what I thought they were, so I asked this question with much naivety... I doubt there will ever be a way to use vector tiles in the way I thought they would be used for - it could be simply spinning up my own Mapnik server and distributing data that way... – DPSSpatial Aug 18 '16 at 19:30
  • I was able to add the WMTS layer to QGIS and I'm on their free 'Starter' Plan. – Will. Mar 1 '17 at 14:19
  • Is it possible to use styled vectors instead of .png in QGIS? – RutgerH Oct 2 '18 at 12:33
7

Absolutely Matt. Using vectors as the datasource for maps is ideal for high resolution printed output and MapBox vector tiles work well to distribute large data like OSM efficiently. I think the problem in getting something like this working is purely on a software level - you need the capability to mosaic tiles together, apply styles to them, and then render seamlessly to avoid potential tile edge artifacts. You also need to take into account the output format - whether your print target format is PDF/SVG or high resolution PNG/JPEG will determine the optimal methods for seamless rendering.

Given that TileMill - through Mapnik's support for vector tiles - supports vector tiles already that might be the more feasible application to add this to. However, QGIS, being C++ and Python-based, could also use Mapnik directly - like in the Quantumnik plugin(https://github.com/springmeyer/quantumnik). QGIS's layout tools certainly provide more control for printed output than TileMill currently does.

2

I've wondered the same thing myself. Incidentally, I did run across this link earlier today:

http://blogs.terrorware.com/geoff/2012/11/17/offline-map-tiles-in-qgis/

Perhaps you could tweak it a little bit to pull the tiles from Mapbox without downloading the data, rather than from your local machine.

Good luck!!

  • @Dane: Thanks for reply and thoughts! Personally I'm just planting seeds in the Mapbox garden as well as the QGIS plugin...I consider QGIS a client of Mapbox in this case - the authoring environment for basemaps is well handled by tilemill/mapbox, and see no reason (as of yet) to handle design of OSM-based basemaps in QGIS...Looking forward to seeing what evolves! (ps. how do you add carriage returns in a stackexchange comment?!?!) – DPSSpatial May 16 '13 at 15:23
  • interesting hack! I might try that out! – DPSSpatial May 16 '13 at 15:26
  • Anyone ever get anywhere integrating this? – NetConstructor.com May 7 '15 at 7:05
  • @NetConstructor.com no, and I'm not sure vector tiles are what I thought they would be... – DPSSpatial Sep 6 '15 at 21:12

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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