[GRASSLIST:2699] Re: stitching geotiffs

Glynn Clements glynn.clements at virgin.net
Fri Feb 20 11:55:20 EST 2004


Martin du Saire wrote:

> > > 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?

You can (i.e. nothing will actually stop you), but you shouldn't. You
may have misread or misinterpreted what Richard wrote.

> Is this any better/worse than using r.proj?

Worse.

> 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??

That depends upon whether you consider an error of a few tens of
kilometres "small".

> >>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.

In which case, you need three locations, one for each zone. Import
each map into the correct location, then start GRASS in the zone 15
location and use r.proj to re-project the zone 14/16 maps.

> 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?

No. If the maps use different projections, you have to use r.proj at
some point.

> >>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?

It depends upon context; for r.patch, NULL is effectively
"transparent", i.e. non-NULL cells overwrite whatever is "beneath"
them, NULL cells don't.

> Maybe use: r.null map="name" setnull=0

Yes.

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




More information about the grass-user mailing list