Importing data in GRASS GIS – an example

Introduction

ISRIC, Earth Institute, Columbia University, World Agroforestry Centre (ICRAF) and the International Center for Tropical Agriculture (CIAT) have recently released a new data set of raster layers with various predicted soil properties. This data set is referred to as the “AfSoilGrids250m” data set. It supersedes the SoilGrids1km data set and comes at a resolution of 250 meter. The AfSoilGrids250m data (GeoTIFFs) are available for download under the Attribution 4.0 International (CC BY 4.0) license. See this page for download information.

In this post I’ll show you how you can import this data set in a GRASS GIS database. Continue reading “Importing data in GRASS GIS – an example”

Advertisements

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 “Exporting your GRASS raster using r.out.gdal? Check the createopt options!”

Using GDAL from within QGIS: trouble shooting

Some notes to self about steps I had to take to make GDAL work from within QGIS. Both where compiled from source and run without problems. However, there are still a few issues with running gdal from the QGIS processing toolbox. This may have to do with the fact that I installed both in a non-default location (in the /usr/local/ folder), but in any case, the steps below solved the problem for me. Continue reading “Using GDAL from within QGIS: trouble shooting”

Rescale your raster data layer

Sometimes you want to rescale a raster layer, e.g., to reduce the number of categories, or to create a common scale for different raster layers. Very basic of course, so you can expect to find an appropriate function in any self-respecting GIS software. Just be aware that different terms are being used for the same thing, e.g., scale in gdal, rescale in GRASS and normalize in SAGA GIS. Below a few ways to do this using my favourite GIS programs: GRASS GIS, QGIS, SAGA GIS or gdal. Continue reading “Rescale your raster data layer”

Import MODIS data in GRASS using r.in.gdal

NASA offers access to its MODIS and ASTER data sets through Reverb|Echo. The data comes in HDF format and uses the Sinusoidal grid tiling system. If your gdal is compiled with HDF4 support (use ./configure –with-hdf4), you can use gdal, or any software that uses gdal, to open the downloaded MODIS tiles directly. For example in QGIS as explained here or in GRASS GIS.

In GRASS you can use the r.in.gdal function. Continue reading “Import MODIS data in GRASS using r.in.gdal”

From multiple rasters to one Google earth layer

To create a Google earth map, I would normally export my raster layers as a geo-referenced png file and subsequently use maptiler (or gdal2tiles.py) to create the Google earth map (see here for more details). Because I want to create a map based on several layers, I can not simply export a raster layer. Instead, I need to create a map in QGIS map composer and georeference that map, following the steps described here.

Unfortunately, as it turns out there are limits in the size of the map you can create in QGIS map composer. Perhaps there is a way to increase this, but I am not sure how. An alternative solution is to smaller create sub-sets of the map. But how to get them together as one Google earth map again? Continue reading “From multiple rasters to one Google earth layer”

ESRI rasters in GRASS or QGIS

To exchange data one should preferably use a non-proprietary format, such as the ARC/INFO ASCII GRID or GeoTIFF. Unfortunately, it still happens that data is distributed in a proprietary binary format.

One of the most widely used ones is the binary ESRI ARC/INFO GRID. Of course if you have ArcView or ArcGIS you can use these to convert the ARC/INFO GRID to an ARC/INFO ASCII GRID. But what about the others?

Well, as it turns out, GDAL, which is used by GRASS GIS, QGIS and many other GIS software packages, can open the binary ESRI ARC/INFO grids also. All you have to know is where to find the actual raster file. Continue reading “ESRI rasters in GRASS or QGIS”