Sun Shadow Frequency (3D Analyst)


Calculates the number of times a fixed position on a surface has its direct sight line to the sun obstructed by multipatch features.


Sun Shadow Frequency tool result


  • The sun position will be calculated from the start date and time to the end date and time. If a time interval is specified, the sun position will be iteratively calculated from the start time to the end time for each day between the start date and end date. Any time the sun is not above the horizon will be skipped.

  • The output raster's cell values represent the number of times a given cell is in a shadow. The maximum possible value for any cell corresponds to the number of times the sun is positioned above the horizon.

  • Consider defining a maximum shadow length when generating results for sun inclination angles near sunrise and sunset to avoid factoring the impact of long shadow footprints. Enforcing a distance also helps improve the tool's performance.


arcpy.3d.SunShadowFrequency(in_features, ground, out_raster, {cell_size}, {start_time}, {end_time}, {time_interval}, {time_zone}, {dst}, {max_shadow_length})
ParameterExplanationData Type

The multipatch features that will constitute the source of obstruction for sunlight.

Feature Layer

The ground surface that will define the positions where sunlight obstruction will be evaluated.

Raster Layer

The output raster whose cell values reflect the number of times the corresponding ground height position was obstructed by the input features.

Raster Dataset

The cell size of the output raster.

Linear Unit

The date and time sun position calculations will begin. The default value is the date and time the tool is initialized.


The date and time sun position calculations will end.


The interval that will be used to calculate sun positions from the start date and time to the end date and time.

Time Unit

The time zone that corresponds with the specified input times used to determine the relative position of the sun. The list of available values is defined by the operating system but will default to the time zone of the current time on the computer.


Specifies whether the specified times will be adjusted for daylight saving time.

  • DSTThe input times will be adjusted for daylight saving time.
  • NO_DSTThe input times will not be adjusted for daylight saving time. This is the default.

The maximum distance that a shadow will be cast from an input feature during calculation. Consider defining this value when processing times where the sun position has a low altitude angle, as the resulting shadows will be long and potentially add unnecessary processing time.

Linear Unit

Code sample

SunShadowFrequency example 1 (Python window)

The following sample demonstrates the use of this tool in the Python window.

import arcpy
arcpy.env.workspace = 'd:\\data'
arcpy.ddd.SunShadowFrequency('Buildings.shp', 'DEM.tif', 'June_Shade.tif',
                             '4 Feet', '6/1/2018 10:00 AM', '6/30/2018 4:00 PM',
                             '15 Minutes', 'Pacific Standard Time', 'NO_DST')

Licensing information

  • Basic: Requires 3D Analyst
  • Standard: Requires 3D Analyst
  • Advanced: Requires 3D Analyst

Related topics