- URL:https://<rasteranalysistools-url>/CreateImageCollection
- Version Introduced:10.6.1
Description
The CreateImageCollection task takes multiple image items as input, creates a image collection in a registered data store, and publishes it as an image service. The input raster dataset can be clipped, resampled, and reprojected based on the setting. The image upload can also be run in parallel.
Request parameters
Parameter | Details |
---|---|
inputRasters (Required) | The portal folder ID, portal item ID, image service URL, cloud raster dataset, or shared raster dataset that will be added to the image collection. At least one type of input must be provided in the JSON object. If multiple inputs are given, the itemId takes priority. Syntax: A JSON object describes the input raster.
The byref value is supported in cases where data will not be uploaded and the input JSON object contains the byref key set to true.
When setting the input raster dataset, a relative data store path is supported such as /fileshare/a/a.tif or /cloudStore/B/b.crf through the "uri" key. The "uri" key can also be used to set an input mosaic dataset, and the mosaic dataset will not be copied to the raster store. When setting the input raster dataset stored in the cloud storage by reference, the cloud storage bucket must be open to the public. The syntax does not support a secured bucket.
The byvalue value is supported in cases where the byref tag is not give or is set to false, and the input raster data or mosaic dataset will be uploaded or copied to the raster store.
When a mosaic dataset is given as input, the mosaic dataset is copied to the raster store but not the source image it references. The server should also be granted access to the location of the source image. If the raster store only has a file share, the mosaic dataset is copied to the file geodatabase created in the file share. If the raster store has a database, the mosaic dataset is copied to the database. |
imageCollection (Required) | The output image collection name or URL. As with raster analysis services, the service can be an existing multitenant service URL, or this service tool can create it. If the image collection is created by the service tool, it will be created in the geodatabase and defined in the raster store. If the raster store only has a file share, a file geodatabase will be created in the file share to store the mosaic dataset. If the raster store has an enterprise database, the enterprise database will take priority over the file share, and the mosaic dataset will be created in the enterprise database. Syntax: A JSON object supports three, case sensitive keys: itemId, url, and uri. Example: |
rasterType (Required) | The raster type that will be used to add images to the image collection. The imageCollectionType property is important for an image collection that will be adjusted later by the orthomapping system service. Based on the image type, the orthomapping system service will choose a different algorithm for adjustment. Therefore, if the image collection is created by reference, the requester should set this property based on the type of images in the image collection using the following keywords: UAV/UAS, Aerial, ScannedAerial, and Satellite. If imageCollectionType is not set, it default to "UAV/UAS". Syntax: A JSON object describes the raster type, which can be used to set properties of the raster types. The supported raster types keywords in JSON are UAV/UAS, ScannedAerial, Landsat 7 ETM +, Landsat 8 Sentinel-2, ZY3-SASMAC, and ZY3-CRESDA.
|
context | Contains additional settings that affect task execution. This following setting is available: Output Spatial Reference (outSR) - The image collection will be projected into the output spatial reference. The ourSR setting is required if you want the service to create the mosaic dataset and hosted image service.
|
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 Check 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:
https://<raster analysis tools url>/CreateImageCollection/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:
https://<raster analysis tools url>/CreateImageCollection/jobs/<jobId>/results/result
Example usage
The following is a sample request URL for CreateImageCollection:
https://services.myserver.com/arcgis/rest/services/System/RasterAnalysisTools/GPServer/CreateImageCollection/submitJob
JSON Request example
inputRasters={“itemIds”: ["1780d648db3545bba8661ad98df824a4", "1780d648db3545bba8661ad98df824a5", "1780d648db3545bba8661ad98df824a6"]}&
rasterType={
"rasterTypeName": "UAV/UAS",
"rasterTypeParameters": {"GPS": [[“image1.jpg”, “10”, “2”, “300”], [“image2.jpg”, “10”, “3”, “300”], [“image3.jpg”, “10”, “4”, “300”]]}
}&
imageCollection={"serviceProperties": {"name": "uavcollection"}}
JSON Response example
The response returns the result parameter, which has properties for parameter name, data type, and value. The content of value is always the image service URL.
{
"paramName": "result",
"dataType": "GPString",
"value": {
"itemId": "f121390b85ef419790479fc7b49efd",
"url": "https://<server name>/arcgis/rest/services/Hosted/<service name>/ImageServer"
}
}