[GRASSLIST:2894] Re: unwanted map borders
Zbigniew Perski
perski at us.edu.pl
Wed Mar 10 13:03:58 EST 2004
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 at umn.edu
> ------------------------------------------------------------------------
>
More information about the grass-user
mailing list