Problem using mapcalc?

Philip Warner pjw at rhyme.com.au
Mon Feb 21 01:43:18 EST 2000


I've now had a look at r.mapcalc and don't seem to be able to get it to
work. I've also tried an alternate solution, which does not seem to work
either.

Using spearfish, I have:

v.to.rast input=roads output=rwrk
r.mapcalc 
comb=if(rwrk,rwrk+10,geology)

The result of this is:

CREATING SUPPORT FILES FOR comb
range: 11 15

Which is strange. It only shows the roads. No matter what I do with the
combination (eg. geology+rwrk), I always get 'no data' in the locations
where the road data is absent.

Have I misunderstood something here?

Yours in confusion,

Philip Warner



At 22:58 20/02/00 -0600, rado wrote:
>Hello Philip,
>You can transform your vector layer into the raster one. After that
>you should use r.reclass to assign some big values to your new
>raster layer. Then you can use r.mapcalc to produce another raster layer
>(geology + roads; use "+" operator). 
>Using r.reclass you can easily assign new values for "roads" to
>distinguish them from geology areas. Result is a new raster map you can
>overlay over your DEM. Since 3D tools in GRASS don't provide extensive
>query options, this hybrid raster should gives you what you expect. 
>If you want to assign proper road width, use r.buffer, before combining
>the geology and roads in r.mapcalc
..etc...
>Regards,
>
>	-Rado Bonk 
>
>On Mon, 21 Feb 2000, Philip Warner wrote:
>
>> What I want to do is combine the raster and vector (geology and roads),
>> then put the resulting map over the DEM to get a combined 3d view.
>> 

----------------------------------------------------------------
Philip Warner                    |     __---_____
Albatross Consulting Pty. Ltd.   |----/       -  \
(A.C.N. 008 659 498)             |          /(@)   ______---_
Tel: +61-03-5367 7422            |                 _________  \
Fax: +61-03-5367 7430            |                 ___________ |
Http://www.rhyme.com.au          |                /           \|
                                 |    --________--
PGP key available upon request,  |  /
and from pgp5.ai.mit.edu:11371   |/



More information about the grass-user mailing list