Imports data from the NASA Shuttle Radar Topography Mission into a PostGIS database (and other databases in the futue).
Python Shell
Switch branches/tags
Nothing to show
Clone or download
Pull request Compare This branch is 13 commits ahead of nsams:master.
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Failed to load latest commit information.


Script that imports the SRTM data in a PostGIS (PostgreSQL) database.

First run the tests that come with this script:

python test/

Then download the SRTM source files (635 MB for Australia):

$ python continent

(replace continent by Africa, Australia, Eurasia, Islands, 
North_America or South_America.

Argument 2-5 optionally specify a bounding box: north, south, west, east.

Verify that the download went correctly:

python test/ continent

Create a PostGIS database (you may need to change some things here depending on 
your system):

$ createdb srtm
$ createlang plpgsql srtm
$ psql -d srtm -f /usr/share/postgresql-8.3-postgis/lwpostgis.sql
$ psql -d srtm -f /usr/share/postgresql-8.3-postgis/spatial_ref_sys.sql

Create a test database:

$ createdb srtm_test
$ createlang plpgsql srtm_test
$ psql -d srtm_test -f /usr/share/postgresql-8.3-postgis/lwpostgis.sql
$ psql -d srtm_test -f /usr/share/postgresql-8.3-postgis/spatial_ref_sys.sql

Run script that reads files and puts them in the database.
Test it first:

$ python test/
$ python continent

Verify the result

$ python continent verify 

All altitude data should now be in the table 'altitude'. Enjoy.