I have a DEM with a good precision (0,5 x 0,5 m/pix LiDAR) and I´m looking for the way to obtain a raster (or shapefile) with the shadow of the trees located in that place for a whole day (ideally winter solstice)

enter image description here

Is it possible with some tool to calculate it through QGIS?

My intention is to use this raster (or shape) with the maximum shadow to restrict the installation area of a solar power plant.

I have more information, like the height and canopy diameter of each tree.


1 Answer 1


Use r.sun as suggested in Command r.sunmask in GRASS.

As the input to r.sun build a DSM raster from data (i.e., the trees must be part of the elevation raster, if they are not already).


r.sun dsm day=355 time=9 incidout=shadowed_dsm

Pixels with NULL are shadowed.


r.sun -s dsm day=355 time=9 incidout=shadowed_dsm 

Pixels with zero values are shadowed.

Pick a day which correspond to winter solstice. Set a specific time of day (run r.sun varying the time of the day, and merge output rasters later).

Be aware of the Coordinate Reference System from the DSM. If coordinates are latitude-longitude (degrees), elevation units need to be in meters. Otherwise, x, y and z must have the same unit. Also, from r.sun documentation, the DSM must be a floating point (FCELL) raster.

After finding clear areas of shadows, consider studying if face orientation (aspect) will make a difference for the solar power plant location. If in the North hemisphere, perhaps choosing a south oriented surface will help.


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.