[GRASS-user] v.to.rast, r.to.vect, "stable" transformation
JRadinger at gmx.at
Mon Feb 6 08:48:31 EST 2012
-------- Original-Nachricht --------
> Datum: Mon, 06 Feb 2012 13:31:10 +0100
> Von: Moritz Lennert <mlennert at club.worldonline.be>
> An: Johannes Radinger <JRadinger at gmx.at>
> CC: grass-user at lists.osgeo.org
> Betreff: Re: [GRASS-user] v.to.rast, r.to.vect, "stable" transformation
> On 06/02/12 12:46, Johannes Radinger wrote:
> > The r.thin process is an important step (as recommended also in the
> > manual) and should not be skipped at all!
> In general, I agree with you, but I'm not sure that v.to.rast +
> r.to.vect would profit of r.thin in the middle, since v.to.rast already
> should provide a thinned line. AFAIU r.thin is useful when you have
> raster lines produced by something else than v.to.rast.
I can only speak from what I've tested so far: I transformed a river vector (including meanders and confluences etc.) into a raster. And due to the bends in some cases the river is not a thinned line. Therefore r.thin is necessary in my case also for a v.to.raster- line.
> > Maybe I just see something wrong..anyway i thought about testing the
> > stability in a loop, but I got stucked in the correct map calc
> > operation. What is the correct (boolean) operator to get:
> > 1) NULL + NULL = NULL
> > 2) not NULL + not NULL = NULL
> > 3) not NULL + NULL = 1
> > 4) NULL + not NULL = 1
> How about (untested):
> if( (isnull(A) && isnull(B)) || (!isnull(A) && !isnull(B)), null(), 1)
Thank you I'll try that, I just thought that there might be a simple operator (as I am not that familiar with boolean operators).
NEU: FreePhone 3-fach-Flat mit kostenlosem Smartphone!
Jetzt informieren: http://www.gmx.net/de/go/freephone/
More information about the grass-user