Archive for category GIS

Get your phone GPS data into a GIS format

Nearly every new phone or tablet these days comes GPS enabled. And you can choose any of a slew of apps to capture GPS waypoints and tracks. But how do you get these data into a GIS system? Several apps save the GPS data into an sqlite database, so using Spatialite to convert the locations to spatial layers is a piece of cake.
Read the rest of this entry »

No Comments

Creating Depth-Volume curves with GRASS-GIS

Our regional Drainage Authority prepared a reservoir at the mouth of a small dry riverbed to catch and regulate flood water coming from a mountain canyon. This reservoir was to act as a buffer to prevent flooding of agricultural fields and residential areas further down the valley. After a sudden rainstorm last week, the reservoir bravely fulfilled (pun intended ;-) ) it’s duty. Now we want to know how much water was actually captured, and to create a depth volume curve for the small “lake” that was formed. Here’s how I did this using GRASS.
Read the rest of this entry »

4 Comments

New Labeling in Quantum GIS

The new labeling setup in QGIS has been around for over a year now, and in the upcoming version it will become the default, replacing the old labeling. This new engine brings some advanced options that are quite worth learning, such as bulding labels from expressions, and conditional labeling. I’ll expand on some of these tricks that have already appeared in other QGIS blogs
Read the rest of this entry »

No Comments

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.

Read the rest of this entry »

No Comments

From Lat/Lon to UTM zone in Spatialite

There are several PostGIS functions floating around to calculate the UTM zone EPSG code for points in Latitude/Longitude WGS84. However, Spatialite, based on Sqlite, does not support user created functions. So how can we get the same results in a Spatialite database?
Read the rest of this entry »

2 Comments

Manipulating GPS tracks in Spatialite

I returned from a short bike outing with my ride captured as a GPS track. Along the way, I also grabbed the rest stops as waypoints. Both of these were downloaded from the GPS asĀ *.gpx files. So I have tracks.gpx and waypoints.gpx. Now I want to push these layers straight into Spatialite, and do some calculations.
Read the rest of this entry »

4 Comments

Getting QGIS 1.8 running on Scientific Linux 6

Quantum GIS is marching ahead and the latest stable version, 1.8.0, provides some new features and improvements. RPM packages are already out for Fedora, but not yet for the Red Hat 6 clones like Scientific Linux 6. Compiling on your own isn’t hard, so if you don’t want to wait for the official package, here are a few pointers.
Read the rest of this entry »

No Comments

Spatialite on Ubuntu

Users of Ubuntu who want to use Spatialite for managing GIS layers are in luck. New updated packages have been released bringing to Ubuntu and derivatives all the new feature of spatialite 3.1.0.
Read the rest of this entry »

5 Comments

Spatialite- Updating one table from another

Users of SQL databases often get tripped up when trying to update values in one table from another table. The method involves a subquery in the UPDATE statement to extract the values from the other (source) table. We’ll review how it’s done, both with simple attribute values, and with an update based on a spatial query.
Read the rest of this entry »

2 Comments

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.
Read the rest of this entry »

2 Comments