Category Archives: GIS

Access R from GRASS GIS on Windows

Since I have switch from Windows to Linux, many years ago, things have started to look a lot brighter for those wanting to use GRASS on Windows. I won’t switch back to Windows any time soon, but I recently had to install WinGRASS for somebody else. And it was a whole lot easier than I had feared (or even hoped).

But there is one thing I couldn’t immediately figure out; how to run R from within GRASS. I should add that I installed GRASS using the OSGEO4W installer. When installing GRASS using the stand alone installer, access to R from the GRASS command line should work out-of-the-box (see comment from Helmut in the comment section below).

After a bit of trial and error, I came up with the steps below. It involves editing a file to tell GRASS where to look for executables. In the example below I am adding the path to the R and rstudio executables to this file. Having done that, I can now type R.exe or rstudio.exe on the GRASS command line to open these programs. Continue reading

Recode your raster file in GRASS GIS using a csv file

The two easiest ways to reclassify a raster layer in GRASS GIS are using the r.reclass or r.recode functions. Although both are easy enough to use, sometimes it would be nice if you could just provide the input layer and a simple table with re-class values to create new raster maps. A fairly trivial task, so ideal to make another attempt at creating a python script.

I create a small add-on (r.recode.attr) that let you reclass/recode a raster layer based on values in a csv (comma separated text) file. The csv file should include one column with the raster values and one or more columns with the reclassification values. For each of these columns a new map will be created.  See the manual page for more information. Continue reading

Access GRASS 7 data in QGIS

QGIS supports GRASS in two different ways. 1) For those working with GRASS databases, there is the GRASS toolbox, which basically offered an alternative GUI to GRASS. For those working with other data types, most GRASS functions are now available through the processing toolbox.

I do most of my spatial analysis in GRASS, while I use QGIS amongst others to create maps based on the results. So I mostly used the GRASS toolbox. Unfortunately, the GRASS toolbox doesn’t work (yet) in QGIS 2.6. So what now? Well, as it turns out, QGIS can access GRASS raster layers through the QGIS browser. Continue reading

Locus Map Pro carries its support for MBTiles to the next level

I wrote before about the MBtiles format, a convenient format to store tiled maps in a single portable sqlite database. Probably the easiest way to create them is with Tilemill, as described here. The format is supported by amongst others QGIS, but it is especially suitable for use with map viewers on your mobile device.

The format is now supported by various mobile map viewers, including e.g., Geopaparazzi and OruxMaps. One I like for its rich set of features is Locus Map Pro. I normally only write about open source, but I think the developer of this app deserves some credit for being one of the first (as far as I am aware of) to support the MBtiles format.  Up to very recently you could only view maps in MBtiles format (similar to the other viewers mentioned above), but with the latest update support for the UTFgrid feature has been added.This basically adds interactivity to your map.
Continue reading

The all new and shiny QGIS 2.6 is out

QGIS Brighton (2.6) is out, with tons of new features and improvements. Check it out on http://qgis.org/.

For an overview of the new features, check out this change log. You really should check it out. I just had a look and although I am using the trunk and beta versions for some time now, I still noticed quite a few new features I hadn’t discovered yet!

GRASS GIS 7.0.0 beta 3 is out, bringing further fixes and improvements

GRASS 7 sports very significant improvements and numerous new functions. For example, the improved graphical user interface makes it much easier to carry out complex GIS operations and handling of vector data has become much faster and more efficient with very large files. There is a large number of new analytical raster and vector modules and existing modules are now much faster (some even 1000 x faster). Beta 3 ships 390 fixes and improvements with respect to beta 2. For more details, go to http://grass.osgeo.org/news/37/15/GRASS-GIS-7-0-0-beta3/.