2

I am very new to using GIS, and I am trying to do a viewshed analysis in QGIS 2.16.1. I have tried two different methods, one using the plugin for Viewshed analysis and the other using the GRASS (r.viewshed) method

The steps I am following is:

  1. Select new project Open raster (Ascii format for South Africa)
  2. Change the projection to EPSG 32734 (WGS 84 / UTM zone 34S) by clicking on the CRS button at the bottom right (OTF enabled)

  3. Then I reproject the image. I'm not sure if this is necessary as well after I've changed the projection in the previous step, but I figured a double reprojection won't harm if the two processes are exactly the same.

  4. Drop pin where observer is. I do this using the plugin Pin Point
  5. Select Viewshed, fill in details (range 2000, binary viewshed) and click ok
  6. ERROR: MemoryError
Traceback (most recent call last):
  File "C:/Users/Andre/.qgis2/python/plugins\ViewshedAnalysis\viewshedanalysis.py", line 197, in run
    Algo)
  File "C:/Users/Andre/.qgis2/python/plugins\ViewshedAnalysis\doViewshed.py", line 409, in Viewshed
    mx_vis = numpy.zeros((full_window_size, full_window_size))
MemoryError

From many other comments and posts here it seems like the memory issue can be related to projections, but I've tried just about every combination and have still not been able to get it to work. While I see there are similar problems posted (with less details), I still have not been able to find a solution. Is there a way to check the projections on all your layers (I only have 2), and are they all managed separately?

2
  • When did you install the plugin? Check you have the latest version (funnily enough, 0.5.3 only got accepted today). That has a fix to get it working in 2.16. I'm not sure if it's the same problem, but it's worth checking. Tested it just now and works fine on two layers with the same CRS.
    – Steven Kay
    Commented Aug 18, 2016 at 22:28
  • Great, it now works. Being new I only installed the previous version two days ago, so it really is by chance that the fixed version was released on the day I asked the question. Commented Aug 19, 2016 at 6:06

1 Answer 1

1

The upgrade to version 0.5.3 worked sorted out the MemoryError issue

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.