Tuesday 10 September 2019

Can the new Mapbox Vector Tiles be used as a QGIS basemap?


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!



Answer



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.


No comments:

Post a Comment

arcpy - Changing output name when exporting data driven pages to JPG?

Is there a way to save the output JPG, changing the output file name to the page name, instead of page number? I mean changing the script fo...