Praise for Learning QGIS 2.0

I’m garbage at desktop GIS.

I don’t know what happened. I was once an idiot savant at desktop GIS. I wrote data maintenance and analysis apps in AML (painful), ODE (excruciating), Avenue (we don’t talk about Avenue), and ArcObjects (once, on a dare), and a number of them worked some of the time. I could tell you how long I could spend at the gym while a geoprocessing task ran with ± 5 minute accuracy. I could make a map that wouldn’t make Gretchen stick pencils through her retinas. Probably.

Not anymore. Most of my time is making web toys, and my analysis needs are usually covered by some SQL/PostGIS machinations. When I do have pull up a desktop GIS, I suck pretty hard.

Being garbage at desktop GIS isn’t a normal thing for a GIS person. For 99% of GIS people, desktop GIS is GIS. Combining that secret shame with a long-standing desire to dig into QGIS, I picked up Anita Graser’s Learning QGIS 2.0.

'QGIS: The Good Parts'

If you have any interest in QGIS, you should get this book. It sits in that sweet spot between a voluminous tomb that gives you too much and a tiny pamphlet that gives you too little. You will get everything you need to get proficient and ready to do real work with QGIS in a few hours. Just 15 minutes into the Data Creation and Editing chapter I totally groked the interface for the first time and my editing experience improved 100% from my usual sporadic fumblings. Learning the inns and outs of spatial analysis and map creation after that was gravy.

All of which is a long way of saying (1) QGIS is a legitimate ArcGIS Desktop replacement and (2) Learning QGIS 2.0 is a great way to get started. Big thanks to Anita Graser for helping me not suck at desktop GIS.

Screencast 34: State of the Office 2014

Screencast 33: Setting Up a Cloud MBTiles Server With Benchmarks

Read on →

PHP cURL to Google Civic API

Well, this stumped me for like an hour.

The Google Civic Information API is a handy way to grab voting and elected official information. The current way I do that on GeoPortal is to enter some representative information locally and update it when somebody emails me in ALL CAPS. That is not a good way.

But the Google Civics API’s representative service (oddly) only does POST, and POST doesn’t do JSONP, necessitating a proxy. And to further complicate things, it isn’t a straight-forward cURL operation – you have to send the POST argument as JSON and not the default x-form or you’ll get an error message. So, do this:

// The only arguments are "address" and "callback" (the latter optional for JSONP)

$url = "";

$ch = curl_init();

curl_setopt($ch, CURLOPT_URL, $url);
curl_setopt($ch, CURLOPT_POST, 1);

// I swore a lot over these next two lines
curl_setopt($ch, CURLOPT_HTTPHEADER, array("Content-type: application/json"));
curl_setopt($ch, CURLOPT_POSTFIELDS, '{"address":"' . $_GET["address"] . '"}');

curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);

$json = curl_exec($ch);


// if a callback is set send back jsonp
echo isset($_GET['callback']) ? "{$_GET['callback']}($json)" : $json;

