[GRASS5] export RGB channels in one ERDAS/IMG file
Markus Neteler
neteler at itc.it
Thu Sep 2 11:20:48 EDT 2004
On Thu, Sep 02, 2004 at 09:39:33AM -0400, Frank Warmerdam wrote:
> Markus Neteler wrote:
> >
> >Frank,
> >
> >this could be added easily. But I don't know how to tell 'gdal_translate'
> >about it.
> >The docs only mention single-file input:
> >http://www.remotesensing.org/gdal/gdal_utilities.html#gdal_translate
>
> Markus,
>
> gdal_translate doesn't support multiple input files. Holy cow! r.out.gdal
> is just a script! OK, that isn't news to you but it is to me. I will add
> writing a C r.out.gdal to my TODO list.
Hooray :-) Was hoping for that a long time (I tried myself a bit but failed).
> >>Given that it does not, it seems you might have to do this all rather
> >>indirectly. One approach is to output individual rasters and then
> >>composite
> >>them with an external application like OpenEV or within Imagine itself.
> >
> >
> >As I also need that functionality, I'll add it once I have understood
> >the gdal_translate procedure...
>
> In the meantime, I don't think it will be easy to do from within GRASS.
>
> BTW, before I forgot that gdal_merge.py can stack input files into seperate
> bands if given the -seperate switch. So for anyone with a GDAL build that
> includes python support you could export the various bands to standalone
> files and then merge them into an RGB composite with:
>
> gdal_merge.py -o out.img -of HFA -seperate band1.img band2.img band3.img
Thanks for the hint, I was't aware of that flag yet.
(so I could mess up my script a bit more)
Markus
More information about the grass-dev
mailing list