Archive for June, 2013

Checking Distances in a Single Table

At work we have two identical GPS units.  One had to be sent in for service so we wanted to check to make sure it was back in working order.  We collected a series of points with both units.  I took the data collected and put it into a Postgres table; the table ended up with three fields:  set_id which identified the point as collected on each unit, unit_name to show which unit collected the point, and geom for the geometry of the point itself.  Here’s the query I came up with to compare the data:

SELECT DISTINCT a.set_id, ST_Distance(a.geom, b.geom) As dist
FROM test_pts As a JOIN test_pts As b USING (set_id)
WHERE a.unit_name <> b.unit_name
ORDER BY dist DESC;

Too often I forget about self-joins.  They made this query quick to write and easy to understand.

So how’s QGIS 1.9 / 2.0 coming along?

Quite well!  I just pulled the latest build from the GIT repository and it looks pretty spiffy.

A sign that 2.0 is getting closer, configuration files have moved from ~/.qgis to ~/.qgis2.  I don’t know if a migration routine will be included, but my installation created a fresh profile.  The fresh profile included a new theme for the standard toolbar buttons which look very similar to the buttons in GRASS’s user interface.  The new profile  re-set some settings cleared my plugins so I had to re-download the plugins, which leads me to the next overhaul, the plugin manager.

The plugin manager has been combined with the fetching and managing functions of the old plugin system which streamlines the plugin process.  So far none of the plugins that I have installed have required a restart of QGIS.  As for the plugins themselves, the plugins I use such as OpenLayers and Statist have been updated to work with the new API.

DBManager was been polished.  It now lets you save your custom SQL Queries and its import / export functions are much smoother.

Print Composer  has seen a pretty complete overhaul.  Anita Graser did a seven part series looking at some of the new features.  Here’s the link to her printing tag where you can find all seven articles.  My favorite highlights the new alignment guides.  The old version had a snap to grid function but the new guides and rulers make it that much easier to line up the elements of your map.

I keep forgetting to compile in support for the QGIS Globe plugin.  Hopefully I’ll remember to try it out the next time I pull down the source.

There are a ton more new and updated features that I did not get to, for example, the label overhaul and how raster symbology is handled.  Overall 2.0 is going to be a great step forward for the QGIS project.

Spotify 0.9 for Linux

I used to have to write about this all the time, Spotify but maintainers of the Spotify AUR PKGBUILD have been doing such a great job there aren’t any issues getting Spotify to install and run on Arch.  Hooray!