3

I have a raster DEM and I want to extract from it the highest point found in every polygon of a polygon shapefile.

The result that I would like to obtain would be a point shapefile with 2 collumns: polygon ID and height.

I'm working in QGIS.

I tried SAGA raster statistics to polygon, but the result is just a polygon with the height value. I am trying to extract the point to a point vector layer.

  • Welcome to GIS SE. As a new user, please take the Tour. We are not a tutorial site. All questions are expected to contain not only what you need to do, but what you have attempted, and what has gone wrong. – Vince Sep 19 '17 at 10:31
2

This is basically the same as the one provided by @firefly-orange already.

  1. Start SAGA Raster values to points tool. Select your raster layer as Grids.
  2. Select your polygon layer in the Polygon[optional] field and make sure to click on Iterate over this layer button. Then Run.

enter image description here

  1. You will obtain as many layers as your polygons. It will appear in reverse order on the layers panel, all named "Shapes". So you would probably want to rename these point layers to represent each of your polygon.
  2. Open any attribute table of newly created Shapes layer, and click twice on the header of your value column (the field name is automatically taken from your raster layer). The row with highest value comes on top. By hitting [CTRL+J] keys or Zoom map to the selected rows button, it will take you to the highest point.

enter image description here

5

You can use saga - raster values to points. Then use "join attributes by location" to join the points to the polygon layer. You can then select the max value from the attribute table of the joined points/polygon layer using "statistics by categories"

  • Thanks for the help. But the problem i'm finding with this solution, is that the point shapefile doesn't make a distinction between polygons. When i ask for the max value of the layer, it returns me the maximum value of all polygons. What I am expecting is the maximum value for each polygon. Can anyone help me' – Hugo Silva Sep 19 '17 at 12:02
  • @HugoSilva Sorry I missed a step. I've edited my answer. Should work now – firefly-orange Sep 19 '17 at 12:14
  • 2
    +1 and just to add; Raster values to points has an option Polygons to which you can assign your polygon layer. Then by activating Iterate over this layer (green rounded arrow), you can produce 1 point layer per each polygon. – Kazuhito Sep 19 '17 at 12:44
  • Sorry, i'm a bit new in working with rasters. statistics by categories outputs a csv file. Is there anyother workaround? I was expecting some command to extract the location and height of the highest point in a polygon. Any clues? – Hugo Silva Sep 19 '17 at 13:40
  • Try 'zonal statistics' from the processing toolbox – firefly-orange Sep 19 '17 at 13:48

Your Answer

By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

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