Tag Archives: tutorial

Import GRASS function console output as data.frame in R

In R you can use system calls or the spgrass6 package to run GRASS GIS functions. To do this, you need to run R from within GRASS GIS. This is as simple as starting GRASS GIS and subsequently starting R from the command line. See the GRASS-wiki for a more detailed background.

The issue at hand
One of the user-cases is when you want to (1) run a GRASS function on e.g., a raster layer and (2) capture the console output in a R data frame. For example, you can run the following in R:

MyVariables <- execGRASS("r.stats", flags="c", input="MyMap", separator=",", intern=TRUE)

However, the output is not in a very convenient format. Continue reading

two-minutes video tutorials for R

I just came across this blog with (by the time of writing) sixty two-minutes video tutorials on how to do things in R. Especially nice for those who like to learn by watching and listening. But do pay attention while watching because one way the videos are kept short is  really fast talking…

Here is the link: http://www.twotorials.com/2012/04/sixty-two-minute-r-twotorials-now.html

Create mobile maps

Outdoor sport or field work, a GPS has become indispensable. But what if you want to use your own maps? If you are using an Android smartphone and one of the map viewers available on android market, this is fairly easy. You’ll need your favorite GIS application (e.g., GRASS or QGIS), Maptiler, and Mobile Atlas Creator (MOBAC). Continue reading

Nederlandse (Dutch) QGIS community

I just came across the Dutch QGIS site: www.qgis.nl. The objective of the website is “to create a platform for native speakers AND to discuss / explore typical dutch ideas or problems”.

But the tutorials on this site will not only be useful for the Dutch (speaking) community. All tutorials (that I have seen) are available in both Dutch and English. Check it out…

Free online textbooks on geospatial and statistical analysis

Geospatial analysis guide

I just found, through this blog, a very nice text book on geospatial analysis; Geospatial Analysis – A comprehensive guide by M. de Smith, P. Longley and M. Goodchild. The book covers a wide range of topics such as “Conceptual Frameworks for Spatial Analysis”, “Data Exploration and Spatial Statistics”, “Statistical Methods and Spatial Data”, “Exploratory Spatial Data Analysis”, “Grid-based Statistics”,  “Spatial Autocorrelation”, and “Network and Location Analysis”. Also very nice, it includes an overview of some of the main spatial statistical packages for R. Continue reading

Creating a map using the command line

Although I like to carry out GIS analyses using the command line interface (CLI), creating maps is something I still tend to do using the graphical interface (GUI). And most of the time that makes perfect sense to me, creating something visual (the map), using visual tools (GRASS GUI gis.m or QGIS).

But things change when e.g., you have to create many maps of the same area changing one variable only, Continue reading

On the QGIS wiki: How do I do that in QGIS

On the QGIS wiki there is a great section with the self-explanatory title ‘How do I do that in QGIS‘. To quote from the introduction of this section, “it is intended to show how to perform basic GIS operations in QGIS in the most straightforward way… It includes common operations which are typically one step in a longer process of analysis”. Continue reading

R/GRASS connection: more than the sum of its parts

GRASS GIS is a very powerfull GIS offering an extensive set of tools for geospatial data management and analysis, image processing, and spatial modeling. The possibility to directly interact with R further improves the geospatial analysis capabilities of GRASS (see R Spatial View). Continue reading

Finding and renaming long file names with R

I have never given it a though, but there is apparently a limit to the length of file names that can be handled by Windows Explorer of Windows XP. I found out when trying to copy my Zotero folder to a computer with Windows XP. I was getting error message of folders that could not be copied, suggesting that my HD was full. I checked a few of these folders and they all contained one or more files with very long file names (>250 characters). Continue reading