zoran-cuckovic / QGIS-visibility-analysis

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

Too big DTM file for Viewshed? #5

Closed jakro64 closed 7 years ago

jakro64 commented 7 years ago

Hello! Binary viewshed is working fine for me with QGIS 2.14.11 in range 10000. I have tried to increase the range to more (20000+), but then I only get MemoryError. I presume my DTM file is too big (0,883 GB). Can you confirm it is so, please?

Viewpoint is about 1100 masl. The mountains in the east (about 1250 m high) are outside the range, and not detected, but from the viewpoint they are clearly visible by eyes.

viewpoint_saetertinden

MemoryError Traceback (most recent call last): .qgis2/python/plugins\ViewshedAnalysis\viewshedanalysis.py", line 197, in run Algo) .qgis2/python/plugins\ViewshedAnalysis\doViewshed.py", line 505, in Viewshed data = numpy.zeros((full_window_size, full_window_size)) #window is always the same size MemoryError

zoran-cuckovic commented 7 years ago

Hello, The plugin is based on numpy - which has its limitations in terms of maximum data volume. For very large datasets, you can use GRASS modules r.viewshed or r.los (in qgis processing).

However if your DEM is less than 1 Gb, then there might be a problem. The actual size of the data used is dependent on the radius (window_size), it can be smaller or bigger than the DEM used. I assume you have more than 3 Gb of RAM on your machine, so it should work (?) Note that any additional options, such as target size, tend to demand even more memory.

see also: numpy max. size

jakro64 commented 7 years ago

Thanks a lot for the comments and advices. I have an i5 laptop with 4 GB RAM. Earlier I was running Viewshed with ArcGIS without any problem. As you reccomend, I will try to use GRASS; for the first time. :-)