Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- # Download .hgt file from NASA Earthdata
- # Store .hgt file name in variable
- source_file="S37E174"
- # Prepare file for import
- gdal_translate -q -co TILED=YES -co COMPRESS=DEFLATE -co ZLEVEL=9 "$source_file.hgt" "$source_file.tif"
- gdalbuildvrt -q -overwrite SRTM1.vrt "$source_file.tif"
- gdal_translate -q -co TILED=YES -co COMPRESS=DEFLATE -co ZLEVEL=9 -co PREDICTOR=2 -projwin 174.692262 -36.780183 174.818605 -37.028786 SRTM1.vrt srtm_30m.tif
- gdal_contour -i 10 -a height srtm_30m.tif srtm_30m_contours_10m
- # Import into database
- cd srtm_30m_contours_10m/
- shp2pgsql -p -I -g way -s 4326:900913 contour.shp contour | psql -h "$my_ip" -U postgres -d gis
- shp2pgsql -a -g way -s 4326:900913 contour.shp contour | psql -h "$my_ip" -U postgres -d gis
Add Comment
Please, Sign In to add comment