[GRASS-user] Landsat image tiffs
Zenon Panoussis
oracle at provocation.net
Fri Aug 18 18:06:53 EDT 2006
This falls in the cracks between grass, gdal and mapserver. I'm
posting it here on the assumption that this is the place where
someone most likely might have run into the same problem and
solved it.
I did the following ($view is a landsat set, in this case 007068):
# Import RGB & pan
for band in 10 20 30 80
do
file=`ls -1 $satbase/$view |grep nn$band`
r.in.gdal input=$satbase/$view/$file output=$view\_$band
done
# Sharpen
i.fusion.brovey -l ms1=$view\_10 ms2=$view\_20 ms3=$view\_30 \
pan=$view\_80 outputprefix=$view
# Beautify
i.landsat.rgb red=$view.red green=$view.green blue=$view.blue
# Join
r.composite red=$view.red green=$view.green blue=$view.blue \
output=$view_15me
# Check
d.mon start=x0
d.rast $view\_15me
# yes, it looks good
# Export
r.out.gdal input=$view\_15me format=GTiff output=$view\_15meB.tif \
type=Byte createopt="TFW=YES,TILED=YES"
r.out.gdal input=$view\_15me format=GTiff output=$view\_15meUI.tif \
type=UInt16 createopt="TFW=YES,TILED=YES"
r.out.tiff -t -l -v input=$view\_15me output=$view\_15meROT.tif
Both r.out.gdal commands cause
http://grass.itc.it/pipermail/grassuser/2006-August/035750.html
but continue and produce the tiffs. r.out.tiff does not issue the
same warning.
My mapfile says
LAYER
NAME "landsat"
TYPE RASTER
STATUS DEFAULT
DATA "007068_15me[suffix].tif"
OFFSITE 0 0 0
END
Using any one of the three tiffs, I get
shp2img -m world.map -o /dev/null -layer_debug landsat 10
[Fri Aug 18 16:21:39 2006].381669 msDrawRasterLayerLow(landsat): entering.
That's it. mapserver is happy, debug shows no errors, there's only
one little problem: the image doesn't show on the map. It's simply
not there. mapserver reads it fine, but looks at the wrong band.
Or it doesn't know where to find the colour table. Or ignores the
tiff's colour table and, since it doesn't have one of its own, throws
away the data. Removing OFFSITE from the mapfile makes no difference.
I strongly suspect I'm exporting the raster in the wrong type tiff,
but it will take me a week to test them all and there could be an
error elsewhere too.
Can anyone see what I'm doing wrong?
Z
More information about the grass-user
mailing list