Skip to content

Latest commit

 

History

History
107 lines (73 loc) · 3.98 KB

README.md

File metadata and controls

107 lines (73 loc) · 3.98 KB

Terra

Virtual environment for FOSS geo tools.

Terra lets you quickly get up and running with a server loaded with tons of useful open source geospatial tools - to get all the complexity of installation and configuration out of the way. Particularly useful for users wanting cool geo tools, but wanting to avoid dependency hell.

Software

The box includes the following software tools ready to go:

Requirements

Terra uses Vagrant to quickly provision a local virtual machine, and Chef automation tools to get you up and running with a full suite in minutes.

First you need to install VirtualBox, then download and install Vagrant for your platform. You'll also need to download the initial base box from the Vagrant catalog.

git clone https://github.com/colemanm/terra
cd terra
vagrant box add precise http://files.vagrantup.com/precise64.box

# Initialize submodules
git submodule init
git submodule update

Usage

To start the VM provision process, run this single command from within the repository directory (the first build will take a bit since it's building several libraries from source):

vagrant up

After several minutes, you'll have a virtual machine silently running that you can access. Get to the command line of your new geo environment:

vagrant ssh

You can also suspend (save state and exit) or halt (shutdown) the machine like so:

vagrant suspend
vagrant halt

To completely delete and remove the virtual machine, destroy it:

vagrant destroy

And completely rebuild again from scratch:

vagrant up

Working with Data

Once you've SSH'ed into your VM instance, you'll see a data directory if you list files. This folder is shared between the host (your computer) and the guest (the VM). Putting files you want to work with - like databases, shapefiles, or imagery - here will allow you to work with them in the VM sandbox for conversion, processing, and other tasks. This keeps it easy to have your geo toolbox clean and consistent for working with various data types.

If you put files in the '/data' dir in the terra local repo, they should show up in ~/data when you ssh to the VM. It should link to the directory on your machine, using VirtualBox shared folders.

Testing it Out

On your VM, GDAL (the god of open geo data toolkits) will have full support for external libraries like FileGDB, Personal Geodatabases, ECW, and MrSID files. There's an included Makefile to download some sample data to try out:

make data

This will save some samples in the data/ directory that's visible within the VM's home. Try it out and see that tools like ogrinfo can read from a personal geodatabase:

vagrant ssh
cd data/
ogrinfo -so sample.mdb

Should get something like:

INFO: Open of `sample.mdb'
      using driver `MDB' successful.

Layer name: provinces
Geometry: Polygon
Feature Count: 183
Extent: (-180.000000, -90.000000) - (180.000000, 83.645130)
Layer SRS WKT:
GEOGCS["GCS_WGS_1984",
    DATUM["WGS_1984",
        SPHEROID["WGS_84",6378137.0,298.257223563]],
    PRIMEM["Greenwich",0.0],
    UNIT["Degree",0.0174532925199433]]
FID Column = OBJECTID
Geometry Column = Shape
OBJECTID: Integer (0.0)
scalerank: Integer (0.0)
featurecla: String (0.0)
....

Changing Configuration

The Vagrantfile contains the basic configuration of the VM instance, like memory allocation and shared folders. From within this file is where it calls out to Chef to process the runlist living in terra.json. The runlist contains the manifest for which Chef "cookbooks" to run for autoinstallation and configuration of packages.