[GRASS-user] Landsat image tiffs
Dylan Beaudette
dylan.beaudette at gmail.com
Sat Aug 19 14:26:11 EDT 2006
On Friday 18 August 2006 15:55, Zenon Panoussis wrote:
> Dylan Beaudette wrote:
> >> That's it. mapserver is happy, debug shows no errors, there's only
> >> one little problem: the image doesn't show on the map...
> >
> > I have had some similar problems wrt. exporting landsat data from GRASS
> > -> mapsever. here is my approach:
> >
> > #export tiled landsat-shade tiles:
> > for x in `seq 2 1 49`; do g.region rast=ca_landsat_shade_$x; r.out.tiff
> > -t in=ca_landsat_shade_$x out=ca_landsat_shade_$x.tif; done
> >
> > # re-create geotiffs with gdal_translate (fix bug in tiffs created with
> > r.out.tiff)
> > for x in `ls *.tif`; do gdal_translate -a_srs '+proj=aea +x_0=0.0
> > +y_0=0.0 +lon_0=-96.0 +lat_0=40.0 +lat_1=20.0 +lat_2=60.0 +datum=NAD83'
> > $x ../new/$x ; done
>
> Hmm. You had to set the projection manually? And there's no -ot
> to gdal_translate, so it used Byte in and Byte out.
>
Yes. these were paleted images, with a relatively small number of colors.
> Looking at the output of my r.out.tif:
>
> gdalinfo 007068_15meROT.tif
> Driver: GTiff/GeoTIFF
> Size is 15535, 14461
> Coordinate System is `'
> Origin = (243347.250000,-1176408.750000)
> Pixel Size = (14.25000000,-14.25000000)
> Corner Coordinates:
> Upper Left ( 243347.250,-1176408.750)
> Lower Left ( 243347.250,-1382478.000)
> Upper Right ( 464721.000,-1176408.750)
> Lower Right ( 464721.000,-1382478.000)
> Center ( 354034.125,-1279443.375)
> Band 1 Block=128x128 Type=Byte, ColorInterp=Red
> Band 2 Block=128x128 Type=Byte, ColorInterp=Green
> Band 3 Block=128x128 Type=Byte, ColorInterp=Blue
>
> No projection. Then perhaps my suspicion that I'm using the wrong
> data type is wrong, it could be the missing projection that's causing
> mapserver to ignore the image.
Yes. output from r.out.tiff will not include projection information, but can
create a world file (the -t flag).
> > terse i know, but hopefully helpful.
>
> It is already :) I only need to figure the values of my -a_srs so
> I can test it. And mapserver output your ../new/$x without problems?
>
Yes. It all seems to work fine.
--
Dylan Beaudette
Soils and Biogeochemistry Graduate Group
University of California at Davis
530.754.7341
More information about the grass-user
mailing list