Generate Orthomosaic

URL:
https://<root>/System/OrthomappingTools/GPServer/GenerateOrthomosaic
Methods:
GET
Version Introduced:
10.6.1

Description

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.

Request parameters

ParameterDetails

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:

Use dark colors for code blocksCopy
1
2
3
{"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.

Use dark colors for code blocksCopy
1
2
3
4
{"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:

  • parallelProcessingFactor : The specified number or percentage of processes will be used for the analysis. The default value is 50%.
  • orthoMosaicAsOvr : Determines whether to apply the generated orthomosaic image as overview of input image collection. The default value is False .
  • clippingGeometry : Specifies the extent or clippinggeometry parameter for the Clip raster function. It is used for setting the extent of the output orthomosaic image.The default value is empty.
  • cellSize : The output raster will have the resolution specified by cell size. The cellSize is specified using the MAXOF , MINOF , or number. The default value is MAXOF .
  • resamplingMethod : Choose which resampling method to use when creating the raster dataset for download. Available resampling types include: NEARESTNEIGHBOR , BILINEAR , CUBIC , MAJORITY , BILINEAR_PLUS , BILINEAR_GAUSSBLUR , BILINEAR_GAUSSBLUR_PLUS , AVERAGE , MINIMUM , MAXIMUM , VECTOR_AVERAGE . The default value is NEARESTNEIGHBOR .
  • outSR : The output raster will be projected into the output spatial reference.
  • seamlinesMethod : Specifies the computation method for running the Build Seamlines tool inside the task. The default value is DISPARITY .
  • minRegionSize : Any seamline polygons smaller than this specified threshold will be removed in the seamline result.
  • pixelSize : Generates seamlines for raster datasets that fall within the specified spatial resolution size.
  • blendType : Determine how to blend one image into another (Both , Inside , or Outside ) over the seamlines. Inside blends pixels inside the seamline, while Outside blends outside the seamline. Both will blend pixels on either side of the seamline.
  • blendWidth : Specifies how many pixels will be blended relative to the seamline. Blending (feathering) occurs along a seamline between pixels of overlapping images.
  • blendUnit : Specifies the unit of measurement for blendWidth . Pixels measures using the number of pixels, and Ground measures using the same units as the image collection.
  • requestSizeType : Sets the units for requestSize . Pixels modifies requestSize based on the pixel size. This resamples the closest image based on the raster pixel size. Pixel scaling factor modifiers requestSize by specifying a scaling factor. This operation resamples the closest image by multiplying the raster pixel size with the pixel size factor.
  • requestSize : Specifies the number of columns and rows for resampling. Though the maximum value is 5,000, this value can increase or decreased based on the complexity of your raster data. A greater image resolution provides more detail in the raster dataset but increases the processing time.
  • minThinnessRatio : Defines how thin a polygon can be before its considered a sliver. This is based on a scale from 0 to 1.0, where a value of 0.0 represents a polygon that's almost a straight line, and a value of 1.0 represents a polygon that's a circle.
  • maxSliverSize : Defines how large a Sliver can be before its considered a polygon. This uses the same scale as minThinnessRatio .
  • skipX and skipY : Specifies the X skip factor and the Y skip factor for running the Build Pyramids And Statistics tool inside the task as part of color correction workflow. The default values are both 1.
  • overwriteStats : Specifies the Skip Existing parameter for running the Build Pyramids And Statistics tool inside the task as part of color correction workflow. The default value isFalse , and statistics will not be recalculated if they exist.
  • colorCorrectionMethod : Specifies the balance method for running the Color Balance Mosaic Dataset tool inside the task. The default value is DODGING .
  • dodgingSurface : Specifies the color surface type for running the Color Balance Mosaic Dataset tool inside the task. The default value is SINGLE_COLOR .
  • targetImage : Specifies the target raster for running the Color Balance Mosaic Dataset tool inside the task. The default value is empty.
  • applyColorCorrection : Indicates whether or not to apply color correction to the image collection. The default value is True .
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
{
  "outSR": {"wkid": 3516},
  "extent": {
    "xmin": 470614.263139,
    "ymin": 8872849.409968,
    "xmax": 532307.351827,
    "ymax": 8920205.372412,
    "spatialReference": {
      "wkid": 32628
    }
  },
  "clippingGeometry": {},
  "orthoMosaicAsOvr": False,
  "seamlinesMethod": "VORONOI",
  "minRegionSize": 100,
  "pixelSize": "",
  "blendType": "Both",
  "blendWidth": None,
  "blendUnit": "Pixels",
  "requestSize": 1000,
  "minThinnessRatio": 0.05,
  "maxSliverSize": 20,
  "colorCorrectionMethod": "DODGING",
  "dodgingSurface": "Single_Color",
  "referenceImg": {"url": https://..."},
  "skipRows": 10,
  "skipCols": 10,
  "reCalculateSats": "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:

Use dark colors for code blocksCopy
1
2
3
4
{
"jobId": "<unique job identifier>",
"jobStatus": "<job status>"
}

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

Use dark colors for code blocksCopy
1
https://<orthomapping tools url>/GenerateOrthomosaic/jobs/<jobId>

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:

Use dark colors for code blocksCopy
1
https://<orthomapping tools url>/GenerateOrthomosaic/job/<jobId>/results/result?token=<your token>&f=json

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

Example usage

Below is a sample URL for GenerateOrthomosaic .

Use dark colors for code blocksCopy
1
https://services.myserver.com/arcgis/rest/services/System/OrthomappingTools/GPServer/GenerateOrthomosaic/submitJob

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

JSON Request example

Use dark colors for code blocksCopy
1
2
3
4
5
imageCollection={"itemId": "1780d648db3545bba8661ad98df824a4"}&
outputOrthoImage={"serviceProperties":{"name": "dronedtm"}}&
regenSeamline=true&
recomputeColorCorrection=true&
context={"outSR": {"wkid": 3516}}

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