[GRASS-user] Retaining the raster name, while exporting a group to other formats

Nikos Alexandris nik at nikosalexandris.net
Sun Nov 13 13:31:19 PST 2016


Sajid,

maybe not useful (?): t.rast.export does that for registered maps.
Maybe fake a strds or check the code there-in?

Nikos


* Sajid Pareeth <spareeth at gmail.com> [2016-11-10 10:02:07 +0100]:

>Hi all
>
>I am exporting a group of rasters to single stacked GTiff and ENVI format
>files.
>
>Here is my group:
>i.group S2A_OPER_MSI_L1C_TL_MTI__20160810T122618_A005911_T30SWJ_10m -l
>group <S2A_OPER_MSI_L1C_TL_MTI__20160810T122618_A005911_T30SWJ_10m>
>references the following raster maps
>-------------
><S2A_OPER_MSI_L1C_TL_MTI__20160810T122618_A005911_T30SWJ_B02.jp2 at barrax>
><S2A_OPER_MSI_L1C_TL_MTI__20160810T122618_A005911_T30SWJ_B03.jp2 at barrax>
><S2A_OPER_MSI_L1C_TL_MTI__20160810T122618_A005911_T30SWJ_B04.jp2 at barrax>
><S2A_OPER_MSI_L1C_TL_MTI__20160810T122618_A005911_T30SWJ_B08.jp2 at barrax>
>-------------
>
>I use the following export command:
>r.out.gdal input=${BASE}_10m
>output="${MYDATA}/${FOLDER}Barrax/20m/${BASE}_10m" format=ENVI
>
>
>But the band names in the output ENVI or GTiff files are changed to "Band
>1", "Band 2", "Band 3", "Band 4".
>
>Is there any way to retain the original raster names for the individual
>bands in the final stacked image?
>
>
>Thanks in advance
>
>Regards
>
>Sajid

>_______________________________________________
>grass-user mailing list
>grass-user at lists.osgeo.org
>http://lists.osgeo.org/mailman/listinfo/grass-user


-- 
Nikos Alexandris | Remote Sensing & Geomatics
GPG Key Fingerprint 6F9D4506F3CA28380974D31A9053534B693C4FB3 


More information about the grass-user mailing list