[GRASSLIST:2891] unwanted map borders

Which command cuts off "clips" unwanted map borders? I have a series of scanned and rectified images (essentially tiles) that I intend to use r.patch to combine into a single large map. However, there are borders around each that needs to be removed before r.patch is applied.

Thanks,

Kirk

------------------------------------------------------------------------
Kirk R. Wythers tel: 612.625.2261
Dept. of Forest Resources fax: 612.625.5212
University of Minnesota email: kwythers@umn.edu
------------------------------------------------------------------------

W liście z śro, 10-03-2004, godz. 15:54, Kirk R. Wythers pisze:

Which command cuts off "clips" unwanted map borders? I have a series of
scanned and rectified images (essentially tiles) that I intend to use
r.patch to combine into a single large map. However, there are borders
around each that needs to be removed before r.patch is applied.

Kirk,
some weeks ago I had the same problem I solved it in a very simple way:
1. Draw polygon arround the part of map which you want to have
2. Assign a label = 1 for the polygon
3. Rasterize the polygon wit region settings the same as for your map
4. Your new raster: "mask" map will have value 1 for the wanted area and
NaN for unwanted areas
5. Multiply your map with "mask" using mapcalc. For pixels with 1 from
the "mask" the resulted map will have oryginal values but outside the
porgram will assign NaNs

Of course you need a bit of work with digitizing but with this method
you are able to cut even the irregular area.

Zbigniew

_____________________________________________________________
dr. Zbigniew Perski
Geological Visualization Laboratory
Dept. of Fundamental Geology, Faculty of Earth Sciences
University of Silesia
POLAND

Thanks,

Kirk

------------------------------------------------------------------------
Kirk R. Wythers tel: 612.625.2261
Dept. of Forest Resources fax: 612.625.5212
University of Minnesota email: kwythers@umn.edu
------------------------------------------------------------------------

Kirk R. Wythers wrote:

Which command cuts off "clips" unwanted map borders? I have a series of
scanned and rectified images (essentially tiles) that I intend to use
r.patch to combine into a single large map. However, there are borders
around each that needs to be removed before r.patch is applied.

To crop to a rectangular region, use g.region (or d.zoom) to change
the region, then r.resample to create a new map from the portion of
the map inside the current region.

To crop to a non-rectangular region, create a raster map which defines
the region of interest, set it as a mask (with r.mask, or by naming
the map "MASK"), then use r.resample.

--
Glynn Clements <glynn.clements@virgin.net>