A GRASS GIS addon to upload raster values and labels to a point layer

In GRASS GIS you can upload raster values at positions of vector points to the attribute table of that vector point layer using the function v.what.rast. If you also interested in the raster category labels, you can have a look at r.what, which lets you query a raster map  on their category values and category labels.

However, the results of r.what are written to a text file. If you want to upload raster values and labels to the attribute table of a point vector map, you can use  v.in.ascii to import the text file created with r.what as a point vector layer in GRASS GIS.

Fairly straightforward, but wouldn’t it be even more convenient if you you had an option in r.what.rast to also upload the category labels? Well, that option isn’t there yet, so for the time being, I have written a simple addon,  v.what.rastlabel, that fills in the gap, i.e., it let’s you upload the values and labels of one or more raster layers at positions of vector points to the attribute table of that vector point layer.

The addon is available from github. If you are running GRASS 7.2 or above, you can simply install it using g.extension :

g.extension v.what.rastlabel url=https://github.com/ecodiv/v.what.rastlabel

If you are still running GRASS GIS 7.0, see this page on the GRASS GIS wiki on how to install scripts. After installing the addon, you can run it by typing v.what.rastlabel on the command line.



VIF stepwise variable selection


In modelling, multicollinearity in the set of predictor variables is a potential problem. One way to detect multicollinearity is the variance inflation factor analysis (VIF). In GRASS GIS, the VIF for a set of variables can be computed using the r.vif addon. This addon furthermore let’s you select a subset of variables using a stepwise variable selection procedure, in which variables are removed till the highest VIF values is less than a user-defined threshold value. In this post I introduce the addon and provide some examples how to use the addon. Continue reading “VIF stepwise variable selection”

Update of Zim-wiki export template for an adaptive website

A short note that I updated my export template for a adaptive website to work with Zim 0.61. You can find it on my github page. It is very much work in progress, but perhaps it will be useful to somebody.

Examples of websites that were created using this template are http://notebook.ecodiv.org,http://maps.vegetationmap4africa.org/docs.html and http://www.penwatch.net/morrowind_dnd_zim/.

A Zim-wiki export template for a adaptive website

I wrote before about Zim, a graphical text editor used to maintain a collection of wiki pages. Although mostly aimed at individual use, notebooks can also be shared as html files (and a few other formats) by exporting the notebook or individual pages as web pages, as explained here. And to give you an idea what you can get, see here an example of one of my notebooks.

For one of my projects I wanted to create a small web-site with fact sheets that provide a short description of vegetation types in eastern Africa. These fact sheets go together with vegetation maps we have created for various countries in the region. The idea was to keep the fact sheets as notes in a Zim notebook, and use the export function to create a small web-site. Continue reading “A Zim-wiki export template for a adaptive website”

A new method and tool (ExDet) to evaluate novelty environmental conditions

A common objective of correlative species distribution model is to be able to project the potential distribution of the target species into a new environmental space. This can be a new geographic space (e.g., invasive species) or projected future conditions.

One should be very careful in interpreting results if extrapolating to areas with conditions that fall outside the range of reference environmental variation. There are several methods to visualize this uncertainty. On this blog I have for example mentioned the multi-environmental similarity tool in Maxent (also implemented in R in amongst others the dismo package and as an addon for GRASS GIS), which allows you to create maps that provides the similarity of each point to a set of reference points (Elith et al. 2010) and thus provide a quick overview of areas with ‘novel’ conditions.

A disadvantage of this and other methods is that they only consider the ranges of the individual predictors, and ignore the correlation structure of the covariates used to build the model. In reality, it is not unlikely that at a given locations values of each univariate factor fall within the original range of values, but the combination of environmental conditions is new. Continue reading “A new method and tool (ExDet) to evaluate novelty environmental conditions”

A plugin to export layers in GIMP file to single pdf file

Update: there is another plugin that export Layers to single multiple pages PDF. You can get the plugin here: http://registry.gimp.org/node/27987. Which one is better? Well, they both work fine for me and are equally easy to use. So just try them out both to see which one works best for you.

A while back I wrote about two possible ways to export multiple layers in GIMP to one pdf file using third-party tools. But it turns out there is an much easier solution as Nevar pointed out in the comments on that blog post. The ‘Export Layers as PDF’ plugin for GIMP. You can get the plugin from the Gimp plugin registry. See here for instructions how to install the plugin.

After installing you need to restart GIMP after which you can find the new function in the file menu (see screenshot). Continue reading “A plugin to export layers in GIMP file to single pdf file”