[GRASSLIST:2700] Re: stitching geotiffs

Richard Greenwood rich at greenwoodmap.com
Fri Feb 20 12:06:03 EST 2004


Martin du Saire wrote:

> At 04:01 PM 2/19/2004 -0700, you wrote:
> 
>> Martin du Saire wrote:
>>
>>> Hi,
>>> I am a newbie to GRASS (XT, Cygwin/XFree86; GRASS5.0) and GIS trying 
>>> to stitch together a set of NLCD Geo-Tiff  (USGS Landsat-5, etc.) 
>>> data files for a set of contiguous states in the US.  I finally 
>>> figured out how to import them using r.in.gdal -o.  (If there is some 
>>> inherent problem with overriding the projection checking, please let 
>>> me know.)
>>
>>
>> If you are importing an image in UTM Zone X into a location defined as 
>> UTM Zone X, then you are doing the correct thing by using -o. (You 
>> should not use -o to import Zone X into a location of Zone Y). You may 
>> also want to use -e, which extends the location if needed.
> 
> 
> So I can import a Zone X map into a Zone Y location?  Is this any 
> better/worse than using r.proj?  The bulk of my area of interest is in a 
> single UTM zone (Zone Y), so maybe the distortions generated by 
> importing Zone X and Zone Z maps into a location of Zone Y will be small??

No. Sorry I was not clear. You must use r.proj. Import Zone 14 maps into 
a Zone 14 location. Zone 15 into a Zone 15 location, etc. And then use 
r.proj to bring your Zone 14, and Zone 16 maps into your Zone 15 location.

>>> For starters, how do I go about importing the individual files with 
>>> their corresponding UTM zone designations into the same project?
>>
>>
>> Do I understand correctly that you have images in Zone X, Y Z ... and 
>> want to have them all in a single projection? If I understand 
>> correctly, then you need to use r.proj to reproject from the 
>> individual zones into the single target projection. But maybe I do not 
>> understand you goal.
> 
> 
> Yes, that is what I am attempting to do. I am stitching together maps 
> for MN, IA (Zone 15), WI (Zone 16), and ND, SD (Zone 14).  About 80% of 
> my area of interest is in Zone 15.
> I also came across a thread from Feb97 that suggested making symbolic 
> links of mapsets and then running  g.mapsets.  What you suggest sound 
> more straightforward.  Would these procedures be equivalent?

I am not familiar with g.mapsets so I can not comment.

>>> Assuming I can figure that out, do I use r.mask to remove the 
>>> background from each of these maps?
>>
>>
>> You probably do not need to mask. I am guessing that the background is 
>> NULLs?
> 
> 
> The background is set to "0". Would a NULL be transparent? Maybe use: 
> r.null map="name" setnull=0

Yes, that sound correct.

What do you want to get as a final result? A single map (image) or a 
whole bunch of maps (image tiles)? If you want a single map, then you 
would probably want to use r.patch to assemble all the individual maps 
in the Zone 15 location.

Rich

-- 
Richard Greenwood
www.greenwoodmap.com




More information about the grass-user mailing list