[GRASSLIST:2093] Re: GRASS and r.reclass in a batch errors

Glynn Clements glynn.clements at virgin.net
Thu Dec 18 16:22:49 EST 2003


javier garcia - CEBAS wrote:

> I'm sorry, Hamish. This still does an error. I even have commented nearly 
> everything to find out the source of the error. But even doing it for a 
> single map  gives an error:
> ----------------------------
> #!/bin/bash
> # \240reclass script
> # i=1
> # while [ $i -le 25 ] ; do
> r.reclass input=imagen1end output=imarec1end << EOF
> \240 \240 \240 \240253 = 192
> \240 \240 \240 \240252 = 96
> \240 \240 \240 \240251 = 48
> \240 \240 \240 \240250 = 24
> \240 \240 \240 \240249 = 12
> \240 \240 \240 \240221 = 8
> \240 \240 \240 \240193 = 7
> \240 \240 \240 \240165 = 6
> \240 \240 \240 \240133 = 4
> \240 \240 \240 \240102 = 3
> \240 \240 \240 \24070 = 2
> \240 \240 \240 \24039 = 1
> \240 \240 \240 \240* = NULL
> \240 \240 \240 \240end
> EOF

The problem is that you have non-breaking space characters (octal 240,
decimal 160) in the script, which r.reclass won't understand. These
characters are shown as \240 above.

Those characters probably look like spaces in a text editor, but won't
be treated as such by many programs (including r.reclass). You need to
change them to spaces or remove them.

-- 
Glynn Clements <glynn.clements at virgin.net>




More information about the grass-user mailing list