2

Welcome, this is my first post. I have vector layer with buildings heights and vector/raster DEM file. I need to create solar maps with sun radiance values on the roof (and on surface, ofc). I am trying merge buildings with DEM, but I dont know how excatly to do it. I converted vector buildings to raster, made pixels outside buildings to null, and tried merge this file in 'r.mapcalc'. I think I should use 'if' function, but I dont know to how. Could anybody help me with it? It is possible to make flat surface in DEM under buidings in order to place buildings there?

  • please see my answer. I think a good start for you is to Google mentioned tools to start learn them – michael Sep 16 '15 at 15:58
1

The solution i would use to solve this problem is:

  1. Rasterize the building vector layer on the same extent/resolution as the DEM to get a raster with height values where are Buildings and NoData elsewhere (with v.to.rast.attribute for example)
  2. Performing an addition of this two raster with a raster Calculator (r.mapcalc for example)

This would result in a DEM where the building height will be add to the ground height where there is a building.

0

Generall solution for this kind of tasks:

Every desent GIS SW have tools that extract raster value into vector layer. They will attach on single button click to every point from the vector layer the corresponding underlaying raster value (kind of interpolation).

Now, building is polygon of lines. These kind of tools work usually on points. There are several approaches:

  1. Work on building vertices

  2. Transform building to single point at his centroid

  3. Break each line to several points until the desired resolution

  • Thanks. I try to export raster to vector, and merge this. Do you know how to merge raster with 'if' function in GRASS GIS? – mrkkr91 Sep 17 '15 at 8:48
  • @mrkkr91 I think you not totally understood the whole concept of extract raster value to vector layer. It's a build in tool in gis sw so you don't need to write code or sql. you just need to supply raster and vector layer and make sure the vector layer is points. – michael Sep 17 '15 at 8:52
  • I'm not sure we both understand each other. Should I convert raster DEM to vector in e.g. qgis/grass, and later vector polygon buildings to point building vertices? – mrkkr91 Sep 17 '15 at 9:03
  • @mrkkr91 You don't touch the raster layer, you need to work with vector layer of points, you have buildings, they probably polygons so convert them in 1 of the 3 ways I mentioned in my answer to points. – michael Sep 17 '15 at 9:10
  • Ok, I understand. If I would have buildings converted to points what I have to do later to merge this to DEM? – mrkkr91 Sep 17 '15 at 9:20

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.