Swapnil,<br><br>You missed the --format option with gdal_calc. If you don&#39;t mention it, it assumes the default format, GeoTiff.<br><br>Since the operation is simple, you should be able to do that using gdal_translate using the -scale option. It also has the -projwin option to select the extents.<br>
<br><div class="gmail_quote">On Fri, May 11, 2012 at 9:59 AM, Swapnil Chaudhari <span dir="ltr">&lt;<a href="mailto:swapsslan@gmail.com" target="_blank">swapsslan@gmail.com</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
Dear All,<br>
<br>
I would like to get your advise on running gdal_calc using shell.<br>
I am finding it difficult, mostly because the command requires you to<br>
define what  -A stands for etc. which is quite different from<br>
gdal_translate or such similar tools, so is the case with Raster<br>
package in R.<br>
<br>
I wish to scale all the temperature ascii grids that I have for quite<br>
a few number of folders.<br>
<br>
I wrote following sh file<br>
<br>
for f in *.tif<br>
do<br>
  echo &quot;Processing $f&quot;<br>
  gdal_calc -A $f --outfile=$f_scaled.asc --calc=A/10<br>
done<br>
<br>
<br>
However, I am making a mistake somewhere, it does not read above<br>
script as a command. I wish to divide all the rasters with 10 and also<br>
equally wish to make all output files extent as &quot;-projwin -180.0 90.0<br>
180.0 -60.0&quot; and column 720 with rows 300<br>
<br>
I would be really thankful if you can give some suggestion on this.<br>
<br>
Thanks a ton.<br>
<br>
Swapnil Chaudhari<br>
<br>
  o__<br>
 _&gt; /__<br>
(_) \(_)....... live healthy<br>
_______________________________________________<br>
gdal-dev mailing list<br>
<a href="mailto:gdal-dev@lists.osgeo.org">gdal-dev@lists.osgeo.org</a><br>
<a href="http://lists.osgeo.org/mailman/listinfo/gdal-dev" target="_blank">http://lists.osgeo.org/mailman/listinfo/gdal-dev</a><br>
</blockquote></div><br clear="all"><br>-- <br>Best regards,<br>Chaitanya kumar CH.<br><br>+91-9494447584<br>17.2416N 80.1426E<br>