Getting to know GIS

You’re going to hear the term GIS a lot when it comes to mapping - that stands for the boring term Geographic Information System, which is a.k.a. the very exciting term “cool maps and geographic analysis.”

If you’re doing GIS work, you’re going to be using some sort of GIS software. Your two options are

  1. QGIS, which is free and extensible and cross-platform and [mostly, halfway] perfect. It used to stand for “Quantum GIS” but now it’s just QGIS.
  2. ArcGIS, which costs infinite money and generally only works on Windows and you’ll use if you work for rich fancy people. It does have features QGIS doesn’t, but you won’t run into them very often.

Data formats

When you’re using D3, you’re generally going to use topojson or geojson, two Javascript-friendly formats for geographic information. Not the rest of the world, though! Most GIS people use shapefiles.

The term shapefile is a little misleading - yes, there’s usually a .shp file that’s the guts of the shapefile, but a proper shapefile comes zipped up with all sorts of friends.

  • .shp is the geometry for the data - polygons, points, you name it.
  • .prj is the projection used, as latitude and longitude don’t quite cut it in the GIS world.
  • .dbf is the data associated with each point, line polygon. Think state names, population data, or the year a house was built.
  • .shx is an index file for the .shp’s geometry (a.k.a. helps speed things up)
  • .shp.xmlis “geospatial metadata in XML format,” but I don’t know what exactly follows from it

There are many more, but the ones above are the ones you’ll see most often. They know they’re related because they all share the same name. Let’s say I was trying to get a shapefile for the united states, I might have

  • United_States.zip, which extracts to contain
  • United_States.shp
  • United_States.prj
  • United_States.dbf
  • United_States.shx
  • United_States.shp.xml

In order to open shapefiles, you’ll probably want to install a GIS program. Let’s give QGIS a run, seeing as how it’s 100% free.

Installing QGIS

QGIS for Windows

Hop on over to the QGIS site and you’ll be able to download it lickity-split.

QGIS for OSX

There’s bad news and good news.

  • Bad News: Installing QGIS is a little bit of a headache.
  • Good News: If you want to, you can install bits and pieces from a site called kyngchaos.org. If that isn’t cool I don’t know what is.

If you went to the QGIS download site you’d get the same information, so I’m just going to put it all here.

Let’s get installing!

QGIS depends on something called GDAL, the Geospatial Data Abstraction Library. Let’s install it!

  1. Visit the KyngChaos site at http://www.kyngchaos.com/software/frameworks#gdal_complete and download and run the GDAL Complete installer.
  2. Does it give you an error about something you need to install, like the “PROJ framework”? If so, download it from the same page and install it, then try to run the GDAL Complete package again.

Now back to the main install page - download QGIS and see if you can download it and get it to run. More problems? Missing matplotlib? Download anything else you might need from the main install page or the frameworks page until QGIS successfull opens (I was just updating QGIS and I needed the new SQLite3).

NOTE: If you know what Homebrew is, you might try to use brew to install GDAL. Unfortunately, this won’t work! QGIS uses the GDAL Complete package and will totally ignore Homebrew’s GDAL. If you don’t know what Homebrew is don’t worry, just let your eyes glaze over.

Want to hear when I release new things?
My infrequent and sporadic newsletter can help with that.