The Calculate Density tool takes known quantities of some phenomenon and creates a density map by spreading these quantities across the map.
To run this tool, the portal must be configured for raster analysis.
This functionality is currently only supported in Map Viewer Classic (formerly known as Map Viewer). It will be available in a future release of the new Map Viewer. If you do not see this tool in Map Viewer Classic, contact your organization administrator. Your portal may not be configured for raster analysis, or you may not have the privileges required to run the tool.
Some example applications 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 to plan where new roads should be constructed.
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 larger 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.
The parameters for this tool are listed in the following table:
|Choose input point or line layer from which to calculate density|
The input point or line that will be used to calculate density.
|Use a count field (optional)|
Provide 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 the default choice of None is used, each location will be assumed to represent a single count.
|Search distance (optional)|
Enter 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 10,000 meters, the density of any location in the output layer is calculated based on features that are within 10,000 meters of the location. Any location that does not have any incidents within 10,000 meters will receive a density value of zero.
If no distance is provided, a default will be calculated that is based on the locations of the input features and the values in the count field (if a count field is provided).
|Output area units (optional)|
Specify the output area unit. Density is count divided by area, and this parameter specifies the unit of the area in the density calculation.
The available areal units are Square Miles, Square Feet, Square Meters, and Square Kilometers.
|Output cell size (optional)|
The cell size and unit for the output rasters.
The units can be kilometers, meters, miles, or feet.
|Choose barrier features (optional)|
The dataset that defines the barriers.
The barriers can be a feature layer of polyline or polygon features.
|Result layer name|
The name of the layer that will be created in My Content and added to the map. The default name is based on the tool name and the input layer name. If the layer already exists, you will be prompted to provide another name.
You can specify the name of a folder in My Content where the result will be saved using the Save result in drop-down box.
Analysis environment settings are additional parameters that affect a tool's results. You can access the tool's analysis environment settings by clicking the gear icon at the top of the tool pane.
This tool honors the following Analysis Environments:
- Output coordinate system—Specifies the coordinate system of the output layer.
- Extent—Specifies the area to be used for analysis.
- Snap Raster—Adjusts the extent of the output so it matches the cell alignment of the specified snap raster layer.
- Cell size—The cell size to use in the output layer.
- Mask—Specifies a mask layer, where only the cells that fall within the mask area will be used for analysis.
Similar tools and raster functions
Use Calculate Density tool to take known quantities of some phenomenon and create a density map by spreading these quantities across the map. Other tools may be useful in solving similar but slightly different problems.
Map Viewer Classic analysis tools and raster functions
Use the Kernel Density raster function to take known quantities of some phenomenon and create a density map by spreading these quantities across the map. Other tools may be useful in solving similar but slightly different problems.
ArcGIS Pro analysis tools and raster functions
The Kernel Density geoprocessing tool is available in the Spatial Analyst toolbox.
The Calculate Density tool is available in the Raster Analysis toolbox.
Kernel Density is available as a raster function.
ArcGIS Enterprise developers resources
If you are working in the ArcGIS REST API, use the CalculateDensity task.
If you are working in ArcGIS API for Python, use kernel_density from the arcgis.raster.functions.gbl module.