Mozilla Stumbler layer: loading TMS and XYZ tilelayers in QGIS

Mozilla Location Service (MLS) layer

Personally I’m very interested in the Mozilla Location Service (MLS), I wrote an earlier article about it on my work (Zuidt.nl) blog.
Selection_102

Key in this project is that both locations of wifi points and cell towers are crowdsourced and put in a open database, so everybody can use that data to determine his/her position on earth based on some info you get from your laptop or cell phone (without GPS).

This is only possible if as much people as possible start uploading this kind of locations, and as you can see on Mozilla’s overview map it is getting on steam now.

This map layer, showing all blue dot’s on places where locations have been recorded, is a ‘normal’ XYZ tile layer (epsg:3857) generated once a day by Mapbox if I’m correct. After reading Mishari Muqbil blogpost about how to add this ‘blue dot’ layer in OsmAnd android application, I was curious if I could also load this layer in QGIS.

After some searching I found the very nice ‘TileLayerPlugin’ from Minoru Akagi who also is the author of the beautifull Qgis2threejs plugin (have a look into it if you haven’t done so yet!).

So if you want to load xyz map tile layers, like OpenStreetMap, or this Mozilla Stumbler layer in QGIS, do the following:

- via the plugin manager, search for ’tilelayer’ and install the TileLayer Plugin.
- open it’s dialog (initially in the Web menu), and click the Settings button in it and point to some directory on your hard disk for the ‘External layer definition directory’
- in that directory, as you can read in the README at github, you have to put one .tsv file per xyz layer. Note that the values should REALLY be tab-separated, not space separted!
- for the MozStumbler file you need (one!) line like this (tab separated!):
MLSstumber MLSstumber https://d17pt8qph6ncyq.cloudfront.net/tiles/{z}/{x}/{y}.png 1 0 13 -180 -85.0 180.0 85.0
To find the exact cloudfront-url you need, have a look into this json file: in https://location.services.mozilla.com/map.json

As soon as you have those bits in place you can see the blue dots. have a look, the coverage of my hometown is growing:

Selection_103

Arcgis rest service and other layers

But wait… isn’t that the Arcgis / arcgisonline World Topo Map I see there? Yes, it is, Adding one of these lines:
ArcgisWorldTopo esri http://server.arcgisonline.com/ArcGIS/rest/services/World_Topo_Map/MapServer/tile/{z}/{y}/{x}.png 1 0 16 -180 -85.0 180.0 85.0
or
ArcgisWorldImagery esri http://server.arcgisonline.com/ArcGIS/rest/services/World_Imagery/MapServer/tile/{z}/{y}/{x}.png 1 0 16 -180 -85.0 180.0 85.0
makes it possible to see other arcgisonline mapserver rest tile services in QGIS.

In this way it is also possible to load OpenStreetmap Tiles in QGIS, save:
OpenStreetMap © OpenStreetMap contributors http://tile.openstreetmap.org/{z}/{x}/{y}.png 1 0 19
as osm.tsv and see OpenStreetmap in it’s full glory.

I’ve put some tsv files in this zip: http://qgis.nl/tilelayers.zip for you to try out.

Crowdsourced Street Level Photos

Another post of Mishari Muqbil made me aware of another crowd sourcing project: street level photo’s: http://www.mapillary.com/map

While still young, it’s a nice initiative to bring ‘power to the people’ instead of to the big companies :-)

QGIS 2.6.1 and QGIS 2.6 Documentation Released

QGIS 2.6.1

Just a short notice that the QGIS project (silently) released QGIS 2.6.1, a bug fix release for the latest stable version of QGIS 2.6 Brighton.

Selection_098

Some notable fixes include:

- composer stuff which was not working ok
- not all attribute columns showing in attribute table
- metasearch (CSW plugin) was not working in 2.6 out of the box
- some possible crashes are fixed now

QGIS Documentation 2.6

Bigger news: The Documentation team has released the 2.6 Documentation!

You can find it at http://docs.qgis.org/2.6 or http://docs.qgis.org/latest.

The older (2.2) documentation has been updated to reflect the new 2.6 features. A new feature is that it now contains Help pages for all algorithms which can be used in Processing.

All new text is sent to Transifex. So most languages lost some percent on their ‘Total translated’ score, and can start working to regain their scores.

Thanks to all people who invested time into updating the Documentation and/or made the 2.6.1 release possible!

Visualize flows with FlowMapper

This article explains the presentation of flows on a map, using the FlowMapper plugin. For this demonstration, data on commuting patterns between 40 regions are used (from Statistics Netherlands).

Example of FlowMapper output (post-processed)

Example of FlowMapper output (post-processed)

Preparing the data

After the plugin is installed in the usual way, the manual can be found in the folder C:\Users\{username}\.qgis2\python\plugins\FlowMapper2_documentation.Three text files are required, with node coördinates, node names and a flow matrix. Three points must be stressed that are not mentioned in the manual. 1) The plugin does not work well with numbers with decimals. That can be solved by multiplying the numbers by (e.g.) 1000 and then round them. 2) As delimiters, both spaces and tabs may be used. The latter is especially useful when pasting data into a text file from Excel. 3) The node names should not contain spaces, because these are handled as delimiters. Replace them with underscores.

Continue reading

Using QGIS processing scripts

One of the area’s that QGIS is constantly improving is the ‘Processing framework’, Formerly known as the sextante framework and written in java, it is rewritten in Python by one of the original authors Victor Olaya and made part of QGIS since about QGIS 2.0.

I think it is VERY usefull and in use a lot already, but not so much people are writing about this. In this blogpost I use it as a tool to run some pyqgis code, but Processing is much much more! Read about it in docs and manuals.

Recently there were some questions in the mailing list, which I thought would be fun to solve with a Processing script (instead of writing some lines of code in the python console, or creating a plugin).

processingtoolbox

Continue reading

A QGIS class room setup on Windows

Somebody in my neighbourhood is Windows Administrator on a ‘Middelbare School’ here in Haarlem, my hometown.

The school, het Mendelcollege, received a (Q)GIS intro by Margit Stapel of GisWijzer who is doing introductions for 10 – 14 year old childer with GIS. The school received this course from a GIS professional as part of the ‘national geo week‘.

qgismendel1

Continue reading

Using MetaSearch plugin to search and load (meta)data from your National Georegister

We (mostly Tom Kralidis, Angelos Tzotsos with some additions by me) just released the MetaSearch Catalogue Client plugin for QGIS. The new plugin is an update of the CSWClient plugin from NextGIS. This new MetaSearch plugin makes searching metadata and using the services peanuts!

A Catalog Service for the Web (CSW), for example provided by the Dutch clearinghouse Nationaal Georegister, contains metadata about geographic data and services. The metadata not only provide descriptions, but can also contain hyperlinks to the services to directly view (e.g. WMS) or load (e.g. WFS and WCS) the geographic information.

Search and result based on several keywords in combination with a spatial constraint

Search and result based on several keywords in combination with a spatial constraint


Continue reading

Generate series of maps with Python script

Sometimes you need to produce a series of similar thematic maps. The only difference is the field used to colour areas or show graduated symbols. Classifications or maximal symbol sizes are identical. For large numbers of maps it is quite annoying to repeat the same actions in QGIS over and over again. Moreover, mistakes are easily made this way. This article explains how the production of large numbers of maps can be automated with a Python script. All files needed to try this method are available in a ZIP file. This is a modified version of a previous article. This new method works better and faster than the previous one en works the same for Windows and Linux.

Continue reading