Specifications

88 | august 2008 www.linuxjournal.com
Vector-Based Data Formats
in GIS
As you splash around in the world of
GIS, you also will encounter a plethora
of vector-based spatial file formats.
If you have ever used the application
ArcGIS from ESRI, you probably are
familiar with geodatabases and cover-
ages, two of the most common spa-
tial file formats in proprietary GIS. Of
these two more-advanced spatial data
formats, only coverages are usable in
QGIS, but not geodatabases. In addi-
tion, in QGIS, we can utilize ESRI
shapefiles, which are plentiful in on-
line data repositories and a sort of
standard, as they have been around
a long time. In fact, shapefiles are the
standard format for ESRI’s ArcView,
which is the company’s previous
generation of GIS applications.
Essentially, a shapefile is a set of
files with vector-based location
and attribute data, which can be
represented in a GIS application.
QGIS also supports some other
file formats, such as MapInfo and
PostGIS. PostGIS is especially interest-
ing, as it is an open-source spatial
database technology. PostGIS “spa-
tially enables” the PostgreSQL server,
allowing it to be used as a back-end
spatial database for GIS and—for
those who are familiar with GIS tech-
nologies—as such, is similar to ESRI’s
SDE or Oracle’s Spatial extension.
Some Hard-Core Cartography:
Projections and Coordinate
Systems
Two other important concepts critical
to any cartographic endeavor are map
projections and coordinate systems.
Remember the big, flat world map
you had in your fourth-grade class-
room? The one with Greenland big-
ger than Africa? That map is an ideal
illustration of what happens when
you depict a round object such as the
earth onto a flat map. Converting a
3-D globe onto a 2-D map is called
a map projection.
In a GIS, you need to consider the
projection, because any map you view
or create is essentially flat like a paper
map. Thus, the same concept applies to
both situations.
Just as important as the map projec-
tion is the coordinate system. A coordi-
nate system is the Cartesian system of
x and y axes that a GIS uses to define
locations on a map. This is opposed to
the latitude and longitude system that
defines location on a sphere.
In larger projects, knowledge of
projections and coordinate systems is
very important, and if a mismatch
exists among different parts of a pro-
ject, life can get frustrating quickly.
Fortunately, this project is simple
enough to avoid much concern, as I
am working at the county level and
all my shapefiles come from the same
data source. However, when working
with larger areas and multiple data
sources, it is important to be familiar
with these concepts and standardize
your projection and coordinate system
project-wide.
Enough Theory, Let’s Get
Some Data!
At this point, we have enough GIS
theory to understand what we’re
doing and start the real-estate plan-
ning project. At this stage, I track
down the requisite data.
This project involves finding a par-
cel of land in Washtenaw County,
Michigan, where I can build a cluster
of homes in a natural setting. I am
looking for a suitable land parcel that
was once a wetland but today is agri-
cultural and suitable for conversion
back to a wetland. The ideal site will
be close to a river or lake, have good
road access and be as close to the
city of Ann Arbor as possible.
When you embark on a GIS-based
project, it’s wise to specify all of the ele-
ments you need, because in general,
each will likely be one of the layers you
must acquire. Thus, for this project, we
need layers that depict, respectively,
land use, areas with potential for wet-
land restoration, roads and hydrography
(rivers and lakes). In general, the most
common format for each layer will be
in the form of a shapefile, which QGIS
can handle without a hitch.
So where can I obtain these shape-
files? Fortunately, a plethora of excellent
repositories of free, downloadable
geospatial data exist. An excellent
example is the public Michigan
Geographic Data Library (MGDL), which
offers a vast collection of vector- and
raster-based data at the watershed,
county and state levels. Just some of
the datasets available include those I am
looking for, as well as aerial photos of
the entire state, federal census informa-
tion, geology, soil types, public land
ownership and topography. In the
MGDL, the default format for vector-
based data is the shapefile.
From the MGDL, I can download the
following datasets at the county extent:
I Michigan Geographic Framework
Hydrography (lakes and rivers).
I 1992 National Land Cover Dataset.
I Michigan Geographic Framework
Transportation (roads).
I Potential Wetland Restoration.
Loading Shapefiles into QGIS
Loading shapefiles into QGIS is done by
clicking the toolbar icon labeled Add
vector layer, which looks like a plus sign
hovering over a map; it opens a stan-
dard open file dialog. By preselecting
ESRI shapefile (suffix .shp) from Files of
Type, I can be sure I’m opening the right
file, which is useful, because a shapefile
is actually a bundle of files. As I load
each shapefile, it shows up under its
original name on the left under the
Legend window, which acts as a sort
of table of contents.
After unpacking the datasets, I
load these five shapefiles in this
order: allroads_161v7b.shp (roads),
hydro_161v7b.shp (rivers),
hydropoly_161v7b.shp (lakes),
Washtenaw_Potential_Restoration_Area.shp
INDEPTH
Stripping GIS down to its essentials, you could
call it computer-based mapmaking.