[GRASSLIST:3483] Re: How to crop an area of intrest from large image

Eric G. Miller egm2 at jps.net
Wed Apr 10 10:39:01 EDT 2002


On Wed, Apr 10, 2002 at 03:49:50PM +1000, James Cameron wrote:
> On Wed, Apr 10, 2002 at 10:49:39AM +0530, Anil Kumar Bhagat wrote:
> > I want some guidelines about croping an area of
> > interest (with the help of a vector outline) from a large image 
> 
> Wild suggestions from someone who doesn't know enough about GRASS yet
> ... so I can be very wrong ...
> 
> a) if the vector was a rectangle, I'd use g.region instead,
> 
> b) convert the vector into a raster with value 1 for where you want to
> keep the image, and value zero where you do not, and then use r.mapcalc
> to multiply the mask by the image,

Or use r.mask to set a mask and then 'echo "newmap = oldmap" |
r.mapcalc'.  Masks can be irregular in shape.

-- 
Eric G. Miller <egm2 at jps.net>



More information about the grass-user mailing list