An advantage of using map services like WMS and WMTS is that your styling has been done by someone else. But this can turn into a disadvantage as well in case the colours of your overlay are similar to the colours in your remote base layer.

To show this I created an example using the Dutch Top10NL topographic map (WMTS) with my own random polygon layer in random colours on top of it. Because of the bright and colourful Top10NL my own features are hard to distinguish.

map1_nochange

In QGIS master (soon QGIS 2.0) I discovered a new feature. For WMS and WMTS layers it is possible to adjust the colours. You can change brightness, saturation and contrast. It is also possible to display the layer in grayscale or adjust the colour (hue), for example to purples. (It’s still a matter of taste…)

screenshot_layerprops

Some examples:

map2_hsvchange
adjusted brightness and contrast

map3_grayscale
grayscale

map4_purples
purples

België en Duitsland in RD met QGIS

De Basisregistratie Topografie (BRT/Top10NL) houdt ongeveer een kilometer na de landsgrens al op. Velen, bijvoorbeeld brandweermensen, hebben behoefte aan meer kaartbeeld over de landsgrens. Die kaartdata is er, en nog kosteloos ook. De Open Street Map (OSM) van de Europese landen is als Shapefiles te downloaden, o.a. via de Duitse GeoFabrik, http://download.geofabrik.de/europe.html. Ze wordt aangeboden in WGS84 (latitude, longitude). QGIS 1.8 biedt een eenvoudige mogelijkheid om die te converteren naar het Rijksdriehoeksstelsel (EPSG:28992): maak een kopie van de Shapefile onder een andere naam (eventueel alleen het relevante geselecteerde gebied langs de grens “selectie opslaan als…”), en kies daarbij voor het geselecteerde CRS “Amersfoort New/RD”. QGIS maakt een nieuwe shapefile aan met het gewenste RD-coördinaatstelsel. Die Shapefile kun je toevoegen als kaartlaag in je QGIS RD-projectfile. Die Shapefile sluit aan de landsgrens mooi aan op de BRT kaartlagen.

Voorbeeldje van de stad Emden, bij Delfzijl:

OSM beeld van Emden, geconverteerd naar RD stelsel, en opgemaakt in het QGIS JW kleurenschema.

Voor de kleurenopmaak heb ik gebruikt gemaakt van de kleurcodes die ik eerder op dit forum heb gedeeld. De OSM versies (QML formaat, voor in QGIS) vind je hier. Per OSM sublaag (natural, landuse, buildings, roads, etc) vind je een stijlbestand. Let wel, de wegen heb je minimaal 2x nodig: één keer voor de zwarte omranding, en één keer voor de kleuren daar bovenop. En omdat de OSM roads ook een “tunnel” indicator hebben, kun je die ook als aparte kaartlaag toevoegen met een eigen QML opmaak.

Natuurlijk is OSM vooral gericht op wegen, en minder op terrein. Mij valt op dat er in de OSM terreinvlakken nogal wat ‘gaten’ zitten, afhankelijk per landsgebied, provincie of zelfs gemeente. Zo heeft Emden z’n zaakjes goed voor elkaar, maar de buurgemeenten hebben veel minder terreinvlakken beschikbaar (zie links bovenin bij het voorbeeld).

 

QGIS and WFS service caching

The dutch PDOK-services plugin is a simple plugin to load some national (PDOK) dataservices.

One of the available services is a Web Features Service (WFS), while a very handy service, calling the WFS service to load all roads in the Netherlands shows you the following result:

As you can see the blue bar are actually all the (road) features that you receive. This (rather) strange result is also what you get when you zoomed in to a much smaller area. One would expect that the features would be retrieved only within current Extent/BoundingBox, but QGIS show exact the same ‘bar’ of features.

But we/QGIS can make this work…

Continue reading

BAG building usage notations on Top10NL in QGIS

The building contours of BAG objects are much more precise than the standard built-up block shapes of the Top10NL topographic data set (aside from the fact that the BAG is more up-to-date than the Top10NL). The “BAG objects & addresses” data set also contains the usage function(s) of buildings. Using the BAG, it’s possible to quickly view locations of shops, entertainment areas, office parks, industrial zones and schools. But these usage functions are not part of a geometry column in the BAG, because a particular BAG residential object can have multiple usage functions (1:n relation). However, using the free Geon BAG convertor it’s possible to create a shapefile of BAG objects that include up to 2 usage functions per BAG residential object.

In QGIS, this point-shapefile may be used to visualise the usage function on top of the building contours. See the example below, using the following legend:

  • Green: shops, stores
  • Purple: entertainment, restaurants, club houses
  • Yellow: education
  • Pink: health
  • Blue: office
  • Brown: industry
  • Cyan: sports
  • Red: hotels
Map of part of Almere incl Top10NL, BAG buildling contours and usage functions

You can view the larger map including the full legend here.

The topographic map quickly shows the locations of stores, restaurants, office parks, schools, etc. A next step would be to color the entire area of a particular building instead of using a dot. However, this requires some more complex joining of attributes of tables. Anyone with a smart solution is most welcome to report it here.

 

Graduated symbols

Graduated symbols are the best way to visualize absolute numbers like population size. Usually the area of the symbols is made proportional with the number to be displayed. This is especially important if the values are far apart.

Methods

QGIS 1.8 offers four methods to display graduated symbols. All can be found in the dialogue ‘Layer properties’, on various tabs. The next table summarizes advantages and disadvantages of these four methods. ‘Old symbology’ is not discussed here. Continue reading

Video: how to create maps with webservices of the Dutch PDOK infrastructure in QGis throught the PDOK Plugin

On Eenvoudige PDOK services plugin voor QGIS (in Dutch) Richard already described how to use the PDOK plugin to connect to webservices of the Dutch PDOK infrastructure. This infrastructure offers nationwide and publicly available WMS, WFS and some tiling services of Dutch governments.

This video http://www.youtube.com/watch?v=NjLG4KtpdYk shows how to use the plugin to create a map of some GML data on PDOK services in just a few minutes (including installation of the plugin).

Python one-liners for adding wms, wmts, wfs layers

In the Netherlands, currently there is a movement to make more and more data available for the general public. This is done via different services: WMS, WMTS and WFS services via a service called PDOK (Publieke Data Op de Kaart).

While creating a plugin to list and load all those layers in QGIS I had to dive into the details of the different api-possibilities to add raster and vector layers to the map via the Python inteface.

Because I think this is generally helpfull, here is some code to try.

Continue reading

Something like lyr style file for QGIS

Last weekend there was a user on the QGIS users list mailinglist asking the question if QGIS had something similar like the .lyr file in the ESRI world.

I knew that you could save and re-use the styling of a layer in QGIS by saving a style as a .qml style file. BUT I was not ware of the possibility to name it exactly the same as you data / shape file (and putting it next to it) to be automatically openened en used in QGIS.

It’s alway nice to learn and shate this little features: thanks Morten.