Hi Everyone<div><br></div><div>Many thanks for your help.</div><div><br></div><div>Lots of recommendations and I have tried each one with limited success</div><div><br></div><div>1) QGIS - works but i need a permanent copy.</div>
<div>2) GIMP - problem with this is GIMP does not recognise my rasters. I have expanded to color table to rgb and it still wouldnt open the file. It would open the hillshade however its 2gb so it fell over half way through</div>
<div>3) hsv_merge.py - this initially did not work because the hillshade is actually a different pixel size to the topo map even though they cover the same area. So i used gdal to increase the size of the hillshade and then ran the hsv_merge.py</div>
<div><br></div><div>it created a 98GB geotiff!! which i then compressed using gdal_translate, ended up being 268Mb!!</div><div><br></div><div>However, as advised the colours were way off.</div><div><br></div><div>I tried to edit the python script but get indent errors or it does not know what v_norm is. </div>
<div><br></div><div>4) then tried SASS GIS and when I open my rasters they are in a black colour ramp even though they are RGB and I cannot figure out how to change that so they load normally. Also SASS wont load a big tiff file in anyway.</div>
<div><br></div><div>5) Looked at GMT and I cannot find the options to load two rasters on top of each other.</div><div><br></div><div>6) MIRONE - again cannot see how to do this from within the application.</div><div><br>
</div><div>The only real success was mapnik, however creating a map file looking at 2000 topogrpahic maps and 20000 hillshade map is crazy and even if I point to the VRT for each, mapnik cannot create an image of 132000 by 248000 that I need.</div>
<div><br></div><div>So after a very frustrating day I still do not have an answer!</div><div><br></div><div>So if there is any other ideas or methods I would really appreciate the help</div><div><br></div><div>thanks</div>
<div><br></div><div>Tim</div><div><br></div><div><br><br><div class="gmail_quote">On 21 February 2012 15:11, Joaquim Luis <span dir="ltr"><<a href="mailto:jluis@ualg.pt">jluis@ualg.pt</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div class="im">On <a href="tel:21-02-2012%2014" value="+12102201214" target="_blank">21-02-2012 14</a>:11, Rutger wrote:<br>
</div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div class="im">
Hey,<br>
<br>
<br>
TJMartin wrote<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
...<br>
Is there a way to combine the hillshade and topo map together - ie add a<br>
transparency or opacity to the hillshade.<br>
...<br>
<br>
</blockquote>
A common way is to convert your (i assume) RGB topo map to HSV color space<br>
and replace the intensity band (v) with your hillshade. This is for example<br>
nicely shows at Franks blog:<br>
<a href="http://fwarmerdam.blogspot.com/2010/01/hsvmergepy.html" target="_blank">http://fwarmerdam.blogspot.<u></u>com/2010/01/hsvmergepy.html</a><br>
<a href="http://fwarmerdam.blogspot.com/2010/01/hsvmergepy.html" target="_blank">http://fwarmerdam.blogspot.<u></u>com/2010/01/hsvmergepy.html</a><br>
<br>
I find replacing the entire intensity band always a bit harsh since for flat<br>
area's you would like to stick to your original color/data.<br>
<br>
This can be done by normalizing the hillshade band with the zenith angle<br>
used to create is. Following the hsv_merge.py script on Franks blog, the<br>
original replacement of:<br></div>
/hsv_adjusted = numpy.asarray( [hsv[0], hsv[1], v] )/<br>
<br>
Woud become something like:<br>
/v_norm = v * hsv[2] / ( 255 * math.cos(zenith * (math.pi / 180.0)))<div class="im"><br>
hsv_adjusted = numpy.asarray( [hsv[0], hsv[1], numpy.where( v_norm> 255,<br></div>
255, v_norm )] )/<div class="im"><br>
<br>
You have to pay a bit attention to avoid saturating the normalized band.<br>
This can be done by choosing a zenith angle wich gives a flat surface a<br>
value halfway your range of 0 and 255.<br>
</div></blockquote>
<br>
GMT does that for ages. But it doesn't replace the intensity with shading. Instead the shading is used to change the saturation of HSV making the facets facing illumination light become brighter and the other become darker.<br>
<br>
See for example<br>
<a href="http://gmt.soest.hawaii.edu/gmt/html/GMT_Docs.html#x1-1420007.17" target="_blank">http://gmt.soest.hawaii.edu/<u></u>gmt/html/GMT_Docs.html#x1-<u></u>1420007.17</a><br>
<br>
and<br>
<a href="http://gmt.soest.hawaii.edu/gmt/html/GMT_Docs.html#x1-1580008.2" target="_blank">http://gmt.soest.hawaii.edu/<u></u>gmt/html/GMT_Docs.html#x1-<u></u>1580008.2</a><br>
<br>
With GMT5 one can compute the shading of a grid and apply it to an image. Here goes a small example of the GMT's test set (..\gmt5\trunk\test\grdimage\<u></u>orig\readwrite_withgdal.sh)<br>
<br>
Even simpler is to use Mirone. We can do the above just with a couple of clicks.<span class="HOEnZb"><font color="#888888"><br>
<br>
Joaquim<br>
</font></span><br>_______________________________________________<br>
gdal-dev mailing list<br>
<a href="mailto:gdal-dev@lists.osgeo.org">gdal-dev@lists.osgeo.org</a><br>
<a href="http://lists.osgeo.org/mailman/listinfo/gdal-dev" target="_blank">http://lists.osgeo.org/mailman/listinfo/gdal-dev</a><br></blockquote></div><br></div>