[QGIS-Developer] Problems with QGIS 3 Hillshade
Even Rouault
even.rouault at spatialys.com
Sat Jun 9 09:53:11 PDT 2018
Calvin,
The terrain analysis plugin in 2.18 is QGIS specific code.
Your observations don't match mine. I tried on a 60,000x80,000 input TIFF of
type Byte, without nodata. Ubuntu 16.04 / gcc 5.5
The timings I get:
- debug GDAL -dev & QGIS 2.18 builds:
* gdaldem hillshade: 11m10s
* terrain analysis plugin: 14m10s
- optimized GDAL -dev & QGIS 2.18 builds:
* gdaldem hillshade: 2m35s
* terrain analysis plugin: 12m00s
I've compared source codes between GDAL and QGIS. The overall structure is
identical, process line by line, same type of algorithms, but the GDAL code
has a few optimized paths compared to QGIS one (much less trigonometric
computations in critical path), which explains the difference of timings in
optimized builds. But not in the direction you mention.
can you post the output of gdalinfo on your input DEM ?
Even
> I was using the Hillshade from the Terrain Analysis plugin. I don't know if
> it uses GDAL for the processing or not, but it does not give a GDAL command
> line. The Terrain Analysis plugin seems to be dropped for QGIS 3, but if
> the GDAL hillshade is going to be as slow as it was, that is going to be a
> serious problem for me.
>
> Thanks,
>
> Calvin
>
> On Sat, Jun 9, 2018 at 3:01 AM, Nyall Dawson <nyall.dawson at gmail.com> wrote:
> > On Sat, 9 Jun 2018 at 06:25, C Hamilton <adenaculture at gmail.com> wrote:
> > > OS: Windows 7
> > > QGIS 3.0.3
> > >
> > > I have encountered several issues with the Hillshade algorithm in QGIS
> > > 3.
> > >
> > > 1. It is much slower that the QGIS 2 hillshade perhaps as much as 10x
> >
> > slower. This is a problem because I process very large images. 60,000 x
> > 80,000 pixels or greater. I eventually killed the process and went back to
> > QGIS 2 to complete the job.
> >
> > > 2. I tried using Multidirectional shading and received an error. This is
> >
> > basically the command issued.
> >
> > > gdaldem hillshade input.tif output.tif -of GTiff -b 1 -z 1.0 -s 1.0 -az
> >
> > 315.0 -alt 45.0 -multidirectional
> >
> > Can you post the command created in QGIS 2.18 for comparison?
> >
> > > I get the gdal error "ERROR 6: -multidirectional and -az cannot be used
> >
> > together". If multidirectional is enabled then you cannot add the -az
> > parameter. If have tried running the same command in the command line and
> > removed the -az and it worked fine.
> >
> > Confirmed, thanks - fixed by https://github.com/qgis/QGIS/pull/7209
> > and unit tests added.
> >
> > Nyall
--
Spatialys - Geospatial professional services
http://www.spatialys.com
More information about the QGIS-Developer
mailing list