Convert Raster to Feature


Convert Raster to Feature diagram

The Convert Raster to Feature task converts a raster to a point, line or polygon feature dataset.

Request parameters



The input raster that will be converted to a feature dataset.

It can be either an integer or float raster.

Syntax: This parameter can be specified as a Portal Item ID, a URL to a raster image service layer, a cloud raster dataset, or a shared raster dataset.


//Portal item as input raster
{"itemId": <portal item id>}

//URL as input raster
{"url": <image service url}

//Raster service as input raster
    "serviceUrl":"http://<server name>/server/rest/services/Hosted/testrasteranalysis/ImageServer"},
  "itemProperties":{"itemId":"8cfbd3ec25584d0d8f4ed23b8ff7c43b", "folderId", "sdfwerfbd3ec25584d0d8f4"}



The output feature service of the results. You define the name of the service. If output name is not supplied, the task will return a feature collection.

Output name example:

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



A field on the inputLayer will be used for the conversion. It can be any numerical (integer or float) field, or a string field.


"field": "Landuse"


The type of output to be created.

If the input is a floating point raster, then only a point dataset can be created. If the input is an integer raster, then a Point, Line, or Polygon dataset can be created. The default is point.


"outputType": "Polygon"


Specifies how the features should be smoothed. It is only available for line and polygon output.

Syntax: A Boolean value as either true or false.

  • true specifies that the features will be smoothed out. This is the default.
  • false that the features will follow exactly the cell boundaries or the raster dataset.


"simplifyLinesOrPolygons": true


Contains additional settings that affect task execution. This task has the following settings:

  • Extent (extent): A bounding box that defines the analysis area.
  • Output Spatial Reference (outSR): The output features will be in this spatial reference.
  • Snap Raster (snapRaster): The raster to which the cells of the input raster will be aligned.

The response format. The default response format is html.

Values: html | json


When you submit a request, the task assigns a unique job ID for the transaction.

  "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, you 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>/ConvertRasterToFeature/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>/ConvertRasterToFeature/jobs/<jobId>/results/outputFeatures

Example usage

Below is a sample request URL for ConvertRasterToFeature.

JSON response examples

The response returns the outputFeatures parameter, which has properties for parameter name, data type, and value. The content of value depends upon the outputName parameter provided in the initial request.

If outputName was provided in the request, value contains the URL to the feature service layer


  "value":{"url":"<hosted feature service layer url>"}

If outputName is not provided in the request, value contains a feature collection.


  "value":{"layerDefinition": {}, "featureSet": {}