Generate tessellations

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 GenerateTessellations operation.

generate tessellations

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

  1. Review the parameters for the GenerateTessellations operation.
  2. Send a request to get the spatial analysis service URL.
  3. Execute a job request with the following URL and parameters:
    • URL: https://<YOUR_ANALYSIS_SERVICE>/arcgis/rest/services/tasks/GPServer/GenerateTessellations/submitJob
    • Parameters:
      • binType: The tessellation shape.
      • binSize: The size of each bin.
      • outputName: A string representing the name of the hosted feature layer to return with the results.
  4. Check the status.
  5. 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 blocksCopy
1
http://<YOUR_ANALYSIS_SERVICE>/arcgis/rest/services/tasks/GPServer/GenerateTessellations/submitJob?<parameters>

Required parameters

NameDescriptionExamples
fThe format of the data returned.f=json f=pjson
tokenAn OAuth 2.0 access token. Learn how to get an access token in Security and authentication.token=<ACCESS_TOKEN>
binTypeThe tessellation shape.HEXAGON, SQUARE, DIAMOND, TRIANGLE, TRANSVERSEHEXAGON
binSizeThe size of each bin.500

Key parameters

NameDescriptionExamples
binSizeUnitThe unit to be used with the specified value in binSize.Feet,Miles,Kilometers
extentLayerThe extent that the tessellations will cover.{"url":"https://services3.arcgis.com/GVgbJbqm8hXASVYi/arcgis/rest/services/Portland_boundary/FeatureServer/0"}
outputNameA 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).{"serviceProperties": {"name": "<SERVICE_NAME>"}}
contextA bounding box or output spatial reference for the analysis."extent":{"xmin:", "ymin:", "xmax:", "ymax:"}

Code examples

Generate hexagon bins

This example uses the GenerateTessellations operation to create hexagon bins in a polygon (boundary) by specifying the binType value as a hexagon with a binSize 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 PythonArcGIS API for PythonArcGIS REST JS
Expand
Use dark colors for code blocksCopy
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

Request
HTTPHTTPcURL
Use dark colors for code blocksCopy
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 blocksCopy
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"
    }
  }
}

Generate square bins

This example uses the GenerateTessellations operation to create square bins in a polygon (boundary) by specifying the binType value as a square with a binSize value of 1 mile in Portland.

Generate tesselations analysis creating 1 mile square bins for a polygon boundary in Portland.

APIs

ArcGIS API for PythonArcGIS API for PythonArcGIS REST JS
Expand
Use dark colors for code blocksCopy
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

Request
HTTPHTTPcURL
Use dark colors for code blocksCopy
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 blocksCopy
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"
    }
  }
}

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

Spatial analysis service

Process spatial datasets to discover relationships and patterns.

API support

Create buffersCreate centroidsGenerate tessellations
ArcGIS Maps SDK for JavaScript111
ArcGIS Maps SDK for .NET
ArcGIS Maps SDK for Kotlin
ArcGIS Maps SDK for Swift
ArcGIS Maps SDK for Java
ArcGIS Maps SDK for Qt
ArcGIS API for Python
ArcGIS REST JS111
Esri Leaflet222
MapBox GL JS222
OpenLayers222
Full supportPartial supportNo support
  • 1. Access with geoprocessing task
  • 2. Access via ArcGIS REST JS

Tools

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