[GRASSLIST:10354] Re: How to clip/cut a large image into a set of smaler images

Ian MacMillan Ian.MacMillan at pomona.edu
Thu Feb 16 20:44:47 EST 2006


Lars, sounds like an easy way to do what you want is to set your region 
to your municipality then make a mask with
g.region rast=municipality res=big_landsat_tile_map
r.mapcalc MASK=municipality

Then just use:
r.mapcalc cropped_LANDSAT=big_landsat_tile_map

Your new file will be only the size of your municipality (at the 
landsat resolution).  Export with r.out.gdal.  To do another, just 
erase your masks with g.remove and start the process again.

G'luck,
-Ian

On Feb 16, 2006, at 2:47 PM, Lars Forseth wrote:

> hi!
>
> I'm trying to find out how to clip a large geotiff landsat image into 
> several
> smaller images; but I'm not finding any commands that seems to fit the 
> bill!
> Possibly because I don't know quite where or what to look for!
>
> Theres two things I would like to do:
>
> 1. Clip the image into several smaller "tiles"; either by defining 
> rectangle
> size or by creating a vector grid that is used to "cut" the larger 
> image into
> smaller ones.
>
> 2. Clip the image according to a municipality; i.e I have the area of 
> the
> municipality as both a raster (binary); and a vector. The resulting 
> image
> should be a geotiff or raster datasett that follows the borders of the
> municipality.
>
> Sorry if this is a FAQ. I have looked at the GRASS GIS book
> (Mitasova/Neteler), GDAL docs and various searches by Google (all 
> return too
> much information).
>
> Regards
>
> Lars F
>
> Archaeologist
> NTFK
>
>
 >
 >
What happens if a big asteroid hits Earth? Judging from realistic 
simulations involving a sledge hammer and a common laboratory frog, we 
can assume it will be pretty bad.
  - Dave Barry


-------------------------------------------------------------
This message has been scanned by Postini anti-virus software.




More information about the grass-user mailing list