please help me solving a problem concerning r.mapcalc:
my intention is to calculate a new map consisting of two older ones. the one
shows digitized elements( rocks), cat values are NULL or 1,
the other is a reclassified map(slope >50), with cat values 1 or NULL.
so i have 4 options:
pixels, with only digitized elements, pixels with only slope elements, pixels with both and pixels without(NULL)
the resulting map sould consist of these 4 categories.
i already tried r.patch, but with no success, there was only one resulting category and NULL values.
means:
where both maps are NULL, result will be NULL
where map2 is not null, result will be 1
where map1 is not null, result will be 2
where both maps are not NULL, result will be 3
j
2007/2/9, Thomas Drüssler <Sommes@web.de>:
Hello everybody
please help me solving a problem concerning r.mapcalc:
my intention is to calculate a new map consisting of two older ones. the one
shows digitized elements( rocks), cat values are NULL or 1,
the other is a reclassified map(slope >50), with cat values 1 or NULL.
so i have 4 options:
pixels, with only digitized elements, pixels with only slope elements, pixels with both and pixels without(NULL)
the resulting map sould consist of these 4 categories.
i already tried r.patch, but with no success, there was only one resulting category and NULL values.
Thomas Drüssler <Sommes@web.de>, [20070209 - 15:52:53]
Hello everybody
please help me solving a problem concerning r.mapcalc:
my intention is to calculate a new map consisting of two older ones.
the one shows digitized elements( rocks), cat values are NULL or 1,
the other is a reclassified map(slope >50), with cat values 1 or
NULL. so i have 4 options:
pixels, with only digitized elements, pixels with only slope
elements, pixels with both and pixels without(NULL) the resulting map
sould consist of these 4 categories. i already tried r.patch, but
with no success, there was only one resulting category and NULL
values.
what about
r.mapcalc "newmap = map1 + map2"
Best
Stephan
--
Stephan Holl <stephan.holl@intevation.de>, http://intevation.de/~stephan
Tel: +49 (0)541-33 50 8 32 | Intevation GmbH | AG Osnabrück - HR B 18998
Geschäftsführer: Frank Koormann, Bernhard Reiter, Dr. Jan-Oliver Wagner
please help me solving a problem concerning r.mapcalc:
my intention is to calculate a new map consisting of two older ones. the one
shows digitized elements( rocks), cat values are NULL or 1,
the other is a reclassified map(slope >50), with cat values 1 or NULL.
so i have 4 options:
pixels, with only digitized elements, pixels with only slope elements, pixels with both and pixels without(NULL)
the resulting map sould consist of these 4 categories.
i already tried r.patch, but with no success, there was only one resulting category and NULL values.
In general, it's easier to work with 0/1 for "boolean" maps rather
than null/1.
In GRASS, a null value means "no data" or "unknown". IOW, null *isn't*
interpreted as a specific category or value, but as a "marker" for an
unknown value.
E.g. in your second example map, if a value of 1 means that slope>50,
then the "natural" interpretation of a null value is that it is
unknown whether or not slope>50, *not* that slope<=50.
please help me solving a problem concerning r.mapcalc:
my intention is to calculate a new map consisting of two older ones.
the one shows digitized elements( rocks), cat values are NULL or 1,
the other is a reclassified map(slope >50), with cat values 1 or NULL.
so i have 4 options:
pixels, with only digitized elements, pixels with only slope elements,
pixels with both and pixels without(NULL) the resulting map sould
consist of these 4 categories. i already tried r.patch, but with no
success, there was only one resulting category and NULL values.
To the others' explainations I'll add that it is often nice to use
r.support to give your new categories a label / meaning. Then when you
create a legend you don't need to figure out what you meant by "cat 3".