Find Point Clusters

Find Point Clusters

The FindPointClusters task finds clusters of point features within surrounding noise based on their spatial distribution.

This task uses unsupervised machine learning clustering algorithms to detect patterns of point features based solely on spatial location and, optionally, the distance to a specified number of features.

The result map shows each identified cluster as well as features that are considered noise. Multiple clusters will be assigned each color. Colors will be assigned and repeated so that each cluster is visually distinct from its neighboring clusters.

This task uses the DBSCAN, HDBSCAN, or OPTICS method to find clusters. If the method is not specified and the searchDistance value is not provided, the HDBSCAN method will be used. If the method is not specified and searchDistance value is provided, the DBSCAN algorithm will be used. DBSCAN will return clusters with similar densities and is only appropriate if there is a clear search distance to use for the analysis. HDBSCAN will use a range of distances to separate clusters of varying densities from sparser noise resulting in more data-driven clusters. OPTICS will use the distances between neighboring features to create a reachability plot, and use it to separate clusters of varying densities from noise.

Request URL

Use dark colors for code blocksCopy
1
http://<analysis url>/FindPointClusters/submitJob

Request parameters

ParameterDescription

analysisLayer

(Required)

The point feature layer for which clusters will be found.

Syntax: As described in detail in the Feature input topic, this parameter can be one of the following:

  • A URL to a feature service layer with an optional filter to select specific features
  • A feature collection

Examples:

  • {"url": <feature service layer url>, "filter": <where clause>}
  • {"layerDefinition": {}, "featureSet": {}, "filter": <where clause>}

minFeaturesCluster

(Required)

A double value that will be used as the minimum number of features to be considered a cluster. Any cluster with fewer features than the number provided will be considered noise.

Example: "minFeaturesCluster": 5

method

Specifies the method that will be used to find clusters. If the method is not specified and the searchDistance value is not provided, the HDBSCAN algorithm will be used. If the method is not specified and the searchDistance value is provided, the DBSCAN algorithm will be used.

This parameter is available in ArcGIS Enterprise 11.2 or higher.

Values:DBSCAN | HDBSCAN | OPTICS

Example: "method":"OPTICS"

searchDistance

A double value that will be used as the maximum distance to search for neighboring features.

The units of the search distance value is supplied by the searchDistanceUnit parameter.

Example: "searchDistance": 154

searchDistanceUnit

The linear unit that will be used with the distance value specified for searchDistance. You must provide a value if searchDistance has been set. The default is Miles.

Values: Feet | Miles | Meters | Kilometers

Example: "Units": "Kilometers"

sensitivity

A double value between 0 and 100 that determines the compactness of the clusters.

This parameter is available in ArcGIS Enterprise 11.2 or higher.

Example: "sensitivity": 22

timeField

Specifies the field in the analysisLayer value that contains a timestamp for each feature.

Example: "timeField": "start_time"

searchTimeInterval

A value that will be used to determine whether features form a space-time cluster. The search time interval spans before and after the time of each feature.

Example: "searchTimeInterval": 4

searchTimeUnit

The unit that will be used with the time value specified for searchTimeInterval. You must provide a value if searchTimeInterval has been set.

Values: Seconds | Minutes | Hours | Days | Weeks | Months | Years

Example: "searchTimeUnit": "Minutes"

outputName

The name of the output.

If provided, the task will create a feature service of the results. You define the name of the service. If an outputName value is not provided, the task will return a feature collection.

Syntax:

Use dark colors for code blocksCopy
1
2
3
4
5
{
  "serviceProperties": {
    "name": "<service name>"
  }
}

In ArcGIS Online or ArcGIS Enterprise 11.0 and later, you can overwrite an existing feature service by providing the itemId value of the existing feature service and setting the overwrite property to true. Including the serviceProperties parameter is optional. As described in the Feature output topic, you must either be the owner of the feature service or have administrative privileges to perform the overwrite.

Syntax:

Use dark colors for code blocksCopy
1
2
3
4
5
6
7
{

  "itemProperties": {
			"itemId": "<itemID of the existing feature service>",
			"overwrite": true
	}
}

or

Use dark colors for code blocksCopy
1
2
3
4
5
6
7
8
9
{
"serviceProperties": {
    "name": "<existing service name>"
  },
"itemProperties": {
				"itemId": "<itemID of the existing feature service>",
				"overwrite": true
	}
}

context

The Context parameter contains the following additional settings that affect task operation:

  • Extent (extent)—A bounding box that defines the analysis area. Only input features that intersect the bounding box will be analyzed.
  • Output spatial reference (outSR)—The output features will be projected into the output spatial reference.

Syntax:

Use dark colors for code blocksCopy
1
2
3
4
{
  "extent" : {extent},
  "outSR" : {spatial reference}
}

f

The response format. The default response format is html.

Values: html | json

Response

When you submit a request, the service assigns a unique job ID for the transaction. Syntax:

Use dark colors for code blocksCopy
1
2
3
4
{
"jobId": "<unique job identifier>",
"jobStatus": "<job status>"
}

After the initial request is submitted, you can use the jobId value to periodically check the status of the job and messages as described in Check job status. Once the job has successfully completed, you use the jobId value to retrieve the results. To track the status, you can make a request of the following form:

Use dark colors for code blocksCopy
1
http://<analysis url>/FindPointClusters/jobs/<jobId>

Access results

When the status of the job request is esriJobSucceeded, you can access the results of the analysis by making a request of the following form.

Use dark colors for code blocksCopy
1
http://<analysis url>/FindPointClusters/jobs/<jobId>/results/pointClustersResultLayer?token=<your token>&f=json
ParameterDescription

pointClustersResultLayer

The result of FindPointClusters is a layer containing clustered points.

Example:

Use dark colors for code blocksCopy
1
{"url":"http://analysis.arcgis.com/arcgis/rest/services/tasks/gpserver/findpointclusters/jobs/<jobId>/results/pointClustersResultLayer

The result has properties for parameter name, data type, and value. The contents of value depend on the OutputName value provided in the initial request.

  • If the OutputName value was provided, value contains the URL to the feature service layer.
Use dark colors for code blocksCopy
1
2
3
4
5
{
"paramName":"pointClustersResultLayer",
"dataType":"GPString",
"value":{"url":"<arcgis featureservice layer url>"}
}
  • If no OutputName value was provided, value contains a feature collection.
Use dark colors for code blocksCopy
1
2
3
4
5
{
"paramName":"pointClustersResultLayer",
"dataType":"GPString",
"value":{"featureCollection": ... }
}

See Feature Output for more information about how the result layer or collection is accessed.

Your browser is no longer supported. Please upgrade your browser for the best experience. See our browser deprecation post for more details.