[GRASS-user] exporting Grass rasters to multiband Geotiff?

Vishal Mehta vishalm1975 at gmail.com
Thu Nov 2 04:53:47 EST 2006


I actually did look at previous emails but could not get a definite answer,
and also did'nt follow the VRT discussion in earier emails.

Meanwhile actually, I'm having trouble with using r.out.gdal on even a
single image .
My original grass raster has integer values from -262 to 276, and the
r.infooutput says that its CELL format . So i assumed that the type is
Int16, and
used the following command:

r.out.gdal input=avgtemp1960.1 format=GTiff type=Int16
output=jan1960.tiffcreateopt="TFW=YES"

I then imported the output Geotiff into both IDRISI as well as GRASS(using
r.in.gdal)

In both cases, the values are completely different and go from 0 to 32767.

Int32 and Float32 options dont work either. Any ideas?

In my opinion, I find that in general, the documentation for this in Grass
as well as Gdal is inadequate. There should be one example for each type of
format..

And what is the difference between 'Tiles' and 'Bands'?

Finally, where can i figure out what Int16/32, Float32, Cint16, Cint32  -
what these things mean?


thanks,
vishal

On 11/2/06, Hamish <hamish_nospam at yahoo.com> wrote:
>
> Vishal Mehta wrote:
> > Hi all,
> >
> > I would like to know how i can export, say, 12 grass rasters (call
> > them map.1 to map.12) into a single GeoTiff file.
> > Looks like r.out.gdal allows only one band Geotiff?
> > What about gdal_translate? I used gdal_translate to import from Netcdf
> > to multi-band GeoTiff months ago, but am not sure how it works for
> > exporting from Grass to multi-band GeoTiff.
> >
> > maybe something like :
> > gdal_translate -ot Int16 -of GTiff -b 1 -b 2 ... -b 12  map.1
> > map.2...map.12 out.tiff
> > would the above work?
> >
> > if this cannot be done, i need to export into some other multi-band
> > format - would exporting to Erdas Imagine (.img) format work for
> > multi-band?
>
>
> this was disccussed earlier this year on the mailing lists, you might
> search for a solution there.
>
> From memory, using the gdal tools was the current "best" solution, I
> think you are very much on the right path.
>
>
> Hamish
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.osgeo.org/pipermail/grass-user/attachments/20061102/ada2ae87/attachment.html


More information about the grass-user mailing list