Hi,
I'm try-ing to export a raster RGB using this command:
r.out.gdal -c input=input_image@PERMANENT
output=/path-to-raster//output_image.tif format="GTiff" type="Byte"
createopt="INTERLEAVE=PIXEL,TFW=YES,PROFILE=BASELINE,COMPRESS=DEFLATE"
It produce successfully a tiff ,
but it is a
paletted tiff.
Instead I like to have a true-color RGB tiff.
I miss some parameter ?
Thx,
--
-----------------
Andrea Peri
. . . . . . . . .
qwerty àèìòù
-----------------
Hi,
On Jul 2, 2015 11:58 AM, “Andrea Peri” <aperi2007@gmail.com> wrote:
Hi,
I’m try-ing to export a raster RGB using this command:
If you have the three RGB channels, you can export via a group:
http://grass.osgeo.org/grass70/manuals/r.out.gdal.html#export-r,g,b-imagery-bands-in-geotiff-format-suitable-for-esri-software:
Best
Markus
Hi Markus,
thx for hint.
I tried but probably I miss something.
because have an error:
ERROR 6: SetColorTable() not supported for multi-sample TIFF
files.
....
ERROR 6: SetColorTable() can only be called on band 1.
ERROR 6: SetColorTable() can only be called on band 1.
I defined a group named "gruppo" and insert in it the three raster I
like to have for the three bands.
After I execute this command:
r.out.gdal -f --overwrite input=gruppo
output=D:\temp\hpf_out_rescale2.tif format=GTiff type=Byte
createopt=INTERLEAVE=PIXEL,TFW=YES,PROFILE=BASELINE,COMPRESS=DEFLATE
This is the results log:
WARNING: Perdita di precisione: mappa raster
<LC81920292015157LGN00_reflect2.hpf> di tipo DCELL da esportare come
Byte. Può essere evitata usando Float64.
WARNING: Perdita di precisione: mappa raster
<LC81920292015157LGN00_reflect3.hpf> di tipo DCELL da esportare come
Byte. Può essere evitata usando Float64.
WARNING: Perdita di precisione: mappa raster
<LC81920292015157LGN00_reflect4.hpf> di tipo DCELL da esportare come
Byte. Può essere evitata usando Float64.
WARNING: Si sta forzando l'esportazione del raster.
Checking GDAL data type and nodata value...
Using GDAL data type <Byte>
La mappa raster di input contiene celle con valore NULL (nessun dato).
Il valore 255 verrà usato per rappresentare i valori delle celle senza
dati nella mappa di input. È possibile specificare un valore per le
celle senza dati con l'opzione nodata.
Using GDAL data type <Byte>
La mappa raster di input contiene celle con valore NULL (nessun dato).
Il valore 255 verrà usato per rappresentare i valori delle celle senza
dati nella mappa di input. È possibile specificare un valore per le
celle senza dati con l'opzione nodata.
ERROR 6: SetColorTable() not supported for multi-sample TIFF
files.
Using GDAL data type <Byte>
La mappa raster di input contiene celle con valore NULL (nessun dato).
Il valore 255 verrà usato per rappresentare i valori delle celle senza
dati nella mappa di input. È possibile specificare un valore per le
celle senza dati con l'opzione nodata.
Exporting raster data to GTiff format...
ERROR 6: SetColorTable() can only be called on band 1.
ERROR 6: SetColorTable() can only be called on band 1.
r.out.gdal completo. File <D:\temp\hpf_out_rescale2.tif> created.
Thx,
A.
2015-07-02 12:56 GMT+02:00 Markus Neteler <neteler@osgeo.org>:
Hi,
On Jul 2, 2015 11:58 AM, "Andrea Peri" <aperi2007@gmail.com> wrote:
Hi,
I'm try-ing to export a raster RGB using this command:
If you have the three RGB channels, you can export via a group:
http://grass.osgeo.org/grass70/manuals/r.out.gdal.html#export-r,g,b-imagery-bands-in-geotiff-format-suitable-for-esri-software:
Best
Markus
--
-----------------
Andrea Peri
. . . . . . . . .
qwerty àèìòù
-----------------
On 02/07/15 16:23, Andrea Peri wrote:
Hi Markus,
thx for hint.
I tried but probably I miss something.
because have an error:
ERROR 6: SetColorTable() not supported for multi-sample TIFF
files.
....
ERROR 6: SetColorTable() can only be called on band 1.
I defined a group named "gruppo" and insert in it the three raster I
like to have for the three bands.
After I execute this command:
r.out.gdal -f --overwrite input=gruppo
output=D:\temp\hpf_out_rescale2.tif format=GTiff type=Byte
createopt=INTERLEAVE=PIXEL,TFW=YES,PROFILE=BASELINE,COMPRESS=DEFLATE
This is the results log:
>
[...]
r.out.gdal completo. File <D:\temp\hpf_out_rescale2.tif> created.
And the created file is not what you wanted ?
Moritz
No, it was not what I expected .
I expected to see the same image I see in the grass display (using d.rgb)
Instead I see someone completelly different.
thx.
A.
2015-07-03 13:19 GMT+02:00 Moritz Lennert <mlennert@club.worldonline.be>:
On 02/07/15 16:23, Andrea Peri wrote:
Hi Markus,
thx for hint.
I tried but probably I miss something.
because have an error:
ERROR 6: SetColorTable() not supported for multi-sample TIFF
files.
....
ERROR 6: SetColorTable() can only be called on band 1.
ERROR 6: SetColorTable() can only be called on band 1.
I defined a group named "gruppo" and insert in it the three raster I
like to have for the three bands.
After I execute this command:
r.out.gdal -f --overwrite input=gruppo
output=D:\temp\hpf_out_rescale2.tif format=GTiff type=Byte
createopt=INTERLEAVE=PIXEL,TFW=YES,PROFILE=BASELINE,COMPRESS=DEFLATE
This is the results log:
[...]
r.out.gdal completo. File <D:\temp\hpf_out_rescale2.tif> created.
And the created file is not what you wanted ?
Moritz
--
-----------------
Andrea Peri
. . . . . . . . .
qwerty àèìòù
-----------------
On Fri, 3 Jul 2015 14:06:58 +0200, Andrea Peri <aperi2007@gmail.com>
wrote:
No, it was not what I expected .
I expected to see the same image I see in the grass display (using
d.rgb)
Instead I see someone completelly different.
That is expected, and also depends on the program you use to visualise the
data.
Color is arbitrary for raster data. Not all formats actually allow
transport of color info, and not all programs can read the color info
provided in a given format.
The question for you is: do you just want to export a georeferenced image
with a specific color choice, or do you export the actual data which is
independent of the colors (In any decent program you can define which color
to assign to which value) ?
If you want to export the data and the colors you created in GRASS GIS,
your best bet would probably to export to any format using r.out.gdal and
to export colors with r.colors.out.
Or you can create an image with the colors you want using r.composite and
then export just that. You would still need a program that can read the
color table in the output format, or use r.colors.out.
Moritz