[Qgis-user] Select heights from a raster layer

CARLO CORMIO carlo.cormio at gmail.com
Thu Mar 10 09:08:56 PST 2016


Hi Claus,

> ---------- Messaggio inoltrato ----------
> From: Claus Backalarz <cb at delta.dk>
> To: "qgis-user at lists.osgeo.org" <qgis-user at lists.osgeo.org>
> Cc:
> Date: Thu, 10 Mar 2016 11:52:15 +0000
> Subject: [Qgis-user] Select heights from a raster layer
>
> But we want with (a lot) of polygons representing buildings to select all
surface heights inside this polygons. The selected heights should afterward
be saved as a reduced raster layer or, even better, as a shape file of
points with an attribute for the heights. In other words as a layer of
points with one and only one attribute, the surface height.
>
> Do anybody have a useful way out of this problem ?
>
The following is one of many ways to reach your goal (mainly coming from
GRASS GIS approach and tools but should be feasible with QGIS, as you can
also take advantage of processing tools):

1. Rasterize your polygon shapefile. Transform it in a raster map with the
same resolution of your DSM. Each rasterized polygon will have the same
value.

2. Use raster map algebra to select DSM height values from pixels that
overlap rasterized polygon map, and set to null all other values.

The result should be the map you are looking for. If you need it as a point
map, simply vectorize the raster map. You will get a vector point map with
each point representing a pixel and height as an attribute (unless you want
to create 3d points).
You can now export the result in any file format.

Hope this helps, sorry if I don't provide you correspondence with QGIS
tools to be used, but the procedure should be clear enough.

Bye,

Carlo
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/qgis-user/attachments/20160310/b392412a/attachment.html>


More information about the Qgis-user mailing list