[GRASSLIST:1738] Re: cropping and joining maps
Eric G. Miller
egm2 at jps.net
Sat Apr 14 22:18:50 EDT 2001
On Sat, Apr 14, 2001 at 04:47:40PM -0700, Russell A. Bell wrote:
> I have some topo maps (in GeoTIFF format from Teale Data
> Center). I want to crop the 'collars' (the white space around the map
> itself) then join adjacent maps at their boundaries to create one new
> map. I have looked at GRASS, read docs, and followed tutorials for
> hours and not figured out how to do this. I hope this indicates great
> obtuseness on my part. Would some kind soul point me in the right
> direction?
> Thanks.
>
> russell bell
You, of course, know Teale already has such things.
One way, might involve a combination of v.mkgrid, v.proj, g.region, and
r.mapcalc.
In lat/lon nad27/clark66 location, make a vector box corresponding to
the quad edges for each quad. Then project each vector box to your
Teale Albers coordinate system. Then use g.region twice, first on the
DRG of interest, then on it's corresponding vector extents (sans edge
markings). The first g.region will help to match the cell size for that
quad correctly, while the second will limit the area of interest. Then
GRASS ~> echo 'trimquad = oldquad' | r.mapcalc
The r.mapcalc trick should work, since only the cell values in the
region you've defined will be copied into the new quad. The color map
may need to be reassigned, but that's trivial with r.colors.
Most of this could probably be scripted with a shell script provided you
use a consistent naming nomenclature (similar to the O34119A6.tif or
whatever, hint Teale's trimmed quads are like T34119A6.tif).
--
Eric G. Miller <egm2 at jps.net>
More information about the grass-user
mailing list