Strahler stream order in GRASS

In hydrology, a stream network is composed of segments or “reaches” which are arranged in a hierachy. There are several systems of ordering the stream reaches, the most popular of which is the Strahler or HortonĀ  number. GRASS GIS offers, alongside the watershed delineation tool r.watershed (discussed here), a set of addons for stream network analysis. We’ll examine how to use these addons, and how to use strahler ordering to improve the visual effect of a stream network map.

Continue reading

Spatialite: Speedup your query with spatial indexing

Spatialite, like any good spatial data management system, can build a spatial index for your layers. Using this index in your spatial queries will dramatically shorten the runtime for that query. The latest version of Spatialite offers a nice compact format for using a spatial index. To demonstrate, I created a point layer of 20,000 theoretical store locations, with sales data for each store, and a polygon layer of over 280 “local councils”. My mission it to sum up the total sales in each local council. So I need to find which stores are located in each local council and aggregate sales for those stores.
Continue reading

Sampling points along a line with R

Creating a random set of points is a standard GIS technique, used often for setting up sampling or monitoring locations. Among the tools in FOSS GIS software which offer this function are QGIS (in Vector -> Reseach Tools -> Random points) or GRASS (using the v.random module). But suppose you need points spread randomly along a line feature? The R-project package of spatial functions called ‘sp‘ can do just that.

Continue reading