[GRASS-user] map algebra during r.in.gdal?

Dear all

I would like to know if it is possible I make an map algebra
when importing a .IMG file. As I am working with native wingrass,
and the LFS (Large File System), almost to where I know, don´t
suport my large files (12GB), I would like to divide my 32Bits
image by 200, and generate and raster map on 16bits.
I know that if I divide my original IMG map by 200 on ERDAS
and import it on GRASS the size of resulting file works
find on my current system.

I am using

r.in.gdal format=HFA input=… output=…

and I would like something like

r.in.gdal format=HFA input=(…/200) output=…

In fact I would like to scape of using ERDAS do solve this out of GRASS.

Help are welcome.

Cheers, miltinho
brazil

Milton Cezar Ribeiro wrote:

I would like to know if it is possible I make an map algebra
when importing a .IMG file. As I am working with native wingrass,
and the LFS (Large File System), almost to where I know, don´t
suport my large files (12GB),

I don't know if the WinGRASS binaries were built with LFS support turned
on or not. Also memory requirements of r.in.gdal, most raster modules are very good with large maps, but a few are not.

I would like to divide my 32Bits
image by 200, and generate and raster map on 16bits.
I know that if I divide my original IMG map by 200 on ERDAS
and import it on GRASS the size of resulting file works
find on my current system.

perhaps use gdal_translate to split it up into a series of smaller tiles, then import each individually-

The general way to make a 1280x1024 tile is like:
gdal_translate -srcwin $XOFFSET $YOFFSET 1280 1024 source.img out.tif

I have a script here which uses that, maybe could be adapted:
  http://hamish.bowman.googlepages.com/gpsdrivefiles#tiles

Hamish