Archive for June, 2012

QGIS 1.8.0 in AUR

The PKGBUILD QGIS 1.8.0 is now in AUR.  The packager also put together a PKGBUILD for libspatialindex, calling it spatialindex so that QGIS wouldn’t have to go to a git repository to build a dependency.

This is great and all but hopefully QGIS makes it back into the official repositories, having the PKGBUILD out there is nice but QGIS takes FOREVER to compile from source.

Got QGIS 1.8 to compile on Arch

Finally got the new QGIS to compile and install.  Before starting you’ll need to install libspatialindex, for Arch users it is available from AUR from package libspatialindex-git.

The first time I tried to get it to compile it bombed out at 96%, it couldn’t find libqgis_core.so.1.8.0.  I couldn’t figure out how to get cmake to look in the build’s output directory to find the freshly built library so I cheated and copied the library to /usr/lib.  That worked and 1.8 started up just fine.

Playing around with 1.8 I found spatialite manager didn’t work, I was missing a python module called pyspatialite.  To install it just download and extract the tarball, in the pyspatialite-3.0.1 directory there’s a setup.py file.  Just run:

python2 build clean install

to install it.  Done, easy peasy.

Hopefully someone will post a PKGBUILD to AUR that will simplify this whole process.  In the meantime at least I’ve got 1.8 up and running.

QGIS 1.8!

QGIS 1.8 was released yesterday.   This release gives us QGIS Browser, a file manager for working with spatial datasets similar to ESRI’s ArcCatalog.  You can use it to browse and organize your spatial data, preview their geography, and drag and drop them into your maps.  Also new is DB Manager.  Previously available as a plugin, it has been refined and added to the main application itself.  With DB manager you can copy layers from one database to another, say from PostGIS to Spatialite, you can run ad hoc queries against a spatial database and add the results as a layer to your map. I’ve only scratched the surface of DB Manager’s capabilities.  Later I’ll run it head to head against the Fast SQL Layer and RT SQL Layer plugins.  But first I’ll have to get 1.8 to install on my Linux laptop.

I couldn’t get 1.8 to compile; I tried to modify the PGKBUILD from AUR for 1.7.4, but 1.8 couldn’t find my Spatialite libraries.  I didn’t have much time to troubleshoot, hopefully I can get it to work this weekend.  In the meantime I’m testing 1.8’s Windows build to get a feel for the new features.  There is good news on the Windows front, apparently a 64 bit binary is just around the corner.   Once they do they’ll be yet another desktop GIS to get 64 bit support before ESRI.

Get data off of an Edge 500 with Linux

If you want to use a site like Strava or Ride With GPS to track your rides you’ll need to upload fit files from your Edge.  Luckily it is a quick and easy to do so.  First use `sudo blkid` to get the volume label so you can make an entry in /etc/fstab to easily mount the device. You’ll see something like this:

/dev/sdc: SEC_TYPE="msdos" LABEL="GARMIN" UUID="BF82-4CA9" TYPE="vfat"

You’ll want to use either the label or UUID values to point to your Garmin device, especially if you have several USB drives.  If you use /dev/sdc the next time you plug in your Edge it might be /dev/sdb or /dev/sdd instead.  If your only Garmin device is your Edge 500 go ahead and use the label, if you have more than one the unique ID in the UUID field will work best for you.  Below is the entry I made to my /etc/fstab file.

LABEL="GARMIN" /mnt/garmin vfat noauto,user 0 0

You can put the mount point, in my case /mnt/garmin, where ever you like. You’ll need root permissions to create a directory in /mnt, but the options in the above fstab entry will give ordinary users permission to mount the device there and read-write to the files on the device. The vfat option tells your computer the device is using a fat32 formatted filesystem, noauto prevents the device from being mounted automatically, and the user option was covered above. Since noauto is being used to mount the Garmin you have to use

mount /mnt/garmin

to be able to see the files stored onboard. When you are done use

umount /mnt/garmin

so that you don’t corrupt any files when you unplug the USB cable.

Once you’ve mounted your Edge navigate to Garmin/Activities.  In this directory you’ll find .fit files for each of your rides.  You can upload them directly from here or copy or move them to your hard drive for safe keeping.  You’ll want to clear the Activities folder from time to time, the Edge doesn’t have much storage space.

PostGIS 2.0 in Arch’s official repository!

A  little over a week ago PostGIS 2.0 hit the official Arch repository.  Hooray!