Raster input

Raster analysis tasks typically have a raster as input. Rasters can be added as an input in multiple ways:

  • A URL to an image service layer.
  • A portal itemId to an image layer.

Input raster as a URL to an image service layer.

Use dark colors for code blocksCopy
1
2
3
{
  "url": "<url to image service layer>"
}

Starting at 10.6, an input image service can be secured. If your service is secured, you will need to provide a token (and possibly a referrer) along with the URL so that the analysis service can access it. A long-lived token can be obtained from the token server. For details on acquiring the token, see Acquiring ArcGIS tokens.

Example of providing a token to the image service URL.

Use dark colors for code blocksCopy
1
2
3
4
{
  "url": "<url to image service layer>?token=<token of the service>&referer=<base url
   of the client app>"
}

Input raster as a portal itemId.

Use dark colors for code blocksCopy
1
2
3
{
  "itemId": "f126c8da131543019b05e4bfab6fc6ac",
}

Currently the supported input image service layer has to be published on the same portal or from a public server.

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