Thursday, 20 August 2015

qgis - Extract highest point in raster and convert to point vector


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.



Answer



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


No comments:

Post a Comment

arcpy - Changing output name when exporting data driven pages to JPG?

Is there a way to save the output JPG, changing the output file name to the page name, instead of page number? I mean changing the script fo...