Tag Archives: GRASS GIS

Update of r.mess to work in GRASS 7

A while back I wrote a GRASS GIS addon to calculate the Multivariate Environmental Similarity index (MES; see below for a short description). The addon was written as a shell script and R script and only runs on GRASS GIS 6.

I finally got around rewriting the addon in Python. This should make it easier to install (using the g.extension function) and it does not depend on R any more. You can install the addon from the g.extension menu or you can go here. Continue reading

GRASS GIS 7.0 beta 4 released

The 4th beta release of GRASS GIS 7.0 is available for download. This is the last step before the planned release candidate (RC1), so a very good time to take it for a test run.

The most important changes in beta 4 are a major effort to standardize all parameter and flag names. This will bring a better and more consistent user experience. For more details and the download links, to to http://trac.osgeo.org/grass/wiki/Release/7.0.0beta-News

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

Exporting your GRASS raster using r.out.gdal? Check the createopt options!

GRASS GIS can export your raster layer in most common (and quite a few less common) data formats using the r.out.gdal function (menu: file Рexport raster map Рcommon raster formats). Exporting is so simple that you may forget that depending on the output format there are different options to optimise your output raster layer. Continue reading

Stable GRASS GIS 6.4.4 released

A new stable version GRASS GIS 6.4.4 has been released. It sports various bug fixes and a number of new features. Go here for more information.

You may be aware that there is also a GRASS GIS version 7. So which version should you go for? Well, it depends. Is long-term support, backward-compatibility with the GRASS 6 line and stability important to you. Or do you use the QGIS GRASS GIS toolbox a lot (which is not yet compatible with GRASS 7)? Go for the new GRASS 6.4 series.

Are you always looking for the latest of the latests, or is speed or the ability to handle very large data sets important to you? Have a look at list of new and improved features in GRASS 7. It is still in beta, so in theory less stable. But I should add that I am using this version for some time now (on Linux) and in my experience it is very stable.

Of course, you can also install both, they should run happily next to each other.

 

Creating a raster layer with a weighted random sample of points (or, my first attempt to create a python script)

I needed to create a raster map layer with a weighted random sample of all raster cells, using the percentage of crop land as weight. I couldn’t find a function to create such a weighted sample, so I decided to create a script to do this for me. Continue reading

Add multiple raster or vector map layers to current map display in GRASS GIS

If your mapset contains many raster or vector layers GRASS offers a very handy feature to quickly select the layers you want to add to your current map display. In the layer manager, click¬†Ctrl+Shift+L to open the ‘add selected map layers into layer tree’ window. Continue reading