If you run out of memory, split up your data

Most functions of GRASS can handle very large data sets. With a few functions you might run out of RAM though. One of these is the r.random.cell. This is a function that generates a random sets of cells with spatial dependence, i.e., that are at least a user-defined distance apart.

When this process takes up too much RAM, the solution is to divide the raster layer in a set of tiles Continue reading

Posted in Data handling, GIS, GRASS GIS, R computing environment | Tagged , , | Leave a comment

ReshapeGUI – a tool to learn to use reshape2

The package Reshape2 in R is a very powerful tool to flexibly restructure and aggregate data. For users familiar with the pivot table function in Excel or Libreoffice/Openoffice, this tool offers similar (and more) functionality, albeit from the command line.

It’s flexibility comes with a price, it may not be extremely intuitive for the beginner. Continue reading

Posted in R computing environment | Tagged , , , , , | Leave a comment

Sexante toolbox for QGIS

QGIS already has very strong analytical capabilities through its GRASS toolbox. Now, this is further extended by a new plugin that offers direct access to the Sextante toolbox. With this toolbox, QGIS can tap into 300+ functions from SAGA GIS and a number of other functions. Continue reading

Posted in GIS, GRASS GIS, QGIS | Tagged , , , , , , | 1 Comment

How to reduce PDF file size in Linux

I have a scanned report of 181 pages, resulting in a 20MB file. Still OK, unless you need to share the document with a very slow internet connection.

In comes Gostscript, a command line tool that can read and manipulate pdfs. On eHow, you can find a short tutorial how to do this.

Posted in tools | Tagged , , | Leave a comment

Update of GADM datasets

It is always good to keep an eye on your data sources if you don’t want to miss out on new versions. Like the Global Administrative Areas database (GADM), which published version 2 of their data set earlier this year (I thought about revisiting their site after reading this post). A fairly relevant update with updated boundaries for e.g., Sudan.  and with level two administrative boundaries now available for most countries.

The files are available as shapefile, ESRI personal or file geodatase, Google earth .kmz file or R spatial polygon dataframe. If only they would make it available in spatialite format.. (I know, it is easy enough to import shapefiles into a Spatialite database, I am just being lazy).

 

Posted in Data sources | Tagged | Leave a comment

Changes in the r.mapcalc syntax in GRASS GIS 7

After some frustrating failed attempts to do some simple raster calculations in GRASS (version 7.0), I found out there is a small change in the syntax for r.mapcalc in GRASS GIS 7: Continue reading

Posted in GRASS GIS | Tagged , , | Leave a comment

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

Posted in Android, GIS, Mobile tools | Tagged , , , , , , | Leave a comment

Add geometry values to vector layer in GRASS GIS

In my previous post I explained how to add geometry values to the attribute table of a vector map in QGIS. You can do the same in GRASS GIS. It is slightly more complicated (don’t worry, it is still easy enough), but also more powerful. Below I will briefly explain how to use this tool using the GUI or command line. Continue reading

Posted in Data handling, GIS, GRASS GIS | Tagged , , , , , | 1 Comment

Adding geometry columns to attribute table of vector map

What if you have a vector polygon layer and you want to add a column to the attribute table with the size (area) of each individual polygon? Very simple in QGIS, just go to the vector menu: vector | Geometry tools | Export/Add geometry columns, which will give you the following input screen: Continue reading

Posted in Data handling, GIS, QGIS | Tagged , , , , , | 3 Comments

Another way to import OSM data in your PostGIS database

There are various options to import your data in a PostGIS database. The OSM2postgresql script (for Linux) sets up a PostgreSQL / PostGIS server or database (optional), imports OSM data into it, process those data (including multi-polygons with holes) and proposes a classification. Check out http://wiki.openstreetmap.org/wiki/Osm2postgresql (where you can find links to some alternative solutions too).

Posted in Data handling, GIS | Tagged , , , | Leave a comment