[GRASS-user] Exporting RGB Composite Images to GeoTIFF
Markus Neteler
neteler at osgeo.org
Mon Aug 1 05:45:56 PDT 2016
Hi Michele,
On Fri, Jul 29, 2016 at 6:05 PM, Michele Toma
<michele.toma at airborne.aero> wrote:
> Hi Moritz/everyone,
>
> I really appreciate all of the information.
>
> The original issue was exporting an RGB composite image from GRASS to a GeoTIFF format that could be opened in Global Mapper. I had created a pansharpened RGB image and attempted to export the image, but the settings I used created entirely black images.
It is important to understand if there was really no data or simply a
wrong color table applied.
> When I exported using r.out.gdal with no create options, the resulting image would not open in Global Mapper. I then tried to export without the color table which gave me a grayscale image. So, my understanding was that the data type was wrong.
Unfortunately - in addition - GeoTIFF cannot represent all data types.
> The errors I got when trying to export as Byte said to try using Float64
You could round the values after having multiplied them by 10 or 100.
I agree, too many possibilities existing...
>. But after trying to use that data type and all other data types in the drop down list, I ended up with a black image. In addition to changing the data type, I opted to skip exporting the color table according to the directions on the r.out.gdal documentation page. What options should I be selecting to export the image? Is there a simpler method to exporting the image that I am not aware of?
Maybe other users have a suggestion here.
> When trying to export in QGIS, I use GRASS tools to open the rbg composite raster and then right click on the layer -> Save As... The options that I use are "export as a rendered image" and in create options: "No compression". This seems to work for me.
Fine.
> However, I have run into another issue where I cannot get rid of the black borders/null data that surround the image. The borders are removed in GRASS after running r.null on the rgb composite image. They reappear when opening in QGIS using GRASS tools. (Note: I am using QGIS 2.8.2).
For this here a method, it uses r.clump:
http://courses.neteler.org/selective-data-removal-elevation-map-floodfilling/
(in my example for elevation models but it works the same for imagery).
Markus
More information about the grass-user
mailing list