How to mosaic two USGS 1:250,000 DEM data files in GRASS 4.1
Michael Hanratty
hanra001 at gold.tc.umn.edu
Fri Jun 27 11:50:07 EDT 1997
In message <9706261929.AA26143 at ouray.cudenver.edu> writes:
> Dear Grass Users,
>
> I would like to mosaic 2 (possibly 4) USGS 1:250,000 DEM data files into
> one. Does anyone have suggestions of where I can look for a procedure to
> do this? (tutorial going through an example, article, etc.)
First, convert USGS dem files to GRASS format:
1. convert ascii file to binary:
m.dmaUSGSread top=1 bottom=1201 left=1 right=1201 output=binfname
logfile=logfname < demfname
2. Rotate binary file 90 degrees, creating dem in lat-long format
m.rot90 [-q] input=binfname output=llfname rows=1201 cols=1201
bpc=2
3. Convert from lat-long to UTM projection and put in GRASS database
r.in.ll [-s] input=llfname output=rastfname bpc=2
corner=corner,lat,lon dimension=1201,1201
res=3,3 spheroid=wgs72
The latitude and longitude of the sw corner is the first pair of
the 6-digit values in the header of the original dem file. These six
digit values are arc-seconds. Divide by 3600 to get degrees. Enter
these values in the corner= input value for r.in.ll.
Next, set your window large enough to include all of the maps, then run
r.mapcalc with the following command: bigmap = max(map1,map2,map3,map4)
This should work unless there are gaps between the maps. Then you would have to
go in and fill in the gaps with d.edit.
Hope this helps.
Michael Hanratty Phone: (612) 627-4590
St. Anthony Falls Laboratory Fax: (612) 627-4609
Dept. of Civil Engineering
University of Minnesota
Mississippi River @ 3rd Ave. SE
Minneapolis, MN 55414
More information about the grass-user
mailing list