ArcGIS REST API

Generate Orthomosaic

Generate Orthomosaic diagram

The GenerateOrthomosaic operation is a service tool that's used to generate a single orthorectified, mosaicked image from an image collection after the block adjustment.

Licensing

License:

As of ArcGIS 10.5, you must license your ArcGIS Server as an ArcGIS Image Server to use this resource.

This operation is supported at 10.6.1 and later.

Request URL

http://<orthomapping service tool url>/GenerateOrthomosaic/submitJob?
imageCollection={"itemId": "1780d648db3545bba8661ad98df824a4"}&outputOrthoImage={"serviceProperties": 
{"name": "drondtm"}}&regenSeamline=true&recomputeColorCorrection=true&context={"outSR": {"wkid": 3516}}

Request parameters

The following table lists the parameters with syntax and details for each.

ParameterDescription

imageCollection

The image collection (mosaic dataset) name or url.

The service must exist before calling the GenerateOrthomosaic service.

Syntax: A JSON object supports three keys, itemId, url and uri. These keys are case sensitive.

Example:

{"itemId": “<portal item id>”}
{“url”: “<image service url>”}
{“uri”: “<cloud raster uri or shared data path>”}

outputOrthoImage

(Required)

This is the output mosaicked orthoimage converted from the image collection after the block adjustment.

Syntax: A JSON object describes the output image collection name or URL.

Example:

{“serviceProperties”: {“name”: “<service name>”}}
{"itemId": “<portal item id>”}
{“url”: “<image service url>”}
{“uri”: “<cloud raster uri or shared data path>”}

regenSeamlines

(Optional)

Specifies whether seamlines are applied before the orthomosaic image generation. The seamlines are regenerated if this flag is turned on. You can set the seamline options through the context parameter. If the seamline generation options are not set, the default is used.

recomputeColorCorrection

(Optional)

Specifies whether color correction settings are applied to the output orthoimage. Color correction is recomputed if this option is turned on. You can configure the compute color correction settings through the context parameter. If there is no color collection setting, the default is used.

context

(Optional)

Contains additional environment settings that affect output image. The following are the supported environment settings for this parameter:

  • Output Spatial Reference (outSR)—The output raster will be projected into the output spatial reference.
  • Extent (extent)—A bounding box that defines the analysis area (clip or expand the output image). Only those areas in the inputZoneLayer that intersect the bounding box will have the statistics calculated.

    Syntax:

    {"extent": {"xmin": 470614.263139,

    "ymin": 8872849.409968,

    "xmax": 532307.351827,

    "ymax": 8920205.372412,

    "spatialReference": {"wkid" : 32628}}}

  • Cell Size (cellSize)—The output orthomosaic image will have the resolution specified by cell size.
  • Clipping geometry—Clips the orthomosaic image to an area of interest defined by the geometry.

    Syntax: {"clippingGeometry": {}}

  • Add orthomosaic as overview of image collection

    Syntax: {"orthoMosaicAsOvr": False}

  • Generate seamlines default

    Syntax:

    {

    "seamlinesMethod": "VORONOI",

    "minRegionSize": 100,

    "pixelSize": "",

    "blendType": "Both",

    "blendWidth": None,

    "blendUnit": "Pixels",

    "requestSizeType": "Pixels",

    "requestSize": 1000,

    "minThinnessRatio": 0.05,

    "maxSliverSize": 20

  • Compute color correction default

    Syntax

    {

    "colorCorrectionMethod": "DODGING",

    "dodgingSurface": "Single_Color",

    "referenceImg": {"url": "https://.... "},

    "skipRows": 10, "skipCols": 10, "reCalculateStats": "OVERWRITE"}

f

The response format. The default response format is html.

Values: html | json

Response

When you submit a request, the task 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 Checking job status. Once the job has successfully completed, use the jobId to retrieve the results. To track the status, you can make a request of the following form:

http://<Orthomapping service tool url>/GenerateOrthomosaic/jobs/<jobId>

Accessing results

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

http://<Orthomapping service tool url>/GenerateOrthomosaic/jobs/<jobId>/results/result?token=<your token>&f=json

The result will be the image service URL and item ID of the orthomosaicked image.