Geography Reference
In-Depth Information
Figure 13.4: Volcanoes shapefile created with Python script
in these languages directly against the GDAL/OGR API to work with
both vector and raster formats.
13.4
PostGIS
Although PostGIS is really on the server side of things, it's an important
component of many of our desktop applications. In this section, we will
look at using Ruby to access and work with geometries stored in Post-
greSQL. Fortunately, the components to unite Ruby, PostgreSQL, and
PostGIS already exist. We're using Ruby, but you could just as easily
use Python or another language that provides PostgreSQL bindings.
Installing the Gems
First we need to get a few things installed in order to work with the
database. Here's what you need:
• Ruby
• RubyGems
• postgres-pr
• GeoRuby
Obviously we need Ruby—I'll let you figure out how to get that—or just
visit the website at http://www.ruby-lang.org . To access PostgreSQL, we
 
 
 
 
 
Search WWH ::




Custom Search