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.
Larger values of the radius parameter produce a density raster that is smoother. Smaller values produce a raster that changes more abruptly. If no value is provided, the tool will calculate one based on the number of points and their coordinates.
Only the points or portions of a line that fall within the neighborhood are considered in calculating density. If no points or line sections fall within the neighborhood of a particular cell, that density of that cell will be zero.
Parameter | Explanation |
---|---|
inputPointOrLineFeatures |
The input point or line features that will be used to calculate the density raster. |
outputName |
The name of the output raster service. 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. |
countField (Optional) |
Provide a field indicating the number of incidents at each location. For example, if you are making a population density raster, and the input points are cities, it would be appropriate to use the population of the city for the count field so cities with larger populations have more impact on the density calculations. |
searchDistance (Optional) |
Choose the search distance and units for the distance. When calculating the density of a cell, all features within this distance will be used in the density calculation for that cell. The units can be Kilometers, Meters, Miles, or Feet. The default units are Meters. |
outputAreaUnits (Optional) |
Choose the area units. Density is count divided by area, and this parameter sets the units of the area in the density calculation.
|
outputCellSize (Optional) |
Set the cell size and units for the output raster. The units can be Kilometers, Meters, Miles, or Feet. The default units are Meters. |
inBarriers (Optional) |
There is no explanation for this parameter. |
context (Optional) |
There is no explanation for this parameter. |
CalculateDensity example 1 (Python window)
This example creates a density image service raster from points with a population field.
import arcpy arcpy.CalculateDensity_ra('https://MyPortal.esri.com/server/rest/services/Hosted/myPoints/FeatureServer/0', 'outImgServ', 'Population','150000 Meters', 'Square Kilometers','10000 Meters')
CalculateDensity example 2 (stand-alone script)
This example creates a density image service raster from points with a population field.
#------------------------------------------------------------------------------- # Name: CalculateDensity_example02.py # Description: Creates a density image service raster from points with a population. # # Requirements: ArcGIS Image Server # Import system modules import arcpy # Set local variables inPoints = 'https://MyPortal.esri.com/server/rest/services/Hosted/myPoints/FeatureServer/0' outRaster = 'outImgServ' inField = 'Population' searchDistance = '150000 Meters' areaUnit = 'Square Kilometers' outCellSize = '10000 Meters' # Execute CalculateDensity arcpy.CalculateDensity_ra(inPoints, outRaster, inField, searchDistance, areaUnit, outCellSize)
There are no tags for this item.
There are no credits for this item.
There are no use limitations for this item.