zoran-cuckovic / QGIS-visibility-analysis

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

QGIS 2.18.15 (Viewshed Analysis Memory Error) #12

Closed scheepfa closed 6 years ago

scheepfa commented 6 years ago

I have been trying to run a Viewshed Analysis on a point layer containing approximately 174 points on a DEM compiled from the SRTM 30m Elevation data available at http://dwtkns.com/srtm30m/

After I compiled a merged GeoTIFF from the required tiles I ran the Viewshed Analysis plugin on QGIS but after numerous attempts and changes in the input parameters I keep getting a MemoryError.

2018-01-03T09:47:05 1 Traceback (most recent call last): File "C:/Users/Frans_2/.qgis2/python/plugins\ViewshedAnalysis\viewshedanalysis.py", line 197, in run Algo) File "C:/Users/Frans_2/.qgis2/python/plugins\ViewshedAnalysis\doViewshed.py", line 409, in Viewshed mx_vis = numpy.zeros((full_window_size, full_window_size)) MemoryError

Does anybody here have any idea why this is happening. I have updated the plugin to the latest available version (0.5.4) already. It seems other users have had similar errors but there is no clear answer to be found anywhere on how it was actually solved.

Project CRS is set to: WGS 84 EPSG:4326

zoran-cuckovic commented 6 years ago

The MemoryError usually appears when the input data is in Lat/Lon format (that is un-projected). Did you check that?

scheepfa commented 6 years ago

I am new to QGIS so I can check what format the data should be in but what must is be changed to? Here is a sample of what the attribute table looks like: Site | Longitude | Latitude Achterfontein | 19.328363 | -32.215298 Agulhas | 20.005986 | -34.816927 Albertinia HS | 21.560415 | -34.225758 Annelien Els Relay | 20.600971 | -34.336526 arniston | 20.228005 | -34.669325 Aurora | 18.575987 | -32.734717 Aurora Juno HS | 18.445460 | -32.240411 Baardskeerdersbos Relay | 19.575650 | -34.578724

zoran-cuckovic commented 6 years ago

You need to project your raster and vector data in a system that represents the Earth's surface as a flat plane (latitude and longitude are angular measurements over a sphere, see https://en.wikipedia.org/wiki/Geographic_coordinate_system). Your data seems to be in Lat/Lon : you should find the appropriate projection for South Africa. Note that you should choose the same projection for both datasets (raster and vector).