This repository is private.
All pages are served over SSL and all pushing and pulling is done over SSH.
No one may fork, clone, or view it unless they are added as a member.
Every repository with this icon (
) is private.
Every repository with this icon (
This repository is public.
Anyone may fork, clone, or view it.
Every repository with this icon (
) is public.
Every repository with this icon (
sjors (author)
Wed Jul 30 23:23:40 -0700 2008
commit 5f0691a5d071897ec24c79ba53fa6a70682ac1e6
tree a73a53c7e4b6b09a9fea925957619a16e90b29da
parent 8449fdf1f1435436f9b4909c8290082198f21379
tree a73a53c7e4b6b09a9fea925957619a16e90b29da
parent 8449fdf1f1435436f9b4909c8290082198f21379
| name | age | message | |
|---|---|---|---|
| |
.gitignore | Wed Jul 30 23:23:40 -0700 2008 | |
| |
.project | Mon Jun 30 02:29:46 -0700 2008 | |
| |
.pydevproject | ||
| |
README | Sat Jul 12 01:33:25 -0700 2008 | |
| |
data/ | Wed Jul 16 06:24:22 -0700 2008 | |
| |
database_pg_template.py | Wed Jul 30 23:22:31 -0700 2008 | |
| |
download.py | Wed Jul 16 06:24:22 -0700 2008 | |
| |
import-google-app-engine.py | Wed Jul 30 23:23:40 -0700 2008 | |
| |
insert-app-engine.sh | Wed Jul 30 23:23:06 -0700 2008 | |
| |
read_data.py | ||
| |
read_data_pg.py | ||
| |
test/ |
README
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: python test/test_download.py Then download the SRTM source files (635 MB for Australia): $ python download.py continent (replace continent by Africa, Australia, Eurasia, Islands, North_America or South_America. Second argument (optional) specifies from which tile to resume. Use full file name e.g. 'N36W004.hgt.zip'. Set to 0 start at the first file. Argument 3-6 optionally specify a bounding box: north, south, west, east. Verify that the download went correctly: python test/verify_download.py continent 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 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/test_read_data.py $ python read_data.py continent Verify the result $ python read_data.py continent verify All altitude data should now be in the table 'altitude'. Enjoy.








