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?
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.
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.
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.
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.
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.
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.
I visited the growing acacia tree seedling, and took some measurements and photos this week. Here are the results compared to last year.
The recent stable version of Spatialite, 3.0, supports linking to and importing Excel spreadsheet tables. Read on to see how it’s done.
Last week’s bike ride was out to the wadi where “my” acacia seedling is struggling to survive. I was very satisfied to see that, with the cool winter weather, the plant has become green and seems to be doing well. On my last visit, during the scorching summer months, the seedling looked totally dried out and dead, and I wasn’t sure it would pull thru. We haven’t had any rainfall yet, just the lower temperature was enough to allow the plant to start growing again. These thorny buggers have eons of evolution behind them, so I guess they know how to deal with the arid season. I’ll visit again later during the winter and take measurements.