Vector Tiles Reader QGIS Plugin: Unterschied zwischen den Versionen

Aus Geoinformation HSR
Wechseln zu: Navigation, Suche
K
 
(23 dazwischenliegende Versionen von 2 Benutzern werden nicht angezeigt)
Zeile 1: Zeile 1:
QGIS-Plugin '''Vector Tiles Reader''' - This Python plugin reads Mapbox Vector Tiles (MVT) from a local MBTiles file and loads them into a vector layer that is rendered by [[QGIS]].
+
QGIS-Plugin '''Vector Tiles Reader''' (VT Reader) - This Python plugin reads Mapbox [[Vector Tiles]] (MVT) from a remote connection, an MBTiles file or a directory (with metadata and unpacked PDFs) and shows them in a vector layer that is rendered and styled by [[QGIS]]. The style may be mapped on-the-fly from a MB GL JS file.
 +
 
 +
  >> Whole world as spatial vector data on your desktop! '''[https://github.com/geometalab/Vector-Tiles-Reader-QGIS-Plugin/blob/master/README.md VT Reader Repository]''' <<
 +
 
 +
NOTE: Use this plugin responsibly (see Quick Start below); this is a very powerful tool! This plugin accesses potentially almost 300 million tiles with a total size of over 40 Gigabytes - and we assume you don't have that memory available! So it's important to zoom in down to village or small town level before loading tiles with this plugin!
  
 
* A project by [[Geometa Lab]] HSR
 
* A project by [[Geometa Lab]] HSR
* Project Lead: Stefan Keller
+
* Project Lead: Stefan Keller, Geometa Lab HSR
* Developed by: Martin Boos
+
* Developed by: Martin Boos HSR (semester thesis in spring semester 2017)
* Github: https://github.com/geometalab/Vector-Tiles-Reader-QGIS-Plugin
 
 
 
  >> This is experimental work in progress! Expected an early release as QGIS plugin around 2nd quarter of 2017 <<
 
  
 
Important websites:  
 
Important websites:  
 +
* QGIS plugin directory: http://plugins.qgis.org/plugins/vector_tiles_reader/
 
* Source Code on Github: https://github.com/geometalab/Vector-Tiles-Reader-QGIS-Plugin
 
* Source Code on Github: https://github.com/geometalab/Vector-Tiles-Reader-QGIS-Plugin
* QGIS plugin directory: http://plugins.qgis.org/plugins/Vector-Tiles-Reader-QGIS-Plugin/
+
 
 +
 
 +
[[Bild:Arosa Vector Tiles QGIS Plugin Screenshot.jpg|600px||right|...]]
 +
== Quick Start ==
 +
 
 +
CAUTION: It's important to zoom in down to village or small town level BEFORE loading tiles with this plugin!
 +
 
 +
The goal is to load a region of the world (e.g. Arosa) using this plugin.
 +
 
 +
Installation (once):
 +
* Start [[QGIS]] (or install if not already done).
 +
* Open Menü "Plugin Manager"...
 +
* ... and install following plugins (if not already done): "Vector Tiles Reader", "QuickMapServices" und "osmSearch".
 +
 
 +
Preparations (for every QGIS project):
 +
* Start QGIS (if not already started).
 +
* Klick on "QuickMapServices" icon and load e.g. background layer "OSM Standard". This gives an overview. This plugin/layer isn't strictly necessary and can be left out or deleted afterwards.
 +
* Search in "osmSearch" dialog for any village or small town level of your choice (e.g. "Arosa"). This plugin/layer isn't strictly necessary but helps to zoom in.
 +
 
 +
Using Vector Tiles Reader QGIS plugin:
 +
* Start QGIS (if not already started) and zoom in e.g. as instructed above.
 +
