<html>
<head>
<style>
.hmmessage P
{
margin:0px;
padding:0px
}
body.hmmessage
{
FONT-SIZE: 10pt;
FONT-FAMILY:Tahoma
}
</style>
</head>
<body class='hmmessage'>
Hamish,<br>
<br>
Here are the outputs:<br>
1. GRASS 6.3.0 (Romania):~ > r.univar -ge RGB321.3@marius perc=98<br>
n=68587026<br>
null_cells=3781910<br>
min=58<br>
max=255<br>
range=197<br>
mean=181.261<br>
mean_of_abs=181.261<br>
stddev=36.808<br>
variance=1354.83<br>
coeff_var=20.3067<br>
sum=12432135110<br>
Segmentation fault<br>
<br>
2. GRASS 6.3.0 (Romania):~ > g.region -p<br>
projection: 99 (sterea)<br>
zone: 0<br>
datum: ** unknown (default: WGS84) **<br>
ellipsoid: a=6378245 es=0.006693421622965943<br>
north: 773383.051<br>
south: 194663.051<br>
west: 103791.364<br>
east: 904111.364<br>
nsres: 80<br>
ewres: 80<br>
rows: 7234<br>
cols: 10004<br>
cells: 72368936<br>
<br>
3. After setting DEBUG=1<br>
GRASS 6.3.0 (Romania):~ > i.landsat.rgb red=RGB321.3@marius
green=RGB321.2@marius blue=RGB321.1@marius<br>
Processing <RGB321.3@marius> ...<br>
Segmentation fault<br>
D1/1: <RGB321.3@marius>: min=108 max=<br>
ERROR: bad rule (syntax error): white<br>
Processing <RGB321.2@marius> ...<br>
Segmentation fault<br>
D1/1: <RGB321.2@marius>: min=129 max=<br>
ERROR: bad rule (syntax error): white<br>
Processing <RGB321.1@marius> ...<br>
Segmentation fault<br>
D1/1: <RGB321.1@marius>: min=137 max=<br>
ERROR: bad rule (syntax error): white<br>
<br>
I am not sure why it says "datum: unknown," it's the "Dealul Piscului
1970" datum (using the EPSG 31700). I don't think it's related to the
error though.<br>
Thanks for looking into it.<br>
<br>
Marius<br>
<br>
Hamish wrote:
<blockquote cite="mid:699843.72293.qm@web45812.mail.sp1.yahoo.com"
type="cite">
<pre wrap="">Marius Jigmond wrote:
</pre>
<blockquote type="cite">
<pre wrap="">Have you run into this kind of errors:
</pre>
</blockquote>
<pre wrap=""><!---->
Nope.
</pre>
<blockquote type="cite">
<pre wrap="">GRASS 6.3.0 (Romania):~> i.landsat.rgb
red=RGB321.3@marius green=RGB321.2@marius blue=RGB321.1@marius
Processing ...
Segmentation fault
ERROR: bad rule (syntax error): white
Processing ...
Segmentation fault
ERROR: bad rule (syntax error): white
Processing ...
Segmentation fault
ERROR: bad rule (syntax error): white
It's a three band Landsat mosaic. I am running Ubuntu
8.04 with GRASS 6.3 from Jachym Cepicky's repo
(<a class="moz-txt-link-freetext" href="http://les-ejk.cz/ubuntu/">http://les-ejk.cz/ubuntu/</a>). I am not
really sure where to start poking.
</pre>
</blockquote>
<pre wrap=""><!---->
It would seem that r.univar is failing in this part of the i.landsat.rgb script:
for i in $RED $GREEN $BLUE ; do
g.message "Processing <$i> ..."
MIN=`r.univar -ge $i perc=2 | grep "^percentile_" | cut -d'=' -f2`
MAX=`r.univar -ge $i perc=$BRIGHTNESS | grep "^percentile_" | cut -d'=' -f2`
g.message -d message="<$i>: min=$MIN max=$MAX"
r.colors $i col=rules << EOF
0% black
$MIN black
$MAX white
100% white
EOF
done
so $MAX would be unset, and r.colors gets a color without a value, which is a bad rule.
???
can you try "r.univar -ge RGB321.3@marius perc=98" on the command line and see what happens?
also, what does "g.region -p" look like?
and finally can you rerun i.landsat.rgb with debug messages turned on?
g.gisenv set="DEBUG=1" # to turn them back off set to 0
then the g.message info will be displayed.
but why does r.colors not complain about "$MIN black" too?
Hamish
</pre>
</blockquote>
<br>
<br /><hr />Make every e-mail and IM count. <a href='http://im.live.com/Messenger/IM/Join/Default.aspx?source=EML_WL_ MakeCount' target='_new'>Join the i’m Initiative from Microsoft.</a></body>
</html>