PROJ, GDAL, and OGR – Oh, My!

Here are brief introductions and home-brew installation instructions for two libraries (and sets of command line tools) widely used by open-source GIS applications.

In most cases you probably won’t need to compile these yourself, as end-user programs are typically packaged with everything you need. Sometimes batteries aren’t included, though, or you might want to write a program that uses these tools directly. They’re like wheels you don’t need to reinvent to build construction vehicles for your novel GIS problems.

proj-4.6.1: PROJ.4 Cartographic Projections Library

From the documentation (OF90-284):

Program proj (release 3) is a standard Unix filter function which converts geographic longitude and latitude coordinates into cartesian coordinates, (λ, φ) → (x, y), by means of a wide variety of cartographic projection functions.

Cartographic projection is the process by which points on a sphere are mapped to points on a plane. There are many ways this can be accomplished, all of which are necessarily compromises. PROJ.4 provides a programming interface to perform such projections.

  1. ./configure
  2. make
  3. make install

gdal-1.5.2: Geospatial Data Abstraction Library

GDAL provides a common programming interface to translate and access a variety of geospatial raster (i.e. bitmap) data formats. GDAL includes the OGR Simple Features Library, which performs a similar function for vector data. OGR uses PROJ.4.

  1. ./configure
  2. make
  3. make install

GDAL’s configure script reports which optional features are available. Many have additional dependencies, such as the TIFF and PNG libraries built in a previous guide.

Posted on Monday, September 22nd, 2008. Tags: .