[GRASSLIST:845] 2: UNSOLVABLE problem in GRASS!!?

Ramin Safa raminsafa at yahoo.com
Mon Jul 28 22:44:58 EDT 2003



Hi Massimilliano
Hi Paul

I did these:    1.*Massimiliano advice:
r.mask
MASK:  Program for managing current GIS mask

current mask:          <bound11r at Ramin> in mapset <Ramin>
masking category(ies): 1
inside=1,outsid=0    and then:
GRASS:~ > r.mapcalc
new="if(isnull(bound11r),slope11r%%,bound11r)"
parse error
Parse error
I've checked any thing,but i dont know why eror?


  2.*Paul advice:
 
GRASS:~ > g.copy rast=bound11r,MASK
COPY [bound11r at Ramin] to [MASK]
 raster
 header
 category
 color
 history
 misc
 fcell    MISSING
 g3dcell  MISSING
GRASS:~ > r.resample input=slope11r%% output=slopefin
percent complete:  100%
Creating support files for slopefin
creating new cats file...
GRASS:~ > g.remove MASK
REMOVE [MASK]
 raster
 header
 category
 color
 history
 misc
 fcell    MISSING
 g3dcell  MISSING
GRASS:~ > d.erase
GRASS:~ > d.rast slopefin
 100%
The Resault is nothing,blank??!

PLEASE if the ways are not correct ,tell me.
Regards  
Ramin

--- Paul Kelly <paul-grass at stjohnspoint.co.uk> wrote:
> 
> 
> On Mon, 28 Jul 2003, Massimiliano Cannata wrote:
> 
> > If it is, once you have your raster boundary map
> (suppose with
> > value=1 inside and value=0 outside) and your raster
> slope map you
> > should run r.mapcalc so to have NULL outside and slope
> inside.
> > (something like this but check the rigth formalism:
> > if
> > boudary = 0 final_map=NULL
> > else if
> > boundary=1 final_map=slope_map)
> 
> Using a MASK is the more conventional way:
> 
> g.copy rast=boundary,MASK
> r.resample input=slope_map output=final_map
> g.remove rast=MASK
> 
> Any cell that is zero or NULL in the MASK will be masked
> out during any
> subsequent raster operations while the MASK is in force.
> 
> I'm not sure if r.mapcalc totally copies all the parts of
> a raster; maybe
> it does now. r.resample is probably the more 'correct'
> command to use but
> as usual there are several ways of doing the same thing.
> 
> You can create masks using the r.mask command but I've
> always found it
> easier to create it some other way and then copy it to
> the raster map
> 'MASK' using g.copy and g.remove as shown above.
> 
MASK:  Program for managing current GIS mask

current mask:          <bound11r at Ramin> in mapset <Ramin>
masking category(ies): 1


=====

Ramin Safamanesh 
Department of  Environment Science , UPM
Email :  rsafamanesh at hotmail.com Tel  :  0060122399448  


__________________________________
Do you Yahoo!?
Yahoo! SiteBuilder - Free, easy-to-use web site design software
http://sitebuilder.yahoo.com




More information about the grass-user mailing list