zoran-cuckovic / QGIS-visibility-analysis

Quantum GIS plugin for visibility analysis
GNU General Public License v3.0
73 stars 18 forks source link

NoneType error ? #33

Closed AmyCrum closed 3 years ago

AmyCrum commented 5 years ago

Hi all,

I receive the following error in all attempts to use visibility analysis tool: " QGIS version: 3.6.3-Noosa QGIS code revision: 0c5774c068 Qt version: 5.11.2 GDAL version: 2.4.1 GEOS version: 3.7.2-CAPI-1.11.0 b55d2125 PROJ version: 520 Processing algorithm… Algorithm 'Viewshed' starting… Input parameters: { 'DEM' : 'C:/Users/xxx/Desktop/Height Data/data/terr50_gagg_gb/gb1.vrt', 'OBSERVER_POINTS' : 'C:/Users/xxx/Desktop/New_Test_20190916/Viewpoints_20190916.shp', 'OUTPUT' : 'TEMPORARY_OUTPUT', 'REFRACTION' : 0.13, 'USE_CURVATURE' : False }

Traceback (most recent call last): File "C:/Users/xxx/AppData/Roaming/QGIS/QGIS3\profiles\default/python/plugins\ViewshedAnalysis\algorithms\viewshed_raster.py", line 245, in processAlgorithm interpolate = precision > 0) File "C:/Users/xxx/AppData/Roaming/QGIS/QGIS3\profiles\default/python/plugins\ViewshedAnalysis\algorithms\modules\visibility.py", line 159, in viewshed_raster dem.open_window (point["pix_coord"]) File "C:/Users/xxx/AppData/Roaming/QGIS/QGIS3\profiles\default/python/plugins\ViewshedAnalysis\algorithms\modules\Raster.py", line 347, in open_window self.rst.ReadAsArray(*self.gdal_slice ).astype(float) AttributeError: 'NoneType' object has no attribute 'astype'

Execution failed after 1.85 seconds "

As a non-coder I have tried multiple PCs, online and offline files, improved resolution of raster, single points, multiple points, all sorts of varying inputs. I'm at a loss - please help!

zoran-cuckovic commented 5 years ago

Hi, I can see from your log that you're using a virtual raster. To be honest, I haven'yet tested such a configuration. Does it work with a usual raster (.tiff)?