Guest User

Untitled

a guest
Mar 18th, 2018
93
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.73 KB | None | 0 0
  1. # Download .hgt file from NASA Earthdata
  2.  
  3. # Store .hgt file name in variable
  4. source_file="S37E174"
  5.  
  6. # Prepare file for import
  7. gdal_translate -q -co TILED=YES -co COMPRESS=DEFLATE -co ZLEVEL=9 "$source_file.hgt" "$source_file.tif"
  8. gdalbuildvrt -q -overwrite SRTM1.vrt "$source_file.tif"
  9. 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
  10. gdal_contour -i 10 -a height srtm_30m.tif srtm_30m_contours_10m
  11.  
  12. # Import into database
  13. cd srtm_30m_contours_10m/
  14. shp2pgsql -p -I -g way -s 4326:900913 contour.shp contour | psql -h "$my_ip" -U postgres -d gis
  15. 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