A generate tessellations analysis resulting in a new layer with 1 mile hexagon bins created for a study area in Auckland.
What is a generate tessellation analysis? A generate tessellation analysis is the process of creating equally sized square, hexagon, triangle, or diamond geometry bins for an area or extent. To execute the analysis, use the spatial analysis service and the Generate Tessellations
operation.
You typically generate tessellations to create regularly shaped areas that can be used in subsequent analysis.
Real-world examples of this analysis include the following:
Enriching the polygons with data from the GeoEnrichment service . Aggregating and summarize high-density point data. Visualizing how best to allocate resources for projects such as reforestation. How to generate tessellations Review the parameters for the Generate Tessellations
operation. Send a request to get the spatial analysis service URL. Execute a job request with the following URL and parameters: URL: https: //< YOUR_ ANALYSIS_ SERVICE>/arcgis/rest/services/tasks/GPServer/Generate Tessellations/submit Job
Parameters:bin Type
: The tessellation shape.bin Size
: The size of each bin. output Name
: A string representing the name of the hosted feature layer to return with the results. Check the status . Get the output layer results . To see examples using ArcGIS API for Python, ArcGIS REST JS, and the ArcGIS REST API, go to Examples below.
URL request
Use dark colors for code blocks Copy
1
http : //<YOUR_ANALYSIS_SERVICE>/arcgis/rest/services/tasks/GPServer/GenerateTessellations/submitJob?<parameters>
Required parameters Name Description Examples f
The format of the data returned. f=json
f=pjson
token
An OAuth 2.0 access token . Learn how to get an access token in Security and authentication . token=< ACCESS_ TOKEN>
bin Type
The tessellation shape. HEXAGON
, SQUARE
, DIAMOND
, TRIANGLE
, TRANSVERSEHEXAGON
bin Size
The size of each bin. 500
Key parameters Name Description Examples bin Size Unit
The unit to be used with the specified value in bin Size
. Feet
,Miles
,Kilometers
extent Layer
The extent that the tessellations will cover. {"url":"https: //services3.arcgis.com/GVgb Jbqm8h XASVYi/arcgis/rest/services/Portland_ boundary/Feature Server/0"}
output Name
A string representing the name of the hosted feature layer to return with the results. NOTE : If you do not include this parameter, the results are returned as a feature collection (JSON). {"service Properties": {"name": "< SERVICE_ NAME>"}}
context
A bounding box or output spatial reference for the analysis. "extent":{"xmin: ", "ymin: ", "xmax: ", "ymax: "}
Code examples Generate hexagon bins This example uses the Generate Tessellations
operation to create hexagon bins in a polygon (boundary) by specifying the bin Type
value as a hexagon
with a bin Size
value of 1
mile.
Generate tessellations analysis creating 1 mile hex bins (1 mile) within a polygon of the Santa Monica mountains.
APIs ArcGIS API for Python ArcGIS API for Python ArcGIS REST JS
Expand
Use dark colors for code blocks Copy
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
results = generate_tessellation(
bin_size= 1 ,
bin_type= "HEXAGON" ,
bin_size_unit= "Miles" ,
intersect_study_area= True ,
extent_layer= "https://services3.arcgis.com/GVgbJbqm8hXASVYi/arcgis/rest/services/Boundary/FeatureServer/0" ,
# Outputs results as a hosted feature service.
output_name= "Generate tessellation results" ,
)
Service requests 1. Get the analysis service URL 2. Submit job 3. Check job status 4. Get results
Request HTTP HTTP cURL
Use dark colors for code blocks Copy
1
2
3
4
5
POST arcgis.com/sharing/rest/portals/self HTTP/1.1
Content-Type : application/x-www-form-urlencoded
&f=json
&token= < ACCESS_TOKEN >
Response (JSON)
Use dark colors for code blocks Copy
1
2
3
4
5
6
7
8
9
10
11
{
"helperServices" : {
// Other parameters
"analysis" : {
"url" : "https://<YOUR_ANALYSIS_SERVICE>/arcgis/rest/services/tasks/GPServer"
},
"geoenrichment" : {
"url" : "https://geoenrich.arcgis.com/arcgis/rest/services/World/GeoenrichmentServer"
}
}
}
Request HTTP HTTP cURL
Use dark colors for code blocks Copy
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
POST <YOUR_ANALYSIS_SERVICE> /arcgis/ rest /services/ tasks /GPServer/G enerateTessellations /submitJob HTTP/ 1.1
Content-Type: application/x-www-form-urlencoded
&f=json
&token=<ACCESS_TOKEN>
&binType=HEXAGON
&extentLayer={ "url" : "https://services3.arcgis.com/GVgbJbqm8hXASVYi/arcgis/rest/services/Boundary/FeatureServer/0" , "name" : "Boundary" }
&intersectStudyArea= true
&binSize= 1
&binSizeUnit=Miles
&outputName={ "serviceProperties" :{ "name" : "Generate tessellations results" }}
Response (JSON)
Use dark colors for code blocks Copy
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
{
"jobId" : "<JOB_ID>" ,
"jobStatus" : "esriJobSubmitted" ,
"results" : {},
"inputs" : {},
"messages" : []
}
Request HTTP HTTP cURL
Use dark colors for code blocks Copy
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
POST <YOUR_ANALYSIS_SERVICE> /arcgis/ rest /services/ tasks /GPServer/G enerateTessellations /jobs/ <JOB_ID> HTTP/ 1.1
Content-Type: application/x-www-form-urlencoded
&f=json
&token=<ACCESS_TOKEN>
Response (JSON)
Use dark colors for code blocks Copy
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
// Executing job
{
"jobId" : "<JOB_ID>" ,
"jobStatus" : "esriJobExecuting" ,
"results" : {},
"inputs" : {},
"messages" : []
}
// Job succeeded
{
"jobId" : "<JOB_ID>" ,
"jobStatus" : "esriJobSucceeded" ,
"results" : {
"tessellationLayer" : {
"paramUrl" : "results/tessellationLayer"
},
},
"inputs" : {},
"messages" : []
}
Request HTTP HTTP cURL
Use dark colors for code blocks Copy
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
POST <YOUR_ANALYSIS_SERVICE> /arcgis/ rest /services/ tasks /GPServer/G enerateTessellations /jobs/ <JOB_ID> /results/ tessellationLayer HTTP/ 1.1
Content-Type: application/x-www-form-urlencoded
&f=json
&returnType=data
&token=<ACCESS_TOKEN>
Response (JSON)
Use dark colors for code blocks Copy
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
{
"paramName" : "tessellationLayer" ,
"dataType" : "GPString" ,
"value" : {
"url" : "<SERVICE_URL>" ,
"itemId" : "<ITEM_ID>"
}
}
Generate square bins This example uses the Generate Tessellations
operation to create square bins in a polygon (boundary) by specifying the bin Type
value as a square with a bin Size
value of 1
mile in Portland.
Generate tesselations analysis creating 1 mile square bins for a polygon boundary in Portland.
APIs ArcGIS API for Python ArcGIS API for Python ArcGIS REST JS
Expand
Use dark colors for code blocks Copy
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
results = generate_tessellation(
bin_size= 1 ,
bin_type= "SQUARE" ,
bin_size_unit= "Miles" ,
intersect_study_area= True ,
extent_layer= "https://services3.arcgis.com/GVgbJbqm8hXASVYi/arcgis/rest/services/Portland_boundary/FeatureServer/0" ,
# Outputs results as a hosted feature service.
output_name= "Generate tessellation results" ,
)
Service requests 1. Get the analysis service URL 2. Submit job 3. Check job status 4. Get results
Request HTTP HTTP cURL
Use dark colors for code blocks Copy
1
2
3
4
5
POST arcgis.com/sharing/rest/portals/self HTTP/1.1
Content-Type : application/x-www-form-urlencoded
&f=json
&token= < ACCESS_TOKEN >
Response (JSON)
Use dark colors for code blocks Copy
1
2
3
4
5
6
7
8
9
10
11
{
"helperServices" : {
// Other parameters
"analysis" : {
"url" : "https://<YOUR_ANALYSIS_SERVICE>/arcgis/rest/services/tasks/GPServer"
},
"geoenrichment" : {
"url" : "https://geoenrich.arcgis.com/arcgis/rest/services/World/GeoenrichmentServer"
}
}
}
Request HTTP HTTP cURL
Use dark colors for code blocks Copy
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
POST <YOUR_ANALYSIS_SERVICE>/arcgis/rest/services/tasks/GPServer/GenerateTessellations/submitJob HTTP/1.1
Content-Type : application/x-www-form-urlencoded
&f=json
&token=<ACCESS_TOKEN>
&binType=SQUARE
&extentLayer={ "url" : "https://services3.arcgis.com/GVgbJbqm8hXASVYi/arcgis/rest/services/Portland_boundary/FeatureServer/0" , "name" : "Portland_boundary" }
&intersectStudyArea= true
&binSize= 1
&binSizeUnit=Miles
&outputName={ "serviceProperties" :{ "name" : "Generate tessellations results" }}
Response (JSON)
Use dark colors for code blocks Copy
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
{
"jobId" : "<JOB_ID>" ,
"jobStatus" : "esriJobSubmitted" ,
"results" : {},
"inputs" : {},
"messages" : []
}
Request HTTP HTTP cURL
Use dark colors for code blocks Copy
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
POST <YOUR_ANALYSIS_SERVICE> /arcgis/ rest /services/ tasks /GPServer/G enerateTessellations /jobs/ <JOB_ID> HTTP/ 1.1
Content-Type: application/x-www-form-urlencoded
&f=json
&token=<ACCESS_TOKEN>
Response (JSON)
Use dark colors for code blocks Copy
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
// Executing job
{
"jobId" : "<JOB_ID>" ,
"jobStatus" : "esriJobExecuting" ,
"results" : {},
"inputs" : {},
"messages" : []
}
// Job succeeded
{
"jobId" : "<JOB_ID>" ,
"jobStatus" : "esriJobSucceeded" ,
"results" : {
"tessellationLayer" : {
"paramUrl" : "results/tessellationLayer"
},
},
"inputs" : {},
"messages" : []
}
Request HTTP HTTP cURL
Use dark colors for code blocks Copy
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
POST <YOUR_ANALYSIS_SERVICE> /arcgis/ rest /services/ tasks /GPServer/G enerateTessellations /jobs/ <JOB_ID> /results/ tessellationLayer HTTP/ 1.1
Content-Type: application/x-www-form-urlencoded
&f=json
&returnType=data
&token=<ACCESS_TOKEN>
Response (JSON)
Use dark colors for code blocks Copy
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
{
"paramName" : "tessellationLayer" ,
"dataType" : "GPString" ,
"value" : {
"url" : "<SERVICE_URL>" ,
"itemId" : "<ITEM_ID>"
}
}
Tutorials Learn how to perform related analyses interactively with Map Viewer and programmatically with ArcGIS API for Python, ArcGIS REST JS, and ArcGIS REST API.
Services Process spatial datasets to discover relationships and patterns.
API support Full support Partial support No support