[GRASS-user] R.fuzzy.system bug/limitation or just me ?

Marcello Gorini gorini at gmail.com
Tue Jul 5 10:52:14 EDT 2011


Dear all,

I am using r.fuzzy.system for quite a while now, but still have a persisting
bug/problem that I can't solve. Hopefully it is just me doing something
wrong.

A use a GRASS/Shell script to automatically parse the input .map file (that
contains all the fuzzy sets definitions) and update it with values based on
some input raster's statistics. The problem is that I get errors depending
on these values, but they don't make sense to me.

A "wrong" fuzzy set definition and the corresponding error is as follows:

Fussy set (*wrong*):
	%Xmargin_crosc_3
$ concave {right; -0.014310,-0.009618; linear; 0; 1}
$ planar {both; *-0.014310,-0.009618,0.010177,0.015142*; linear; 0; 1}
$ convex {left; 0.010177,0.015142; linear; 0; 1}

Error:
*ERRO:Map: <Xmargin_crosc_3>, Membership: <planar>: Points sequence must be
     non-declining*

If I am not mistaken, the sequence [-0.014310,-0.009618,0.010177,0.015142]
is non-declining, is it not?

Now, if I take one decimal place out, it works nicely.

Fussy set (*OK*):
	%Xmargin_crosc_3
$ concave {right; -0.01431,-0.00962; linear; 0; 1}
$ planar {both; *-0.01431,-0.00962,0.01018,0.01514*; linear; 0; 1}
$ convex {left; 0.01018,0.01514; linear; 0; 1}

But it is not a question of decimal places, I believe, because if I keep the
original 6 decimal places, but multiply the original input data by 100, it
also works nicely.

Fussy set (*OK*):
	%Xmargin_crosc_3
$ concave {right; -1.431014,-0.961829; linear; 0; 1}
$ planar {both; *-1.431014,-0.961829,1.017739,1.514197*; linear; 0; 1}
$ convex {left; 1.017739,1.514197; linear; 0; 1}

But even more confusing is when I allow 9 decimal places in the fuzzy set
definition. Then I get a very strange error:

Fussy set (*wrong*):
	%Xmargin_crosc_3
$ concave {right; -0.014310295,-0.009618395; linear; 0; 1}
$ planar {both; *-0.014310295,-0.009618395,0.010177389,0.015141969*; linear;
0; 1}
$ convex {left; 0.010177389,0.015141969; linear; 0; 1}

Error:
*ERRO:Map: <Xmargin_crosc_3>, Variable: <planar>: Points must be numeric but
     is: or space between '-' and digit*

So I am really stuck here. I am very sorry for this boring post and problem,
but it is very important for me to get it solved. Eventually, I would like
my complete work to become a GRASS Add-on (if there will be interest from
the GRASS community), but I don't want to put some ugly workaround in the
code (as it is right now).

Thanks a lot for any help (or even just for reading this long post).

Marcello.

--
View this message in context: http://osgeo-org.1803224.n2.nabble.com/R-fuzzy-system-bug-limitation-or-just-me-tp6550095p6550095.html
Sent from the Grass - Users mailing list archive at Nabble.com.


More information about the grass-user mailing list