[GRASS-user] Exporting RGB Composite Images to GeoTIFF
Michele Toma
michele.toma at airborne.aero
Wed Jul 20 17:53:03 PDT 2016
Hi everyone (again),
I am having trouble exporting a composite RGB image into a GeoTIFF format that I can open in Global Mapper, Photoshop, or other programs. This is using Landsat 8 imagery. I am able to open the composite image in QGIS, but not in Global Mapper or Photoshop.
Below is a list of steps that I took to get the image. I am unsure of what settings to use when using r.out.gdal to export my image so that it works in other programs. I am using GRASS 7.0.4.
1. Import Landsat 8 imagery
2. Convert the DN to reflectance/radiance
a. i.landsat.toar input=LC81100362016082LGN00_B output=LC81100362016082LGN00_refl metfile=LC81100362016082LGN00_MTL.txt
3. Perform pansharpening with i.fusion.brovey addon
a. i.fusion.brovey -l ms1=LC81100362016082LGN00_refl2 at Osaka ms2=LC81100362016082LGN00_refl3 at Osaka ms3=LC81100362016082LGN00_refl4 at Osaka pan=LC81100362016082LGN00_refl8 at Osaka output_prefix=brovey
4. Apply histogram equalization using r.colors
a. r.colors -e map=brovey.red at Osaka color=grey
b. r.colors -e map=brovey.green at Osaka color=gre
c. r.colors -e map=brovey.blue at Osaka color=grey
5. Color balance using i.colors.enhance
a. i.colors.enhance red=brovey.red at Osaka green=brovey.green at Osaka blue=brovey.blue at Osaka
6. Create composite RGB. I've run the two commands below and both do not produce what I need:
a. r.out.gdal input=brovey.rgb at Osaka output=brovey.rgb.tif format=GTiff
Another method that I have tried using an example on the r.out.gdal documentation page:
i.group group=brovey_group input=brovey.red,brovey.green,brovey.blue
g.region rast=brovey.blue -p
r.out.gdal in=brovey_group output=brovey_group.tif type=Float64 \
createopt="PROFILE=GeoTIFF,INTERLEAVE=PIXEL,TFW=YES"
The result is an image with distorted colors when opened in QGIS. Water has turned a reddish brown color.
Below is the info from r.info for the RGB composite and the red brovey band. What other parameters should I be using when running r.out.gdal to create a GeoTIFF to use in other programs?
r.info map=brovey.rgb
+----------------------------------------------------------------------------+
| Map: brovey.rgb Date: Wed Jul 20 15:09:58 2016 |
| Mapset: Osaka Login of Creator: Michele |
| Location: utm53n |
| DataBase: C:\Users\Michele\Documents\grassdata |
| Title: ( brovey.rgb ) |
| Timestamp: none |
|----------------------------------------------------------------------------|
| |
| Type of Map: raster Number of Categories: 0 |
| Data Type: CELL |
| Rows: 15682 |
| Columns: 15382 |
| Total Cells: 241220524 |
| Projection: UTM (zone 53) |
| N: 3947115 S: 3711885 Res: 15 |
| E: 621915 W: 391185 Res: 15 |
| Range of data: min = 0 max = 32767 |
| |
| Data Description: |
| generated by r.composite |
| |
| Comments: |
| r.composite red="brovey.red at Osaka" green="brovey.green at Osaka" blue="\ |
| brovey.blue at Osaka" levels=32 output="brovey.rgb" |
| |
+----------------------------------------------------------------------------+
r.info map=brovey.red
+----------------------------------------------------------------------------+
| Map: brovey.red Date: Wed Jul 20 11:08:02 2016 |
| Mapset: Osaka Login of Creator: Michele |
| Location: utm53n |
| DataBase: C:\Users\Michele\Documents\grassdata |
| Title: ( brovey.red ) |
| Timestamp: none |
|----------------------------------------------------------------------------|
| |
| Type of Map: raster Number of Categories: 0 |
| Data Type: DCELL |
| Rows: 15682 |
| Columns: 15382 |
| Total Cells: 241220524 |
| Projection: UTM (zone 53) |
| N: 3947115 S: 3711885 Res: 15 |
| E: 621915 W: 391185 Res: 15 |
| Range of data: min = -0.0133126998922819 max = 0.730339144087813 |
| |
| Data Description: |
| generated by r.mapcalc |
| |
| Comments: |
| LC81100362016082LGN00_refl4 at Osaka * k |
| i.fusion.brovey.py "-l" "ms1=LC81100362016082LGN00_refl2 at Osaka" "ms2=LC |
| 81100362016082LGN00_refl3 at Osaka" "ms3=LC81100362016082LGN00_refl4 at Osaka |
| " "pan=LC81100362016082LGN00_refl8 at Osaka" "output_prefix=brovey" |
| i.colors.enhance.py "red=brovey.red at Osaka" "green=brovey.green at Osaka" " |
| blue=brovey.blue at Osaka" |
| |
+----------------------------------------------------------------------------+
Thank you,
Michele Toma
michele.toma at airborne.aero<mailto:michele.toma at airborne.aero>
www.airborne.aero
[New Small2]
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/grass-user/attachments/20160721/debf36ee/attachment-0001.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: image001.jpg
Type: image/jpeg
Size: 2598 bytes
Desc: image001.jpg
URL: <http://lists.osgeo.org/pipermail/grass-user/attachments/20160721/debf36ee/attachment-0001.jpg>
More information about the grass-user
mailing list