Skip To Content
ArcGIS Developers
Dashboard

Generate Tessellations

Generate Tessellations

The Generate Tessellations task creates tessellations, or bins, determined by a specified extent, shape, and size.

For example, for reforestation projects, foresters need to divide harvested areas into bins, or regularly shaped areas, to understand the amount of seedlings and resources needed to reforest the area effectively. Generate Tessellations can be used to automatically create a dataset of appropriately sized bins for the full study area.

Request URL

http://<analysis url>/GenerateTessellations/submitJob

Request Parameters

ParameterDescription

binType

(Required)

The tessellation shape. Bin options are as follows:

  • Diamond
  • Hexagon
  • Square—This is the default.
  • TransverseHexagon
  • Triangle

Example: "binType" : "Hexagon"

binSize

(Required)

The size of each bin. Cell size can be determined by specifying square units or by specifying a distance that is calculated using the following measurements, where d = Distance:

Square

Square Tessellation

Hexagon

Hexagon Tessellation

Transverse Hexagon

Transverse Hexagon Tessellation

Triangle

Triangle Tessellation

Diamond

Diamond Tessellation

Example: "binSize" : 100

binSizeUnit

The linear or areal unit to be used with the value specified in binSize.

Values: Meters | Kilometers | Feet | Miles | NauticalMiles | Yards | SquareKilometers | Hectares | SquareMeters | SquareMiles | Acres | SquareYards | SquareFeet | SquareInches

The default is SquareKilometers.

Example: "binSizeUnit" : "Miles"

extentLayer

The extent that the tessellations will cover.

Syntax: As described in detail in the Feature Input topic, this parameter can be

  • a URL to a feature service layer with an optional filter to select specific features, or
  • a feature collection.

Examples:

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

intersectStudyArea

A Boolean value that specifies whether to only keep tessellations that intersect with the extent layer (extentLayer). The default is false.

This option is only applied if an extent layer has been provided.

false

Full Extent Coverage

true

Feature Coverage

Values: true | false

outputName

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

Syntax:
{
  "serviceProperties": {
    "name": "<service name>"
  }
}

context

Context contains additional settings that affect task execution. For Generate Tessellations, there are two settings.

  1. Extent (extent)—a bounding box that defines the analysis area. Tessellations will only be generated for this extent. The extent parameter is not used if the extentLayer parameter is specified.
  2. Output Spatial Reference (outSR)—the output features will be projected into the output spatial reference.

Syntax:
{
"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:
{
"jobId": "<unique job identifier>",
"jobStatus": "<job status>"
}

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

http://<analysis url>/GenerateTessellations/jobs/<jobId>

Accessing results

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

http://<analysis url>/GenerateTessellations/jobs/<jobId>/results/<output parameter name>?token=<your token>&f=json

ParameterDescription

tessellationLayer

tessellationLayer will always contain polygon features.

Request example:
{"url": 
"http://<analysis url>/GenerateTessellations/jobs/<jobId>/results/tessellationLayer"}

The result has properties for parameter name, data type, and value. The contents of value depends upon the outputName parameter provided in the initial request.

  • If outputName was provided, value contains the url to the feature service layer.
    {
    "paramName":"tessellationLayer", 
    "dataType":"GPString",
    "value":{"url":"<hosted featureservice layer url>"}
    }
  • If outputName was not provided, value contains a feature collection.
    {
    "paramName":"tessellationLayer",
    "dataType":"GPString",
    "value":{"layerDefinition": {}, "featureSet": {}  }
    }

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