Nikos Alexandris wrote:
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.



Thanks Nikos,

In the end, I made a composite from the original shaded relief:

r.composite red="nesja_shade" green="nesja_shade" blue="nesja_shade" levels=32 output="elev_shade_comp"

then patched it with the photos:

r.patch input="p43_trimmed,p44_trimmed,p33_trimmed,elev_shade_comp" output="aerial" This gave me coloured aerial photos where the data exist, and a grey shaded relief map where they don't.

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


Good point.

Cheers

John

Kind regards, Nikos




--


Dr John Stevenson
Postdoctoral Research Associate
School of Earth, Atmospheric and Environmental Sciences
Williamson Building (Room 2.42)
University of Manchester
Manchester M13 9PL, UK
tel. +44(0)161 306 6585; fax. +44(0)161 306 9361;
[email protected]
_______________________________________________
grass-user mailing list
[email protected]
http://lists.osgeo.org/mailman/listinfo/grass-user

Reply via email to