Sample raster values at point location in QGIS – yet another way

A while back I wrote how one can sample raster values at point locations in QGIS using the Saga function ‘Add grid values to point’, which is available in the processing toolbox. Recently it was reported here that values uploaded from a floating raster layer are rounded up to an integer. I tried it myself in Saga, and it seems to work fine for me. But if you are running in problems with a function, it is good to remember that in QGIS you have have access to many libraries from multiple software tools. This means there are often more than one way to get things done.

And indeed, the processing toolbox offers another tool to sample raster values at point location; the GRASS GIS v.what.rast.points function. In this post I describe how to use this tool directly in GRASS, but you can use the tool in QGIS as well, as illustrated below. Continue reading “Sample raster values at point location in QGIS – yet another way”

GRASS GIS addon to create smoothed legend image

I just uploaded a small addon for GRASS GIS, r.out.legend, with which you can quickly create a smoothed legend image for floating point raster maps (continuous values as opposed to categories).

You just select the raster layer, the dimensions and resolution required and the name of the output image. Other options are to change the font and font size and the image type (PNG, BMP, PDF and SVG).

r_out_legend_4
Example of an output of the r.out.legend addon

Continue reading “GRASS GIS addon to create smoothed legend image”

GRASS GIS categorical raster layers in QGIS

With the QGIS GRASS plugin, you can easily open a GRASS raster layer in QGIS. One disadvantage, however, is that if your GRASS layer has category labels, these will not show in the QGIS legend. See for example the landuse layer in the North Carolina data set,  opened in QGIS in the screenshot below.

screenshot1

It isn’t too much problem to define the labels in QGIS if you have few categories only, but what if your map in GRASS has many categories, all neatly labelled in GRASS. Sure you don’t want to add those category labels manually again in QGIS?

I don’t, so I wrote a small GRASS GIS addon, r.category.trim, that export the attribute table and colour table in GRASS GIS as a QGIS colour map file.

Continue reading “GRASS GIS categorical raster layers in QGIS”

QGIS 2.10 Pisa is out!

The new QGIS 2.10 (Pisa) has been released, with many great new features, tweaks and enhancements. Check out the changelog for the highlights (you’ll need some time, it is again an impressive list of improvements and new features).

The source code and binaries for Windows, Debian and Ubuntu are already available via the large download link on the QGIS home page.  More packages will follow as soon as the package maintainers finish their work.

A big thanks to the developers, this is again an impressive piece of work!

Another stab at creating a Tanaka-style contour map

In a recent post Anita Graser (aka underdark) showed how to create illuminated or Tanaka contours in QGIS using various functions available in the toolbox and some custom functions.

Here I want to explore a slightly different way to achieve the same, using GRASS GIS to compute the azimuth, brightness and line width. I’ll use the command line, but you can do the same using the menu in GRASS, or the corresponding GRASS functions in the QGIS processing toolbox.

Continue reading “Another stab at creating a Tanaka-style contour map”

QGIS live layer effects is propelling QGIS to the next level in the cartographic realm

This new feature created by Nyall Dawson and funded through crowd funding really sets new limits in terms of what is possible in terms of cartography. Check out Nyall’s post Introducing QGIS live layer effects! for a walk through of the new possibilities that this features brings to QGIS. It will be available in version 2.10, or if you can’t wait you download a QGIS development snapshot from the QGIS website to help in testing.