Extracting smaller raster images from big ones

Mike Hanratty hanra001 at gold.tc.umn.edu
Thu Oct 10 08:00:00 EDT 1996

In message <Pine.LNX.3.91.961010164344.14668B-100000 at ces.iisc.ernet.in>  writes
> Help! I don't know if this is an obvious question, but I have been 
> searching the Grass manual and can't find an answer - I have large raster 
> images and want to extract smaller ones from them for the purpose of 
> supervised classification. How do I do this? I have the coords of the 
> smaller images I want. Defining smaller regions doesn't help, since 
> i.class doesn't take a region name, it simply loads the entire image !
> Please help.... I don't want to export to IDRISI, then extract, and then 
> reimport, as that would take rtoo much time.
> Thanks a lot
> Harini
After defining a smaller region, run r.mapcalc with the command:
newfname = original_raster_fname

This will create a new file containing just the smaller raster image, since 
mapcalc only works on the active region.

Michael Hanratty                               Phone: (612) 627-4590
Dept. of Civil Engineering                            (612) 626-0024
University of Minnesota                        Fax:   (612) 627-4609
St. Anthony Falls Laboratory
Mississippi River at 3rd Ave SE
Minneapolis, MN 55414

More information about the grass-user mailing list