3

My question is exactly the same as TTome! (Viewshed analysis plugin on QGIS keeps resulting in errors)

"I've been trying to test the Viewshed analysis plugin on QGIS 2.10, but it keeps giving back error messages. I've tried to reduce the radius area and have also reprojected both my DEM and my point shapefile to UTM, in order to avoid a possible memory error mentioned in another question regarding this plugin (that the using of geographic coordinates might cause a memory error). Still, I keep getting Python error messages when I try to run it. Does anyone know whats going on? Is this plugin "broken"?"

Error message:

enter image description here

0

1 Answer 1

4

This is a classic python "out of memory" error.

I looked at the plugin code. From the stack trace, it looks like you're doing an intervisibility analysis. This makes a line feature between each pair of points which can 'see' each other.

It's running out of memory building the data structure to do this.

This can happen if

  • you have a lot of points (target or observer)
  • you have a flat terrain, so that each point can see most of the others
  • the search radius is too high

You probably need to reduce the number of observers and/or target points (maybe by taking a random sample).

Please also double check the search radius input value. If your DTM raster is in WGS84 then the radius is expressed in degrees. If you type "2" the search radius will be the equivalent distance of 2 degrees in latitude/longitude which is 1 deg = 1 km * (~111*cos(latitude) km) so more than 220km for low latitudes!

1
  • Thanks for this response, the final paragraph should;d be emphasised more strongly - I was using a DEM in WGS84, and the default radius was 5000, which clearly doesn't make sense. I ended up with a radius of 0.12 for WGS84 and it worked really well for my needs.
    – Axman6
    Jan 8, 2018 at 6:43

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