* Click on "Vector Tiles Reader" icon to open "Add Vector Tiles Reader" dialog, choose "OpenMapTiles.com" in "Connection" (credits to [https://openmaptiles.com/hosting/ Klokan Technologies]),
 +
* then click on > "Connect" in "Add Vector Tiles Reader" dialog,
 +
* then click on "Add" button.
 +
* Wait until the tile processing completes - Done.
 +
 
 +
There are following three plugin modes:
 +
# Base map (background map) - the default.
 +
# Analysis (of vector data).
 +
# Inspection (of tiles).
 +
 
 +
These modes are simply defined by the chosen options. One can reset these options by clicking on one of the three buttons, called "Reset to ... Defaults", at the end of the dialog.
 +
 
 +
== FAQ ==
 +
 
 +
=== How to add a new Vector Tile Layer? ===
 +
 
 +
Adding a local mbtiles file ("Add Vector Tile Layer..."):
 +
* Go to menu item "Add Vector Tile Layer..."
 +
* In modal dialog click on "Source Browse"
 +
* Change to directory or paste "%userprofile%/.qgis2/python/plugins/vector_tiles_reader\sample_data\" to load a sample mbtile.
 +
* ...
 +
 
 +
Adding a server connection ("Add Tile Server Layer"):
 +
* Go to menu "Add Tile Server Layer..."
 +
* Get API key from https://openmaptiles.com/hosting/
 +
* Clikc on "New" button in dialog
 +
* Enter a name e.g. "OpenMapTiles (tilehosting.com)"
 +
* Enter a vector tile server, e.g. http://free.tilehosting.com/data/v3.json?key=<<you API key here>>
 +
* ...
 +
 
 +
=== How can I use the server connection feature? ===
 +
 
 +
Any vector tile service, implementing the [https://github.com/mapbox/tilejson-spec/tree/master/2.2.0 TileJSON specification] should work.
 +
For the feature to work, you have to create a connection using a URL pointing to the TileJSON of the tile service.
 +
 
 +
For example you can use http://free&#46;tilehosting&#46;com/data/v3.json?key={API-KEY} and get your own API-Key from [https://openmaptiles.com/hosting/ OpenMapTiles.com]
  
  
Zeile 27: Zeile 85:
 
Available styles:
 
Available styles:
 
* Some default styles are delivered with the plugin. However, some may be missing.
 
* Some default styles are delivered with the plugin. However, some may be missing.
 +
  
 
== Known Limitations ==
 
== Known Limitations ==
Zeile 36: Zeile 95:
  
 
Limitations of current plugin:
 
Limitations of current plugin:
* MBTiles are read from maxzoom (e.g. 14). All data from levels above will be ignored except for empty tiles which are taken from maskLevel (e.g. 8).
+
* Server connections work only with services implementing the [https://github.com/mapbox/tilejson-spec/tree/master/2.2.0 TileJSON specification]
 +
* The OpenMapTiles styling is completely different than the one showed at OpenMapTiles website. It's done in plain QGIS and needs some more love.
 +
 
  
 
== Enhancements and Ideas ==
 
== Enhancements and Ideas ==
  
 
The plugin could read Vector Tiles directly from the web. But then - to behave similar to raster tiles - the problem of missing corresponding styling becomes even more prominent.
 
The plugin could read Vector Tiles directly from the web. But then - to behave similar to raster tiles - the problem of missing corresponding styling becomes even more prominent.
 +
  
 
== Installation and Source Code ==
 
== Installation and Source Code ==
  
 
Intall as local plugin (not yet in QGIS plugin repo -[Install from inside [[QGIS]] as Python plugin (Note: For plugin versions up to 0.9 you have to enable "experimental plugins")]-).
 
Intall as local plugin (not yet in QGIS plugin repo -[Install from inside [[QGIS]] as Python plugin (Note: For plugin versions up to 0.9 you have to enable "experimental plugins")]-).
 +
  
 
== Ressources ==
 
== Ressources ==

Aktuelle Version vom 15. August 2018, 12:56 Uhr

QGIS-Plugin Vector Tiles Reader (VT Reader) - This Python plugin reads Mapbox Vector Tiles (MVT) from a remote connection, an MBTiles file or a directory (with metadata and unpacked PDFs) and shows them in a vector layer that is rendered and styled by QGIS. The style may be mapped on-the-fly from a MB GL JS file.

 >> Whole world as spatial vector data on your desktop! VT Reader Repository << 

NOTE: Use this plugin responsibly (see Quick Start below); this is a very powerful tool! This plugin accesses potentially almost 300 million tiles with a total size of over 40 Gigabytes - and we assume you don't have that memory available! So it's important to zoom in down to village or small town level before loading tiles with this plugin!

  • A project by Geometa Lab HSR
  • Project Lead: Stefan Keller, Geometa Lab HSR
  • Developed by: Martin Boos HSR (semester thesis in spring semester 2017)

Important websites:


...

Quick Start

CAUTION: It's important to zoom in down to village or small town level BEFORE loading tiles with this plugin!

The goal is to load a region of the world (e.g. Arosa) using this plugin.

Installation (once):

  • Start QGIS (or install if not already done).
  • Open Menü "Plugin Manager"...
  • ... and install following plugins (if not already done): "Vector Tiles Reader", "QuickMapServices" und "osmSearch".

Preparations (for every QGIS project):

  • Start QGIS (if not already started).
  • Klick on "QuickMapServices" icon and load e.g. background layer "OSM Standard". This gives an overview. This plugin/layer isn't strictly necessary and can be left out or deleted afterwards.
  • Search in "osmSearch" dialog for any village or small town level of your choice (e.g. "Arosa"). This plugin/layer isn't strictly necessary but helps to zoom in.

Using Vector Tiles Reader QGIS plugin:

  • Start QGIS (if not already started) and zoom in e.g. as instructed above.
  • Click on "Vector Tiles Reader" icon to open "Add Vector Tiles Reader" dialog, choose "OpenMapTiles.com" in "Connection" (credits to Klokan Technologies),
  • then click on > "Connect" in "Add Vector Tiles Reader" dialog,
  • then click on "Add" button.
  • Wait until the tile processing completes - Done.

There are following three plugin modes:

  1. Base map (background map) - the default.
  2. Analysis (of vector data).
  3. Inspection (of tiles).

These modes are simply defined by the chosen options. One can reset these options by clicking on one of the three buttons, called "Reset to ... Defaults", at the end of the dialog.

FAQ

How to add a new Vector Tile Layer?

Adding a local mbtiles file ("Add Vector Tile Layer..."):

  • Go to menu item "Add Vector Tile Layer..."
  • In modal dialog click on "Source Browse"
  • Change to directory or paste "%userprofile%/.qgis2/python/plugins/vector_tiles_reader\sample_data\" to load a sample mbtile.
  • ...

Adding a server connection ("Add Tile Server Layer"):

How can I use the server connection feature?

Any vector tile service, implementing the TileJSON specification should work. For the feature to work, you have to create a connection using a URL pointing to the TileJSON of the tile service.

For example you can use http://free.tilehosting.com/data/v3.json?key={API-KEY} and get your own API-Key from OpenMapTiles.com


About

About Vector Tiles: Though this is a vector representation, Vector Tiles are rather specific data targeted to visualization and thus not fully comparable to generic geospatial vector data formats. Because of many optimization issues Vector Tiles are lossy in many respect: Coordinates are converted to integers and thus loose precision, features are filtered at certain zoom levels and geometries like roads are simplified. Moreover they are "overzoomed" which means that they often borrow data from upper zoom levels.

Available data sources (MBTiles):

  • Download MBTiles (compatible to "Mapbox Streets v7") from OpenMapTiles project (see also city extracts).
  • There's a possibility to download single tiles from online resources, like "Mapbox Streets v7" (tbd.)

Data model documentation:

Available styles:

  • Some default styles are delivered with the plugin. However, some may be missing.


Known Limitations

Limitations in general:

  • This plugin is only tested on reading MBTiles containing Vector Tiles according to Mapbox Vector Tile Specification 2.1.
  • CRS is always EPSG:3857 Web-Mercator. Though Vector Tiles are in principle not bound to a coordinate reference system (CRS), currently it's only possible to handle Vector Tiles in Web-Mercator EPSG:3857.
  • There's no styling attached to MBTiles nor to Vector Tiles.

Limitations of current plugin:

  • Server connections work only with services implementing the TileJSON specification
  • The OpenMapTiles styling is completely different than the one showed at OpenMapTiles website. It's done in plain QGIS and needs some more love.


Enhancements and Ideas

The plugin could read Vector Tiles directly from the web. But then - to behave similar to raster tiles - the problem of missing corresponding styling becomes even more prominent.


Installation and Source Code

Intall as local plugin (not yet in QGIS plugin repo -[Install from inside QGIS as Python plugin (Note: For plugin versions up to 0.9 you have to enable "experimental plugins")]-).


Ressources

See Categories below.