Exporting rasters to Mbtiles using GDAL

Web maps are generally made up of many small, square images called tiles, which are placed side by side in order to create the illusion of a very large seamless image [for a good explanation, see here].

Tiled based maps can be made up of many tiles. Loading all those tiles would be inefficient and slow. That is where the MBtiles, developed by Mapbox, come in. The MBtiles specification is an efficient format for storing millions of tiles in a single SQLite database.

I have written before about Tilemill, a great tool to create great looking interactive maps. Since then more tools have come available to create MBtiles. Continue reading “Exporting rasters to Mbtiles using GDAL”

Terrain attribute selection in environmental studies

Exploring species-environment relationships is important for amongst others habitat mapping, biogeographical classification, conservation, and management. And it has become easier with (i) the advance of a wide range of tools, including many open source tools, and (ii) availability of more relevant data sources. For example, there are many tools with which it is relatively easy to create a wide range of derived terrain variables using digital elevation (DEM) or bathymetric (DBM) models. However, the ease of use of many of these tools, especially when used by non-experts, may lead to the selection of arbitrary or sub-optimal set of variables. In addition, derived variables will often be highly correlated (Lecours et al. 2017).

Continue reading “Terrain attribute selection in environmental studies”

Saving space on your HD – null file compression in GRASS GIS 7.2

The GRASS GIS development team recently released a new stable major release, GRASS GIS 7.2. The release brings more than 1900 fixes and improvements since the previous stable release 7.0.5. You’ll find a detailed overview of all the changes and improvements on this GRASS wiki page.

One important library change in a GRASS library is support for NULL file compression using the r.null function. This may not sound terribly exciting to all of you, but for those that have GRASS databases with large (number of) raster layers, this may save considerable space on the hard disk.
Continue reading “Saving space on your HD – null file compression in GRASS GIS 7.2”

The first release candidate of GRASS GIS 7.2.0 is out

I have been using the development version for some time now, and all I can say is that you definitely should give the new GRASS GIS 7.2.0RC1 release a try. It is, in my experience, very stable, and it provides more than 1900 stability fixes and manual improvements compared to the stable releases 7.0.x.

It also features a number of new modules. A favourite of mine is the new g.gui.datacatalog which makes it so much easier to browse, modify and manage GRASS maps across map sets and locations. Also very welcome is the new d.legend.vect module which can be used to display a vector legend in the active graphics frame. And for those that are into space-time analyses, there are also a number of new modules for the temporal framework.

For more information about all the improvements and changes, see the detailed announcement. And while you are at it, don’t forget to check out the add-ons, some great new ones have been added and updated in the last few months.

And last but not least, a big thanks to the developers!

 

 

 

A GRASS GIS addon to upload raster values and labels to a point layer

In GRASS GIS you can upload raster values at positions of vector points to the attribute table of that vector point layer using the function v.what.rast. If you also interested in the raster category labels, you can have a look at r.what, which lets you query a raster map  on their category values and category labels.

However, the results of r.what are written to a text file. If you want to upload raster values and labels to the attribute table of a point vector map, you can use  v.in.ascii to import the text file created with r.what as a point vector layer in GRASS GIS.

Fairly straightforward, but wouldn’t it be even more convenient if you you had an option in r.what.rast to also upload the category labels? Continue reading “A GRASS GIS addon to upload raster values and labels to a point layer”

Climate data sets, which one to select?

For species or vegetation modelling, one of the first choices to make is the selection of explanatory variables, which in most cases will include climatic or bioclimatic data sets. One of the most widely used global climate data sets in biogeographic and ecological research is from Worldclim (Hijmans et al., 2005). Alternative global rainfall data sets are from TAMSAT TARCAT (Maidment et al., 2014) and CHIRPS (Funk et al., 2014). The Worldclim data layers are based on an interpolation of average monthly climate data from weather stations. The other two data sets combine weather station data with satellite observations to improve accuracy where in situ rainfall measurements are sparse. All three data sets are available from the KITE resources website as part of the Africlim dataset (Platts et al. 2015). Continue reading “Climate data sets, which one to select?”