Re: [gdal-dev] Aster tif files to hgt

Jaromír Mikeš mira.mikes at seznam.cz
Mon Nov 7 20:24:38 EST 2011


> Od: Scott Arko <saarko at alaska.edu>

Hello Scott,

> To resample your data, you will need to call gdalwarp with the -tr option.
>  This is specified in whatever the native units are for your projection.
>  In the case of UTM, meters.  So, something like:
> 
> gdalwarp -of SRTMHGT -tr 30 30 -r bilinear input.hgt output.hgt
> 
> I see you also are using the -t_srs option.  I find it best if you can use
> the EPSG codes when using -t_srs.  Something like
> 
> gdalwarp -t_srs EPSG:13606 .....
> 
> 13606 is for UTM Zone 6N.  Codes vary by zone.

I can't find EPSG code for area I building map (18F, 19F - Patagonia)
So I am doing this now in my script:

gdalwarp -of GTiff -srcnodata 32767 -t_srs "+proj=utm +zone=18F +datum=WGS84" -rcs -order 3 -tr 30 30 -multi ASTGTM2_${tile}_dem.tif ${tile}.tif

this goes fine, but when I am trying then convert to hgt having errors:

gdal_translate -of SRTMHGT ${tile}.tif ${tile}.hgt

Warning 1: The corner coordinates of the source are not properly aligned on plain latitude/longitude boundaries.
ERROR 1: Image dimensions should be 1201x1201 or 3601x3601.

Any suggestion?

Thank you

mira


More information about the gdal-dev mailing list