Skip To Content
ArcGIS Developers
Dashboard

Update Raster

  • URL:https://<imageservice-url>/update(POST only)
  • Required Capability:Edit
  • Version Introduced:10.1

Description

License:

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

This operation is supported at 10.1 and later.

The Update Raster operation is performed on an image service resource.

The Update Raster operation updates rasters (attributes and footprints, or replaces existing raster files) in an image service (POST only).

In most cases, this operation is used to update attributes or footprints of existing rasters in an image service. In cases where the original raster needs to be replaced, the new raster can be either items uploaded using the items parameter or URLs of published services using the serviceUrl parameter.

When serviceUrl is specified, the image service adds this URL to the mosaic dataset. The serviceUrl parameter is required input for the following raster types: Image Service, Map Service, WCS, and WMS.

You can provide arguments to the Update Raster operation as query parameters defined in parameters table below.

Request parameters

ParameterDetails
f

The response format. The default response format is html.

Values: html | json

rasterId

(Required)

Description: The object ID of the raster catalog item to be updated.

Syntax: rasterId=<rasterId>

Example: rasterId=3

itemIds

Description: The uploaded items (raster files) being used to replace existing raster.

Syntax: itemIds=<itemID1>,<itemID2>

Example: itemIds=ib740c7bb-e5d0-4156-9cea-12fa7d3a472c,ib740c7bb-e2d0-4106-9fea-12fa7d3a482c

serviceUrl

Description: The URL of the service to be uploaded to replace existing raster data. The image service adds this URL to the mosaic dataset. The serviceUrl parameter is required for the following raster types: Image Service, Map Service, WCS, and WMS.

Example: serviceUrl=https://myserver/arcgis/services/Portland/ImageServer

computeStatistics

Description: If true, statistics for the uploaded raster will be computed. The default is false.

Values: false | true

buildPyramids

Description: If true, pyramids are built for the uploaded raster. The default is false.

Values: false | true

buildThumbnail

Description: If true, a thumbnail is generated for the uploaded raster. The default is false.

Values: false | true

minimumCellSizeFactor

Description: The factor (times raster resolution) used to populate the MinPS field (the minimum cell size above which a raster is visible).

Syntax: minimumCellSizeFactor=<minimumCellSizeFactor>

Example: minimumCellSizeFactor=0.1

maximumCellSizeFactor

Description: The factor (times raster resolution) used to populate the MaxPS field (the maximum cell size below which a raster is visible).

Syntax: maximumCellSizeFactor=<maximumCellSizeFactor>

Example: maximumCellSizeFactor=10

footprint

Description: A JSON 2D polygon object that defines the footprint of the raster. If the spatial reference is not defined, it defaults to the image service's spatial reference.

Syntax: <polygon>

Example:

{"rings" : [  [ [-97.06138,32.837], [-97.06133,32.836], [-97.06124,32.834], [-97.06127,32.832], [-97.06138,32.837] ],  [ [-97.06326,32.759], [-97.06298,32.755], [-97.06153,32.749], [-97.06326,32.759] ]],"spatialReference" : {"wkid" : 4326}}

attributes

Description: Any attribute for the uploaded raster.

Syntax:

{
  "<name1>" : <value1>,
  "<name2>" : <value2>
}

Example:

{
  "Year" : 2002,
  "State" : "Florida"
}

geodataTransforms

Description: The geodata transformations applied to the updated rasters. A geodata transformation is a mathematical model that performs geometric transformation on a raster. It defines how the pixels will be transformed when displayed or accessed, such as polynomial, projective, or identity transformations. The geodata transformations are applied to the updated dataset. The following is the JSON representation of transformations:

Syntax:

[
  {
  "geodataTransform" : "<geodataTransformName1>",
  "geodataTransformArguments" : {<geodataTransformArguments1>}
  },
  {
  "geodataTransform" : "<geodataTransformName2>",
  "geodataTransformArguments" : {<geodataTransformArguments2>}
  }
]

The syntax of the geodataTransformArguments property varies based on the specified geodataTransform name. See the Geodata transformations documentation for details.

geodataTransformApplyMethod

Description: Defines how to apply the provided geodataTransform. The default is esriGeodataTransformApplyAppend.

Values: esriGeodataTransformApplyAppend | esriGeodataTransformApplyReplace | esriGeodataTransformApplyOverwrite

Example usage

Update raster visibility and other attributes by specifying the following post request content:

rasterId=10&attributes={"MinPS":0,"MaxPS":10,"GroupName":"LAS"}

Update an image's georeferencing by providing the following post request content:

rasterId=10&geodataTransforms=[{"geodataTransform" : "Polynomial","geodataTransformArguments" : {"sourcePoints" : [{"x":0, "y":0}, {"x":100, "y":0},{"x":100, "y":100}],"targetPoints" : [{"x":10, "y":10}, {"x":110, "y":10},{"x":110, "y":110}],"polynomialOrder" : 1,"spatialReference": {"wkid" : 54004}}}]&geodataTransformApplyMethod=esriGeodataTransformApplyAppend&f=json

JSON Response syntax

{
  "updateResults" : [
    {
      "rasterId" : <rasterId1>,
      "success" : <true | false>,
      "error" : { //only if success is false
        "code" : <code1>,
        "description" : "<description1>"
      }
    }
  ]
}

JSON Response example

{
  "updateResults" : [
    {
      "rasterId" : 10,
      "success" : true
    }
  ]
}