I'm newish to QGIS and am trying to select UK postcodes that are within the viewshed of at least one wind farm, however when I try to select only postcodes inside the viewshed, it simply selects all of them. I have already clipped to postcodes that are within 14km of a wind farm centroid, and need to now clip those based on whether they have a view of the wind farm centroid or not.

Basically, I calculated the viewshed, turned it into a polygon (Raster->conversion->polygonize), added rules to the new shapefile so that only the viewsheds would be colored/drawn, then used 'clip' under Vector->Geoprocessingtools->Clip. I then set the input layer to be the postcodes, and the clip layer as the viewshed polygon. But it's clipping all of the postcodes, rather than only those in the viewshed. I'll go into a bit more detail on what I've done/what outputs I'm getting below.

I have used the GBSRTM 90m as the elevation raster, and csv files with x-y coordinates for both postcodes and windfarm centroids. I then used the viewshed analysis plugin to calculate the binary viewsheds (using the windfarm centroids as the observer) and create a cumulative raster, which works very nicely.

Viewshed laid over postcodes viewsheds overlaid on postcodes You can see here that there are clearly postcodes that are outside of this polygon.However, it seems that it is making both 0 and 1 (view or no view) the same polygon, as when I 'clip by polygon' the resulting clip is of all the postcodes.

If I don't remove the rule 'no filter' it will fill the entire area of the elevation raster, rather than the areas with a viewshed. I have removed this, but the clipped postcodes are still all of the postcodes, rather than those within the viewshed, so I think that this has been turned into one polygon with subdivisions.

Fill covering entire work area: workspace

Is there a way to make it so that only the viewshed is turned into the polygon rather than then entire workspace? Or if not, is there a way to clip from only the viewshed part?


You can select the area with the "select area" once the layer is on "Toggle Editing"enter image description here. Once you select the area you need and go to vector-Geometry Tools-Export/Add geometry columns and you will have a new shp file with the data that you export.enter image description here It is also a good idea to save the original shp as a new file and to work on the duplicate. So if something goes wrong you will have a backup.

  • Firstly, thanks so much for answering this! I tried what you've said here, but it seems to be still selecting all of the postcodes rather than only those in the viewshed. Am I able to select only the visible points from the attribute table if I filter for visibility using the 'show features visible on map' option from the attribute table? Again, the help is much appreciated! – OMeyer May 21 '17 at 14:24
  • The problem was in the project, I must have done something wrong while trying to get the viewshed info on my own. I started from scratch following your directions and they worked perfectly. Thank you again! – OMeyer May 22 '17 at 10:02

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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