Bug report #8736

Update raster analyses: access data through raster layer instead of GDAL

Added by Paolo Cavallini about 11 years ago. Updated almost 6 years ago.

Status:Closed
Priority:Normal
Assignee:-
Category:Analysis library
Affected QGIS version:3.0.0 Regression?:No
Operating System: Easy fix?:No
Pull Request or Patch supplied:No Resolution:fixed/implemented
Crashes QGIS or corrupts data:No Copied to github as #:17451

Description

This affects various modules, e.g. Terrain analyses. This is bad also because they cannot deal with WCS layers, and users are not warned about this.


Related issues

Related to QGIS Application - Bug report #8737: QgsRasterTerrainAnalysisPlugin: check QgsRelief::processR... Open 2013-10-01
Related to QGIS Application - Feature request #5857: Make QGIS support WCS layers as valid raster input layers Open 2012-06-25

History

#1 Updated by Alexander Bruy almost 8 years ago

  • Category changed from Rasters to Analysis library

#2 Updated by Paolo Cavallini almost 8 years ago

Tested with:

http://wms.pcn.minambiente.it/wcs/dtm_75m

after:

https://github.com/qgis/QGIS/pull/4062

but I get:

Traceback (most recent call last):
  File "/usr/local/src/qgis/QGIS/build_qgis3/output/python/plugins/processing/gui/AlgorithmDialog.py", line 151, in accept
    if checkCRS and not self.alg.checkInputCRS():
  File "/usr/local/src/qgis/QGIS/build_qgis3/output/python/plugins/processing/core/GeoAlgorithm.py", line 416, in checkInputCRS
    crs = dataobjects.getObject(item).crs()
AttributeError: 'NoneType' object has no attribute 'crs'

#3 Updated by Alexander Bruy almost 8 years ago

That's correct behavior for now. While native zonal statistics was adopted to access raster data via dataprovider, Processing itself still allows only rasters loaded with GDAL provider, because almost all algorithms can work only with local files.

As temporary workaround you can use PyQGIS in Python console if necessary.

#4 Updated by Paolo Cavallini almost 8 years ago

Thanks for the explanation. However, the unusable layer probably shouldn't show up in the list, to prevent the difficult-to-understand error for the user.

#5 Updated by Giovanni Manghi over 7 years ago

  • Regression? set to No
  • Easy fix? set to No

#6 Updated by Paolo Cavallini over 6 years ago

Still true in QGIS 3

#7 Updated by Giovanni Manghi over 6 years ago

  • Affected QGIS version changed from 2.0.1 to 3.0.0

Paolo Cavallini wrote:

Still true in QGIS 3

Please update the affected version.

#8 Updated by Nyall Dawson almost 6 years ago

  • Resolution set to fixed/implemented
  • Status changed from Open to Closed

This is basically fixed now -- the native QGIS algorithms use raster layer API directly, and GDAL algorithms cannot use QgsRasterLayer (which isn't part of GDAL api)

Also available in: Atom PDF