[gdal-dev] GDALDEMProcessingOptionsNew with NULL psOptionForBinary
Ivan Lucena
lucena_ivan at hotmail.com
Mon Apr 3 21:46:32 PDT 2017
Hi,
As it says in the documentation, when calling GDALDEMProcessingOptionsNew the argument psOptionForBinay should generally be NULL. [ http://gdal.org/gdal__utils_8h.html#ac6e67c9ca37448286a6031e626e551ae ]
And that should be the case for applications that only has access to the GDAL public API, gdal.h and gdal_utils.h.
But if psOptionForBinary is NULL, the DEM "Processing" parameter {shade,slope,aspect,...} is not passed or parsed. [ http://trac.osgeo.org/gdal/browser/trunk/gdal/apps/gdaldem_lib.cpp?rev=36538#L3891 ]
And the evaluation (eUtilityMode == HILL_SHADE) will never be true. [ http://trac.osgeo.org/gdal/browser/trunk/gdal/apps/gdaldem_lib.cpp?rev=36538#L3891 ]
That means -alt (altitude) cannot be used for hillshade processing.
In that scenario, if one tries to pass "-alt n", GDALDEMProcessingOptionsNew will return NULL and GDALDEMProcessing cannot be called.
Is that a bug or is t intentional? Any suggestion or workaround?
Thanks,
Ivan
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/gdal-dev/attachments/20170404/77327eb3/attachment.html>
More information about the gdal-dev
mailing list