[GRASSLIST:6877] Re: crop of raster, size of raster

Ian W. Macmillan ian_macmillan at umail.ucsb.edu
Tue May 24 17:05:52 EDT 2005


To crop a raster map, just resize your region using g.region or by using d.zoom.
 Once you have the region of interest, just use
r.mapcalc newmap = oldmap

I am guessing your files are so big because you are exporting them out of a huge
region.  The region determines a lot of what you do in grass.  Make sure it is
set to the size you want before exporting or doing commands (it will save
significantly on processor time as well as memory).

G'luck
-Ian

Quoting Axel Orth <axel_orth at gmx.de>:

> hey list,
> i just figured out that "cropping" of raster maps by the creation of a
> MASK and r.mapcalc is not exactly what i really intended:
> i though the resulting maps are really clipped but it looks like the
> regions outside the mask are just white.
>
> this is ok for me for one kind of rasters (have disturbing legends and
> annotations) but does not work for other maps.
> is there a possibility to do something else?
>
> by doing those operations i recognized also that the size of my data
> increases rapidly:
> i import a 4 mb tiff (black and white) and by exporting it via
> r.out.tiff its size is 514 mb.
> what could be the reason for this?
>
> regards
> axel
>
>


-----------------------------------------------------
Ian MacMillan
Geological Sciences-UCSB

"insert witticism here"




More information about the grass-user mailing list