<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<style type="text/css" style="display:none;"><!-- P {margin-top:0;margin-bottom:0;} --></style>
</head>
<body dir="ltr">
<div id="divtagdefaultwrapper" dir="ltr" style="font-size:12pt; color:#000000; font-family:Calibri,Arial,Helvetica,sans-serif">
<p>Hi,</p>
<p><br>
</p>
<p>As it says in the documentation, when calling GDALDEMProcessingOptionsNew the argument psOptionForBinay should generally be NULL. [ <a href="http://gdal.org/gdal__utils_8h.html#ac6e67c9ca37448286a6031e626e551ae" class="OWAAutoLink" id="LPlnk983082" previewremoved="true">http://gdal.org/gdal__utils_8h.html#ac6e67c9ca37448286a6031e626e551ae</a> ]</p>
<p><br>
</p>
<p>And that should be the case for applications that only has access to the GDAL public API, gdal.h and gdal_utils.h.</p>
<p><br>
</p>
<p>But if psOptionForBinary is NULL, the DEM "<span style="font-size:12pt">Processing" </span><span style="font-size:12pt">parameter
</span>{shade,slope,aspect,...} is<span style="font-size:12pt"> not passed or parsed. [ </span><a href="http://trac.osgeo.org/gdal/browser/trunk/gdal/apps/gdaldem_lib.cpp?rev=36538#L3891" class="OWAAutoLink" id="LPlnk913606" style="font-size:12pt" previewremoved="true">http://trac.osgeo.org/gdal/browser/trunk/gdal/apps/gdaldem_lib.cpp?rev=36538#L3891</a> ]</p>
<p><br>
</p>
<p><span style="font-family:Calibri,Arial,Helvetica,sans-serif; font-size:12pt">And the evaluation (</span><span style="font-family:Calibri,Arial,Helvetica,sans-serif; font-size:12pt">eUtilityMode </span><span class="o" style="font-weight:bold; font-family:Calibri,Arial,Helvetica,sans-serif; font-size:12pt">==</span><span style="font-family:Calibri,Arial,Helvetica,sans-serif; font-size:12pt"> HILL_SHADE) </span><span style="font-family:Calibri,Arial,Helvetica,sans-serif; font-size:12pt">will
never be true. [ </span><a href="http://trac.osgeo.org/gdal/browser/trunk/gdal/apps/gdaldem_lib.cpp?rev=36538#L3891" class="OWAAutoLink" id="LPlnk590606" style="font-size:12pt" previewremoved="true">http://trac.osgeo.org/gdal/browser/trunk/gdal/apps/gdaldem_lib.cpp?rev=36538#L3891</a> ]</p>
<p><br>
</p>
<p>That means -alt (altitude) cannot be used for hillshade processing. </p>
<p><br>
</p>
<p>In that scenario, if one tries to pass "-alt n", <span style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 16px;">
GDALDEMProcessingOptionsNew will return NULL and GDALDEMProcessing cannot be called.</span></p>
<p><span style="font-size:12pt"><br>
</span></p>
<p><span style="font-size:12pt">Is that a bug or is t intentional? </span><span style="font-size:12pt">Any suggestion or workaround?</span></p>
<p><span style="font-size:12pt"><br>
</span></p>
<p><span style="font-size:12pt">Thanks,</span></p>
<p><span style="font-size:12pt">Ivan</span></p>
<p><br>
</p>
<p><br>
</p>
</div>
</body>
</html>