shadow: R Package for Geometric Shadow Calculations in an Urban Environment

This paper introduces the shadow package for R. The package provides functions for shadow related calculations in the urban environment, namely shadow height, shadow footprint and Sky View Factor (SVF) calculations, as well as a wrapper function to estimate solar radiation while taking shadow effects into account. All functions operate on a layer of polygons with a height attribute, also known as “extruded polygons” or 2.5D vector data. Such data are associated with accuracy limitations in representing urban environments. However, unlike 3D models, polygonal layers of building outlines along with their height are abundantly available and their processing does not require specialized closed-source 3D software. The present package thus brings spatio-temporal shadow, SVF and solar radiation calculation capabilities to the open-source spatial analysis workflow in R. Package functionality is demonstrated using small reproducible examples for each function. Wider potential use cases include urban environment applications such as evaluation of micro-climatic influence for urban planning, studying urban climatic comfort and estimating photovoltaic energy production potential.

Michael Dorman , Evyatar Erell , Adi Vulkan , Itai Kloog

Supplementary materials

Supplementary materials are available in addition to this article. It can be downloaded at

CRAN packages used

insol, shadow, sp, threejs, raster, rgeos, maptools, parallel, plot3D, sf

CRAN Task Views implied by cited packages

Spatial, SpatioTemporal


Text and figures are licensed under Creative Commons Attribution CC BY 4.0. The figures that have been reused from other sources don't fall under this license and can be recognized by a note in their caption: "Figure from ...".


For attribution, please cite this work as

Dorman, et al., "The R Journal: shadow: R Package for Geometric Shadow Calculations in an Urban Environment", The R Journal, 2019

BibTeX citation

  author = {Dorman, Michael and Erell, Evyatar and Vulkan, Adi and Kloog, Itai},
  title = {The R Journal: shadow: R Package for Geometric Shadow Calculations in an Urban Environment},
  journal = {The R Journal},
  year = {2019},
  note = {},
  doi = {10.32614/RJ-2019-024},
  volume = {11},
  issue = {1},
  issn = {2073-4859},
  pages = {287-309}