[GRASSLIST:2942] Re: Importing intersectioning Raster-Files

David D Gray ddgray at armadce.demon.co.uk
Fri Jan 18 11:15:34 EST 2002


Hi

I am currently working on similar stuff myself. If there are not too 
many files and you can import them manually, then just set the region to 
  each file as you import.

Set the region from the tfw file, you can also set the resolution from 
this, or set it manually with each file, and import with r.in.tiff. But 
then you must reset the region to the true boundary for each image to 
truncate it to its correct extents, and use r.resample to create a new 
image with these extents. Regions are set with g.region (and options), 
or via the dialog with tcltkgrass.


A single greyscale image can simply be created by running r.patch on the 
images you wish to composite. To do this you must first set the region 
to the  extents you want for the composite image. Also choose a 
resolution if your imports had different resolutions.

If you have a color image - AFAIK - you must split it to greyscale for 
this operation. The greyscale palette is linear and will `true-patch' 
the grey levels. Color images use a palette and your imports will all 
have different indices. You _can_ use the `true-color' option with 
nlev=? but at full color (256 levels), this is very slow to display 
(ain't no roadrunner at 20 levels either!), and of course, at less than 
256 levels it is lossy.

You can patch all the imports for each channel. I have not needed to 
create a color map from imported channels, but there is a tool 
r.composite for this purpose. Maybe its better to export them and use an 
external graphics package like GIMP or netpbm to combine channels.

David

Harald Wehr wrote:

> Hi GrassList,
> 
> I 've got several tiff-files, each with a corresponding tfw-file. 
> Unfortunately the files intersect a little bit with each other, as each 
> tiff-file has got an empty margin surrounding the map. Consider 
> following picture:
> 
> Map 1:                              I---------->6<
>                                     I >4<--->3< I
>                                     I  I     I  I
>                                     I  I     I  I
>                                     I >1<--->2< I
>                                    >5<----------I
> 
> Map 2:                              I---------->6<
>                                     I >4<--->3< I
>                                     I  I     I  I
>                                     I  I     I  I
>                                     I >1<--->2< I
>                                    >5<----------I
> 
> Each tiff-file contains everything from 5 to 6 while the actual 
> information is within 1,2,3,4. In this example the points 1,2 from map 1 
> would correspond to 4,3 from map 2.
> 
> Is it possible to produce one raster that contains all maps only with 
> the relevant information from each tiff between the inner rectangle?
> 
> Thanks in advance
> Harald
> 
> 




More information about the grass-user mailing list