public
Description: Imports data from the NASA Shuttle Radar Topography Mission into a PostGIS database (and other databases in the futue).
Homepage: http://wiki.openstreetmap.org/index.php/Route_altitude_profiles_SRTM#SRTM_import
Clone URL: git://github.com/Sjors/srtm2postgis.git
srtm2postgis / README
100644 34 lines (22 sloc) 0.798 kb
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
Script that imports the SRTM data in a PostGIS (PostgreSQL) database.
 
http://wiki.openstreetmap.org/index.php/Route_altitude_profiles_SRTM#SRTM_import
 
Usage:
First run the tests that come with this script:
 
$ cd test
$ python test_download.py
$ cd ..
 
Then download the SRTM source files (635 MB):
 
$ python download.py
 
Verify that the download went correctly:
 
$ python verify_download.py
 
Unzip the files (adds 3 GB):
$ for f in `ls *.zip`; do unzip $f; done
 
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
 
Run test script:
$ cd test
$ python test_read_data.py