English

How To: Enforce a manual classification on an image service

Summary

Attempts to modify the classification breaks outside its current range of a user-defined renderer through the Map Viewer Image Display option fail. This is not possible in Map Viewer due to limitations that prevent defining values outside of the range values present in the data.

To obtain similar results, a raster function template can be applied.

Image of a class break renderer

The alternative is not practical for data that are constantly updated, wherein the values are known to exceed the current range. To enforce the desired classification break, create a raster function template, and apply the template server-side.

Note:
For developers, it is possible to implement a client-side solution with the ArcGIS API for JavaScript using the Remap-Colormap workflow described in ArcGIS for Developers: ImageryLayer - client side rendering rules.

This article provides steps to implement a server-side solution with raster function templates for visualization on the web-side.

Procedure

  1. In ArcMap, open the raster dataset Layer Properties window, and click the Symbology tab.
  2. In the Show section, select Classified.
  3. Select the desired amount of classes from the Classes drop-down menu.
  4. Right-click the color ramp symbol box, and select Save Class Breaks. Save the XML file in a desired folder location, and close the Layer Properties window.
Image of the Layer Properties window
  1. Open the saved XML file with a text editor, for example Notepad++, and manually edit the desired class break. Save the edits.
Sample image of the .xml file
  1. Reopen the raster dataset Layer Properties window, and click the Symbology tab.
  2. Right-click the color ramp symbol box, and select Load Class Break. Navigate to the folder specified in Step 4, and load the edited XML file.
The image of the Layer Properties window with Save Class Break option
  1. Click the Save button The image of the save button in the upper-right corner to save the class break as a raster function template, and close the Layer Properties window.
  2. Publish the raster dataset as an image service. In Service Editor, navigate to Parameters > Function, and click Manage to open the Manage Raster Function Templates window.
  3. Add the previously created raster function template. Click OK, and Publish.
Image showing raster function template created

The class breaks defined in the template are enforced, and the expected legend is displayed in the web clients, as shown in the following image.

Image showing the class breaks are defined
Note:
Because the classification is applied server-side, the ranges must be updated on the template and not client-side.
Note:
If the legend value must be shown consistently in all clients, follow the procedure described in the following articles:

ArcMap
How To: Apply a raster function template to symbolize classified data in a mosaic dataset or image service published from ArcMap

ArcGIS Pro
How To: Apply a raster function template to symbolize classified data in a mosaic dataset or image service published from ArcGIS Pro

Related Information

Last Published: 5/26/2020

Article ID: 000022287

Software: ArcGIS GeoAnalytics Server 10.8, 10.7.1, 10.7, 10.6.1, 10.6, 10.5.1, 10.5 ArcGIS GeoEvent Server 10.8, 10.7.1, 10.7, 10.6.1, 10.6, 10.5.1, 10.5 ArcGIS Server 10.8, 10.7.1, 10.7, 10.6.1, 10.6, 10.5.1, 10.5 ArcMap 10.8, 10.7.1, 10.7, 10.6.1, 10.6 ArcGIS Image Server 10.8, 10.7.1, 10.7, 10.6.1, 10.6, 10.5.1, 10.5