[GRASS-user] r.patch, images vs coloured elevation data, aerial photo mosaic

Nikos Alexandris nikos.alexandris at felis.uni-freiburg.de
Mon Feb 16 06:58:50 EST 2009


On Mon, 2009-02-16 at 11:35 +0000, John Stevenson wrote:
> Hi,
> 
> I have two questions, first a specific one, secondly a more general one.
> 
> 1)  I have some aerial photos that I want to mosaic.  I am able to do 
> this with r.patch.  However, the photos only cover about half of the 
> region.  In the remainder of the region, I would like to show a shaded 
> relief map as a background to give context to the photos.  When I 
> include the shaded relief map in the list to patch, it comes out as 
> varying shades of red.  My question is therefore, what do I have to do 
> to the shaded relief map to turn it into an 'rgb image' that I can 
> include in r.patch.

Do you really want to patch the "shaed relief" map along with the
orthophotos in one map? What about r.blend?

If you insist on patching, then, I think, you would need to create 3 new
versions of your shaded map which will correspond to R(ed), G(reen) and
B(lue), rescale them to 0,255 (r.rescale). Then you patch them with the
R, G and B mosaic's of the orthophotos and compose (r.composite) an RGB
map.

I would expect the shaded part to look grey-scaled since you will have
the same pixel value in all of the R, G and B layers. But I am 100% sure
that it will work.



> 2)  More generally, what is the best way of converting a good-looking 
> map into a georeferenced image e.g. by converting the elevation data 
> into rgb pixel colour data.  Currently I would use d.out.file then 
> gdal_translate, but that is dependent on the screen resolution.

What about "d.out.file in=YourMap out=YourMap resolution=2 # or
resolution=4" ?

> Cheers
> 
> John

Kind regards, Nikos



More information about the grass-user mailing list