The spatial analysis service solves complex location-oriented problems using spatial data. It provides different types of analysis to summarize data, find locations, complete data enrichment, analyze patterns, use proximity, and manage data. The spatial analysis service works with hosted feature layers or feature collections. To perform spatial analysis with raster data, use the Raster Analysis service.
Key featuresTo learn more about the spatial analysis service features and capabilities, go to the Job requests overview.
Access the serviceTo access the spatial analysis service, you need the following:
This example shows how to find locations with statistically significant clustering of points using the FindHotSpots request.
1. Send a job request to find hot spots.
RequestResponse
POST https://<analysis service>.arcgis.com/arcgis/rest/services/tasks/GPServer/FindHotSpots/submitJob HTTP/1.1
content-type: application/x-www-form-urlencoded
f=json
&token=<ACCESS_TOKEN>
&analysisLayer={"url":"https://services3.arcgis.com/GVgbJbqm8hXASVYi/arcgis/rest/services/Auto_Theft/FeatureServer/0"}
&shapeType=fishnet
&returnDirections=true
&context={
"extent":{
"xmin":-13645650.815000549,
"ymin":4538996.0112298895,
"xmax":-13617426.442306284,
"ymax":4555563.73711068,
"spatialReference":{
"wkid":102100,
"latestWkid":3857
}
}
}
&outputName={
"serviceProperties": {
"name": "AutoTheftHotSpots"
}
}
{
"jobId":"jf67a9772bc9447b5a32d18d95cc296d5",
"jobStatus":"esriJobSucceeded",
"results":{}
},
"inputs":{},
"messages":[]
}
2. Check the job status using the provided jobID until the job has succeeded or failed. Learn more about submitting GP Jobs.
RequestResponse
POST https://<analysis service>.arcgis.com/arcgis/rest/services/tasks/GPServer/FindHotSpots/jobs/jf67a9772bc9447b5a32d18d95cc296d5 HTTP/1.1
content-type: application/x-www-form-urlencoded
f=json
&token=<ACCESS_TOKEN>
{
"jobId":"jf67a9772bc9447b5a32d18d95cc296d5",
"jobStatus":"esriJobSucceeded",
"results":{
"hotSpotsResultLayer":{
"paramUrl":"results/hotSpotsResultLayer"
},
"processInfo":{
"paramUrl":"results/processInfo"
}
},
"inputs":{},
"messages":[]
}
3. Once the job has succeeded, get the results.
RequestResponse
POST https://<analysis service>.arcgis.com/arcgis/rest/services/tasks/GPServer/FindHotSpots/<jobID>/results/hotSpotsResultLayer HTTP/1.1
content-type: application/x-www-form-urlencoded
f=json
&token=<ACCESS_TOKEN>
&returnType="data"
{
"paramName":"hotSpotsResultLayer",
"dataType":"GPString",
"value":{
"url":"https://services3.arcgis.com/gpy4De51GXcwFEZo/arcgis/rest/services/AutoTheftHotSpots/FeatureServer/0",
"itemId":"e0852eef19094a71be2d04399b6c5509"
}
}
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4