Calculate Density (Standard Feature Analysis)

Summary

Creates a density map from point or line features by spreading known quantities of some phenomenon (represented as attributes of the points or lines) across the map. The result is a layer of areas classified from least dense to most dense.

Illustration

Calculate Density

Usage

  • For point input, each point should represent the location of some event or incident, and the result layer represents a count of the incident per unit area. A higher density value in a new location means that there are more points near that location. In many cases, the result layer can be interpreted as a risk surface for future events. For example, if the input points represent locations of lightning strikes, the result layer can be interpreted as a risk surface for future lightning strikes.

  • For line input, the line density surface represents the total amount of line that is near each location. The units of the calculated density values are the length of line per unit area. For example, if the lines represent rivers, the result layer will represent the total length of rivers that are within the search radius. This result can be used to identify areas that are hospitable to grazing animals.

  • Other use cases of this tool include the following:

    • Creating crime density maps to help police departments properly allocate resources to high crime areas.
    • Calculating densities of hospitals within a county. The result layer will show areas with high and low accessibility to hospitals, and this information can be used to decide where new hospitals should be built.
    • Identifying areas that are at high risk of forest fires based on historical locations of forest fires.
    • Locating communities that are far from major highways in order to plan where new roads should be constructed.

Parameters

LabelExplanationData Type
Input Features

The point or line features from which to calculate density.

Feature Set
Output Name

The name of the output layer to create on your portal.

String
Count Field
(Optional)

A field specifying the number of incidents at each location. For example, if you have points that represent cities, you can use a field representing the population of the city as the count field, and the resulting population density layer will calculate larger population densities near cities with larger populations.

If not specified, each location will be assumed to represent a single count.

Field
Cell Size
(Optional)

This value is used to create a mesh of points where density values are calculated. The default is approximately 1/1000th of the smaller of the width and height of the analysis extent as defined in the context parameter. The smaller the value, the smoother the polygon boundaries will be. Conversely, with larger values, the polygon boundaries will be more coarse and jagged.

Double
Cell Size Units
(Optional)

The units of the cell size value. You must provide a value if cell size has been set.

  • Miles —Miles
  • Feet —Feet
  • Kilometers —Kilometers
  • Meters —Meters
String
Radius
(Optional)

A distance specifying how far to search to find point or line features when calculating density values. For example, if you provide a search distance of 1,800 meters, the density of any location in the output layer is calculated based on features that are within 1,800 meters of the location. Any location that does not have any incidents within 1,800 meters will receive a density value of zero.

If no distance is provided, a default will be calculated based on the locations of the input features and the values in the count field (if a count field is provided).

Double
Radius Units
(Optional)

The units of the radius value. You must provide a value if a radius has been set.

  • Miles —Miles
  • Feet —Feet
  • Kilometers —Kilometers
  • Meters —Meters
String
Bounding Polygons
(Optional)

A layer specifying the polygons where you want densities to be calculated. For example, if you are interpolating densities of fish within a lake, you can use the boundary of the lake in this parameter and the output will only draw within the boundary of the lake.

Feature Set
Area Units
(Optional)

The units of the calculated density values.

  • Square miles —Square miles
  • Square kilometers —Square kilometers
String
Classification Type
(Optional)

Determines how density values will be classified into polygons.

  • Equal interval — Polygons are created such that the range of density values is equal for each area.
  • Geometric interval — Polygons are based on class intervals that have a geometric series. This method ensures that each class range has approximately the same number of values within each class and that the change between intervals is consistent.
  • Natural breaks — Class intervals for polygons are based on natural groupings of the data. Class break values are identified that best group similar values and that maximize the differences between classes.
  • Equal area — Polygons are created such that the size of each area is equal. For example, if the result has more high-density values than low-density values, more polygons will be created for high densities.
  • Standard deviation — Polygons are created based upon the standard deviation of the predicted density values.
String
Number of Classes
(Optional)

This value is used to divide the range of predicted values into distinct classes. The range of values in each class is determined by the classification type. Each class defines the boundaries of the result polygons.

The default is 10 and the maximum is 32.

Long

Derived Output

LabelExplanationData Type
Output Layer

The output polygon layer with classified density values.

Feature Set

arcpy.sfa.CalculateDensity(inputLayer, outputName, {field}, {cellSize}, {cellSizeUnits}, {radius}, {radiusUnits}, {boundingPolygonLayer}, {areaUnits}, {classificationType}, {numClasses})
NameExplanationData Type
inputLayer

The point or line features from which to calculate density.

Feature Set
outputName

The name of the output layer to create on your portal.

String
field
(Optional)

A field specifying the number of incidents at each location. For example, if you have points that represent cities, you can use a field representing the population of the city as the count field, and the resulting population density layer will calculate larger population densities near cities with larger populations.

If not specified, each location will be assumed to represent a single count.

Field
cellSize
(Optional)

This value is used to create a mesh of points where density values are calculated. The default is approximately 1/1000th of the smaller of the width and height of the analysis extent as defined in the context parameter. The smaller the value, the smoother the polygon boundaries will be. Conversely, with larger values, the polygon boundaries will be more coarse and jagged.

Double
cellSizeUnits
(Optional)

The units of the cell size value. You must provide a value if cell size has been set.

  • MILESMiles
  • FEETFeet
  • KILOMETERSKilometers
  • METERSMeters
String
radius
(Optional)

A distance specifying how far to search to find point or line features when calculating density values. For example, if you provide a search distance of 1,800 meters, the density of any location in the output layer is calculated based on features that are within 1,800 meters of the location. Any location that does not have any incidents within 1,800 meters will receive a density value of zero.

If no distance is provided, a default will be calculated based on the locations of the input features and the values in the count field (if a count field is provided).

Double
radiusUnits
(Optional)

The units of the radius value. You must provide a value if a radius has been set.

  • MILESMiles
  • FEETFeet
  • KILOMETERSKilometers
  • METERSMeters
String
boundingPolygonLayer
(Optional)

A layer specifying the polygons where you want densities to be calculated. For example, if you are interpolating densities of fish within a lake, you can use the boundary of the lake in this parameter and the output will only draw within the boundary of the lake.

Feature Set
areaUnits
(Optional)

The units of the calculated density values.

  • SQUAREMILESSquare miles
  • SQUAREKILOMETERSSquare kilometers
String
classificationType
(Optional)

Determines how density values will be classified into polygons.

  • EQUALINTERVAL Polygons are created such that the range of density values is equal for each area.
  • GEOMETRICINTERVAL Polygons are based on class intervals that have a geometric series. This method ensures that each class range has approximately the same number of values within each class and that the change between intervals is consistent.
  • NATURALBREAKS Class intervals for polygons are based on natural groupings of the data. Class break values are identified that best group similar values and that maximize the differences between classes.
  • EQUALAREA Polygons are created such that the size of each area is equal. For example, if the result has more high-density values than low-density values, more polygons will be created for high densities.
  • STANDARDDEVIATION Polygons are created based upon the standard deviation of the predicted density values.
String
numClasses
(Optional)

This value is used to divide the range of predicted values into distinct classes. The range of values in each class is determined by the classification type. Each class defines the boundaries of the result polygons.

The default is 10 and the maximum is 32.

Long

Derived Output

NameExplanationData Type
outputLayer

The output polygon layer with classified density values.

Feature Set

Environments

Licensing information

  • Basic: Requires your account in ArcGIS Enterprise to have the Perform Analysis privilege
  • Standard: Requires your account in ArcGIS Enterprise to have the Perform Analysis privilege
  • Advanced: Requires your account in ArcGIS Enterprise to have the Perform Analysis privilege

Related topics