Hello Mira,<div><br></div><div><br></div><div>The error you are getting is because for the SRTM height format you need to have very specific coordinates for the tiles. I'm not sure I can exactly explain why this is, but you need to have 1201x1201 for the 1 degree tiles. Also, you need to use the -projwin option to have the corners line up properly. Here is a command I used to generate 1 degree tiles for a similar problem as yours (i.e. taking another format DEM and making it look like SRTM)</div>
<div><br></div><div>gdal_translate -of SRTMHGT -projwin 72 30 73.000139 28.9998611 SRTM_30m_ELLIPSOID_HGT_EXPANDED_MOSAIC_GEO N29E072.hgt</div><div><br></div><div>You can see that the LR corner extends past 73/29 by one half an arc-second (.000139 degrees). This worked for my application and properly formatted the tiles. Hope this helps you sort out your problem. </div>
<div><br></div><div><br></div><div>Thanks,</div><div>Scott<br><br><div class="gmail_quote">On Mon, Nov 7, 2011 at 4:24 PM, Jaromír Mikeš <span dir="ltr"><<a href="mailto:mira.mikes@seznam.cz">mira.mikes@seznam.cz</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">> Od: Scott Arko <<a href="mailto:saarko@alaska.edu">saarko@alaska.edu</a>><br>
<br>
Hello Scott,<br>
<div class="im"><br>
> To resample your data, you will need to call gdalwarp with the -tr option.<br>
> This is specified in whatever the native units are for your projection.<br>
> In the case of UTM, meters. So, something like:<br>
><br>
> gdalwarp -of SRTMHGT -tr 30 30 -r bilinear input.hgt output.hgt<br>
><br>
> I see you also are using the -t_srs option. I find it best if you can use<br>
> the EPSG codes when using -t_srs. Something like<br>
><br>
> gdalwarp -t_srs EPSG:13606 .....<br>
><br>
> 13606 is for UTM Zone 6N. Codes vary by zone.<br>
<br>
</div>I can't find EPSG code for area I building map (18F, 19F - Patagonia)<br>
So I am doing this now in my script:<br>
<br>
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<br>
<br>
this goes fine, but when I am trying then convert to hgt having errors:<br>
<div class="im"><br>
gdal_translate -of SRTMHGT ${tile}.tif ${tile}.hgt<br>
<br>
</div><div class="im">Warning 1: The corner coordinates of the source are not properly aligned on plain latitude/longitude boundaries.<br>
ERROR 1: Image dimensions should be 1201x1201 or 3601x3601.<br>
<br>
</div>Any suggestion?<br>
<br>
Thank you<br>
<br>
mira<br>
</blockquote></div><br><br clear="all"><div><br></div>-- <br>Scott Arko<br>Alaska Satellite Facility Deputy Director<div>University of Alaska Fairbanks<br><br>903 Koyukuk Drive<br>Fairbanks, AK 99775<br>Phone: (907) 474 - 5570<br>
email: <a href="mailto:saarko@alaska.edu" target="_blank">saarko@alaska.edu</a><br><a href="http://www.asf.alaska.edu/aadn" target="_blank">http://www.asf.alaska.edu/aadn</a></div><br>
</div>