<HTML>
<HEAD>
<TITLE>Slicing tif files</TITLE>
</HEAD>
<BODY>
<FONT FACE="Verdana, Helvetica, Arial"><SPAN DEFANGED_STYLE='font-size:12.0px'>Dear list,<BR>
<BR>
I’m trying to read in a greyscale georefrenced TIF file. I have successfully read in georeferenced color TIF files and sliced them into smaller sections, but I am having a great deal of trouble with this greyscale image.<BR>
<BR>
First off I realized after playing with it that the greyscale required using d.rast while the color needed d.rgb.. So far ok..<BR>
<BR>
The color file was in lat/long so I read it into a lat/long location. The greyscale seems to be UTM, so I tried both UTM and XY locations. Both work for reading in and doing a d.rast and writing the file out as a PNG, but I can’t seem to slice the files up into smaller chunks. <BR>
<BR>
When I first read in the file, I call :<BR>
r.in.gdal –o –e input=/Volumes/Recent/SB/p663east.tif output=temp<BR>
<BR>
g.region –p gives me : <BR>
GRASS 6.0.0 (LocationText):~ > g.region -p<BR>
projection: 0 (x,y)<BR>
zone: 0<BR>
north: 3821818.5<BR>
south: 3806127.5<BR>
west: 251135.5<BR>
east: 276337.5<BR>
nsres: 1<BR>
ewres: 1<BR>
rows: 15691<BR>
cols: 25202<BR>
<BR>
d.mon start=PNG<BR>
d.rast –o map=temp<BR>
d.mon stop=PNG<BR>
<BR>
And I get a nice grainy map of my original tif file<BR>
<BR>
Then I try <BR>
g.region n=3815204.19 s=3812771.11 w=235544.84 e=238598.83<BR>
<BR>
GRASS 6.0.0 (LocationText):~ > g.region -p<BR>
projection: 0 (x,y)<BR>
zone: 0<BR>
north: 3815204.19<BR>
south: 3812771.11<BR>
west: 235544.84<BR>
east: 238598.83<BR>
nsres: 0.09999918<BR>
ewres: 0.09999967<BR>
rows: 24331<BR>
cols: 30540<BR>
<BR>
d.mon start=PNG<BR>
d.rast –o map=temp<BR>
d.mon stop=PNG<BR>
<BR>
<BR>
And now I get a nice black image for a PNG file...<BR>
<BR>
Same thing happens in the UTM location..<BR>
<BR>
I’m stumped.<BR>
<BR>
Thanks for your patience...<BR>
<BR>
- sharyn</SPAN></FONT>
</BODY>
</HTML>