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
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
operation.Tessellations - 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/ GP Server/ Generate Tessellations/submit Job - Parameters:
bin
: The tessellation shape.Type bin
: The size of each bin.Size output
: A string representing the name of the hosted feature layer to return with the results.Name
- URL:
- 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
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. | token= |
bin | The tessellation shape. | HEXAGON , SQUARE , DIAMOND , TRIANGLE , TRANSVERSEHEXAGON |
bin | The size of each bin. | 500 |
Key parameters
Name | Description | Examples |
---|---|---|
bin | The unit to be used with the specified value in bin . | Feet ,Miles ,Kilometers |
extent | The extent that the tessellations will cover. | {"url" |
output | 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 |
context | A bounding box or output spatial reference for the analysis. | "extent" |
Code examples
Generate hexagon bins
This example uses the Generate
operation to create hexagon bins in a polygon (boundary) by specifying the bin
value as a hexagon
with a bin
value of 1
mile.
APIs
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
POST arcgis.com/sharing/rest/portals/self HTTP/1.1
Content-Type: application/x-www-form-urlencoded
&f=json
&token=<ACCESS_TOKEN>
Response (JSON)
{
"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 Generate
operation to create square bins in a polygon (boundary) by specifying the bin
value as a square with a bin
value of 1
mile in Portland.
APIs
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
POST arcgis.com/sharing/rest/portals/self HTTP/1.1
Content-Type: application/x-www-form-urlencoded
&f=json
&token=<ACCESS_TOKEN>
Response (JSON)
{
"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"
}
}
}