And then a little jQuery to eat it.

    url: 'civicproxy.php',
    type: 'GET',
    dataType: 'json',
    data: {
        'address': activeRecord.address
    success: function (data) {
        // do magical things

Fuzzy Tolerance 32: Task Runners and Modern Workflows

Read on →

Fun With Gulp

I’ve been a happy Grunt user for a while now. I use it for dev watch/preprocessing/livereload type stuff, and it works great. It is, however, a bit cantankerous to set up. Sometimes you can’t seem to get around making intermediary files when stringing tasks together either, which means crud in your folders. I hate folder crud.

Gulp is the new hot stuff for task running. I hadn’t heard of it until a few weeks ago, but after having a play with it it might replace Grunt in my stack. The configuration is easier to set up and read, and because it uses node streams it can net you a decent performance boost.

Read on →

Looking Cloudy

I’m in the process of replacing our primary web server for open source stuff1, and it seemed like a good opportunity to figure out how to get our content to the “cloud” or, if that word raises your nomenclature hackles, a VPS host.

Read on →

What’s in My Toolbox 2014 Edition

Nothing sets my propeller-hat spinning faster than nerdgear. When people talk about how they work I decouple with my headphones and listen. Because, somewhere deep down, I’m pretty sure I’m doing it wrong.

Without further lolcats, here’s my toolbox at the start of 2014. Note I’m detailing my home kit, as I work there most of the time and talking about my County working conditions would needlessly depress you.


  • Lenovo z510 dual-core i5 Haswell laptop, 8GB RAM, SSD for OS
  • Dual 22” 1080P monitors
  • CM Storm QuickFire mechanical keyboard
  • Logitech M570 marble mouse
  • Blue Microphones NESSIE microphone
  • Logitech C920 HD webcam
  • M-Audio AV30 powered monitors
  • AKG M80 MkII earcans (big meh – won’t last the year)
  • Samsung Chromebook
  • Nexus 7 2013 model
  • Samsung Galaxy Nexus (which will be crushed under heel when my Verizon contract is up)

We live in an age of insane personal computing power. So insane I downgraded my home rig. I went from a home-built quad-core i5 with discreet graphics and 16GB of RAM to a Lenovo z510 i5 laptop with a dual-core i5, integrated graphics and 8GB of RAM. It isn’t an even swap – Lenny has Haswell i5 with hyperthreading – but it’s a downgrade.

Other than the fact that it sips power, is nearly silent and doesn’t double as a space heater, I never notice the difference. OK, I rarely notice the difference (hi HandBrake!). But overall I’m very happy with this laptop. It stays chained to my desk, lid closed, powering my external monitors. It has a nice 1080p screen, so if I ever unshackled it from my desk I could do serious work at Starbucks. And here’s a free PSA: if you’re on Linux and you’re not a gamer, always get Intel graphics.

I’m rocking my usual dual-monitor setup with a mechanical keyboard. One new toy is my Blue Microphones Nessie, which includes some auto-processing onboard (compression etc.). Beyond that not much has changed.

I use my Chromebook about as much as I use anything else. I love that plastic piece of shit. I almost bought a new Acer model with a Haswell processor, but then I caught a rumor of a $250 Samsung coming out with retina-esque resolution later this year.

For tablets I like my Nexus 7. My iPad rarely gets touched. It’s a tad big and heavy for reading, and the screen on my Nexus 7 is crazy good. That’s mostly a reading/entertainment device – people that say they do real work on tablets are probably crazy.


  • Kubuntu 13.10 64bit

I’m still rocking along with KDE and Kubuntu. I keep threatening to go to Arch. I installed it on a VM and a netbook just to prove to myself that I could. I like new stuff – I don’t want to have to wait 6 months for a new Kernel or software package and dealing with PPA’s can get old. The idea of a rolling release is very appealing. Maybe I’ll jump when I hit the 4-months-of-13.10 blues.

Dev Stack

  • Sublime Text 3 (beta)
  • Sublime extensions: Package Control, AdvancedNewFilename, AutoFileName, ColorPicker, DocBlockr, EditorConfig, Emmet, HTML-CSS-JS Prettify, LESS, Markdown Preview, Markdown Editing, Nettuts+ Fetch, Sidebar Enhancements, Sublime Linter
  • Kate, Notepad++ (Windows) and nano for quick edits
  • Grunt
  • Grunt extensions: grunt-contrib-watch, grunt-contrib-uglify, grunt-contrib-concat, grunt-contrib-less, grunt-autoprefixer, grunt-text-replace, grunt-contrib-imagemin
  • Git
  • Inkscape and GIMP for graphics
  • Google Chrome
  • Chrome extensions: LiveReload, PageSpeed Insights, REST Console, Screen Capture, Secure Shell, Web Developer

Yep, I’m a web dev. I do some shell scripting in Python and JavaScript (Nodejs), maybe even some bash to fling stuff around sometimes. When I do server side web stuff it’s often PHP, though I’m getting into Nodejs. I also do some DB and server admin, and I do “strategic planning”, which can appear indistinguishable from constipation. But I’m mostly a web dev.

I don’t think there’s a lot here that needs further explanation – if you’re a dev you know most/all of this stuff, if you’re not a dev you don’t care. Sublime Text is still the best editor I’ve run across, and I’m too old to learn Vim + a tiled window manager, though damn if that doesn’t look awesome.

I would like to point a finger and jump up and down about Autoprefixer if you haven’t heard of it. How would you like to never worry about browser prefixes again? Autoprefixer gives you that in a way you can control very precisely. By setting browsers: ['last 2 version', "> 5%", 'ie 8'] I’m prefixing for the last 2 versions of every browser, any browser with above 5% market share, and >= IE 8 specifically.

Everyday stuff I can’t live without

In no particular order:

  • Dropbox
  • TileMill
  • QGIS
  • GeoServer
  • Postgres
  • PostGIS
  • PGAdmin III (because psql is bullshit)
  • Octopress
  • Dolphin, the greatest file manager ever
  • SQLiteman
  • Bootstrap
  • Leaflet
  • jQuery
  • D3, even though it hurts my brain sometimes
  • Lots of Google services (Gmail, Docs, Keep, to name a few)
  • Feedly, so I can keep up with you people
  • Twitter, so I can mimic a social person

Stuff I want to like in 2014

  • A client-side MVC framework. I’ve played with Backbone, Backbone + helpers (because Backbone by itself is a bitch), Angular, Ember, and did the ubiquitous ToDo list app with some others. I’ve tried to like it. I just don’t. I end up with 3x the code and I’ll never be able to share it with co-workers because there’s too much magic overhead. Lots of people like this stuff, so it could just be me. Maybe in 2014 I’ll get it.
  • I want to do something with QT. I don’t do desktop apps or C++, so the odds of this happening are not great.
  • A serious Nodejs app, complete with a magical framework like Meteor. I’ve been waiting patiently for Python to eat my PHP addiction, but Nodejs gave it a beating for server-side web stuff. Actually ~10,000 beatings, all running concurrently. Maybe this year I’ll finally get off of PHP. I love PHP, but every time I tell somebody I did something in PHP I feel a little dirty afterwards.

Screencast 31 - Rapid Fire

Read on →

GIS Day 2013

GIS Day 2013 has arrived!

We’ll be flaunting our geowares on Wednesday, November 20th from 8:30-3:30 at Spirit Square, 345 N. College St., Charlotte NC. There will be fun for all ages and talks and demos going on most of the day. It’s open to the public, so if you’re in the area feel free to swing by any time. I’ll be there doing a few demos and hanging out most of the day. Look for the toe shoes and come say hi.