The Calculate Density task 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.
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.
Request URL
http://<analysis url>/CalculateDensity/submitJob
Request Parameters
Parameter | Description |
---|---|
| The point or line features from which to calculate density. Syntax: As described in detail in the Feature input topic, this parameter can be one of the following:
Examples:
|
| 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. |
| This value is used to create a mesh of points where density values are calculated. The default is approximately 1/1000
th
of the smaller of the width and height of the analysis extent as defined in the |
| The units of the Values: Example: |
| 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). Example: |
| The units of the Values: The default is based on the units specified in your profile and will be either Example: |
| A layer specifying the polygon(s) 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. Syntax: As described in detail in the Feature input topic, this parameter can be one of the following:
|
| The units of the calculated density values. Values: The default is based on the units specified in your profile and will be either Example: |
| Determines how density values will be classified into polygons. Values:
The default is Example: |
| 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 The default is Example: |
|
If provided, the task will create a feature service of the results. You define the name of the service. If an Syntax:
In ArcGIS Online or ArcGIS Enterprise 10.9.1 and later, you can overwrite an existing feature service by providing the Syntax:
or
|
|
The Context parameter contains the following additional settings that affect task operation:
Syntax:
|
| The response format. The default response format is Values: |
Response
When you submit a request, the service assigns a unique job ID for the transaction.
Syntax:
{
"jobId": "<unique job identifier>",
"jobStatus": "<job status>"
}
After the initial request is submitted you can use the job
to periodically check the status of the job and messages as described in the topic Check job status. Once the job has successfully completed, you use the job
to retrive the results. To track the status, you can make a request of the following form:
http://<analysis url>/CalculateDensity/jobs/<jobId>
Accessing results
When the status of the job request is esri
, you can access the results of the analysis by making a request of the following form:
http://<analysis url>/CalculateDensity/jobs/<jobId>/results/<output parameter name>?token=<your token>&f=json
Parameter | Description |
---|---|
| The polygon features representing density. Each polygon will surround predicted values based on the The result has the following fields, where <unit> is based on the
Request example:
The result has properties for parameter name, data type, and value. The contents of value depends upon the
See Feature Output for more information about how the result layer or collection is accessed. |