Of course as soon as I post this AUR gets updated.  The maintainer pretty much used saultdon’s PKGBUILD.


Here’s a link to a PKGBUILD that will install QGIS 2.0.1 for you on Arch Linux:

Thanks to AUR user saultdon for putting it together.


A nice explainer for PostgreSQL’s EXPLAIN output

This site does  a great job of analyzing the output of PostgreSQL EXPLAIN queries.  It will show you which steps of a query are slowing you down giving you the chance to rewrite your query, change indexing, or reorganize tables in order to speed things up.  It’s very helpful!

Improved Polygon Capture plugin makes QGIS Digitizing easier

A new plugin showed up in the QGIS 2.0 repository recently, Improved Polygon Capture allows you to specify a line segment’s length and/or angle as you digitize a polygon.  The plugin is easy to use, when you start an edit session with a polygon layer it puts a dialog box below your table of contents window.  It has two fields, one for angle and another for distance with a checkbox for each.  When you enter a value and check the box that value is locked in and the line segment you create will match those values.  The length field’s units will be in your project’s projection’s units.

Awesome QGIS Tutorial

Here’s a great QGIS Tutorial put together by Frank Donnelly at City University of New York.  It covers QGIS 1.8, and not only teaches the software but teaches basic GIS concepts as well.  It is a great way to introduce someone to the world of GIS.

Thank you Garmin!

I bought a brand new Edge 500 off of eBay last May.  It has been great, except the lap / reset button has been getting progressively harder and harder to press.  I’d press it and it wouldn’t register which sucked because in order to record a ride so that its data can be exported you have to press and hold the button for 3 seconds.  It finally got to the point where I was unable to record my last ride last week.

I was prepared to pay $89 in order to RMA my device because even if I wasn’t a few months past the end of the warranty period, since I bought it off eBay the warranty was never valid.  I called the RMA line and explained my problem.  The operator was nice enough to extend the warranty to me!  All I had to do was mail in my broken Edge and they sent me a refurbished model that is as good as a new unit.  Thanks Garmin!

Displaying PostGIS data in ArcGIS Desktop

There are a few ways to display PostGIS data in an ArcGIS Desktop map.  The easiest I’ve found is to use Ragi Burham‘s OGR Plugin for ArcGIS.  It allows you to bring in data from almost any OGR supported vector format, including PostGIS and Spatialite.  For right now the layers you bring in will be read-only but according to the project’s FAQ write support will be added thanks to new features in ArcGIS Desktop 10.1 SP1.

The project is in Beta and there are some rough corners.  To connect to your PostGIS database you have to provide a connection string, there is no GUI for this as of yet.  For now though, the example connection string under the field where you type in your information is a very good guide on what information you need and how it needs to be formatted in order to create a connection.  Once you bring in your layers they act like any other vector layer, except they are read-only.  The only problem I’ve found so far is labels aren’t placed correctly.

On the bright side this plugin allows you to use your PostGIS vector layers as base layers for data creation and editing.  You can use ArcGIS’s snapping and trace features as if the layers were a native shapefile or feature class and for cartography purposes you can symbolize your layers by category or quantity.

Overall this plugin is a great addition, a simple way to integrate OSgeo data, and other OGR supported data into your maps.


UPDATE: Map documents don’t store the connection information, so if you save a mxd and open it later the connections to your PostGIS layers will be broken.

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

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