I have LiDAR data and I've made a Digital Surface Model (DSM):

DEM with 3 buildings

I've made a visibility analysis for 3 buildings with this model:

Visibility of the 3 buildings

My goal is to know from where the buildings are visible, not what do you see from them. But as you can see in the orthophoto, there are a few forest areas where the trees block the view of the buildings from the ground level and yet, they appear as visible (from the top of the trees I guess). The same happens with the roof of another building:

Visibility over orto

Is there any way to use a layer (vector or raster) as a mask for non-visible areas when you run a visibility analysis?

I'm currently working with ArcMap 10.3 but I'm open to suggestions with QGIS 3 as well.

  • I've thought to isolate the buildings and vegetation and make a raster with all the others values as non-data and make a difference with visibility, but it is not accurate either because behind the buildings or vegetation remain as visible and it's not true. Feb 20, 2019 at 11:10

2 Answers 2


with a dsm, observer will be considered on the surface (top of trees), which is indeed unrealistic. My suggested workaround is to only keep the boundaries of your forest and set the ground level in the middle. You can do this by, e.g.,

  1. computing DSM - DEM (which gives you the Digital height model)
  2. using focal stat to compute the local minimum of your DHM (in a 3by 3 window)
  3. computing DSM- local min of DHM
  • Thanks for the suggestion. I've tried this and it only improves slightly the result. I guess it depends of the complexity of the area, and may work better in other sites. Feb 25, 2019 at 12:30

The Visibility tool supports a Mask environment setting, which does what you want:

Tools that honor the Mask environment will only consider those cells that fall within the analysis mask in the operation.

The mask can be a raster or a feature dataset. One can set the mask as an environment setting directly from the GUI or using the Python window:

import arcpy
from arcpy import env
from arcpy.sa import * ## requires Spatial Analyst

arcpy.env.workspace = "C:/data"
arcpy.env.mask = "myMask"

# set local variables
inRaster = "elevation"
buildings = "building_points.shp"

outRaster = arcpy.sa.Visibility(inRaster, buildings)

The Observer Points tool is another option for identifying which observer points are visible from the raster surface locations and it also supports a mask as environment setting.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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