Image service ComputeHistograms method

Returns raster histograms based on a given extent, mosaic rule, and pixel size.

ComputeHistograms(Geometry Geometry, MosaicRule MosaicRule, Point Pixelsize, RenderingRule RenderingRule)

Parameter

Description

Geometry

A geometry object that defines the area of interest.

MosaicRule

A mosaic rule defining the image sorting order.

PixelSize

A point that defines pixel size level being used.

RenderingRule

A rule defining additional rendering processing (e.g. convolution).

Return Value

An array of RasterHistogram objects.

Remarks

This method returns an array of RasterHistograms, one for each band. The requested rows and/or columns defined by the extent, mosaic rule, and pixel size, may not exceed the service restriction; otherwise an error is returned.

Examples

C#

//define image server
UploadTest_ImageServer imageServer = new UploadTest_ImageServer();
imageServer.Url = _serviceurl;

//define area of interest
EnvelopeN env = new EnvelopeN();
env.XMin = 3268200;
env.XMax = 3268800;
env.YMin = 127855;
env.YMax = 128255;
env.SpatialReference = ((EnvelopeN)imageServer.GetServiceInfo().Extent).SpatialReference;

//define a mosaic rule  (for mosaic)
MosaicRule mrule = new MosaicRule();
mrule.MosaicMethod = esriMosaicMethod.esriMosaicCenter;

//define pixel size
PointN resolution = new PointN();
resolution.X = 1.5;
resolution.Y = 1.5;

//compute histograms
RasterHistogram[] hists = imageServer.ComputeHistograms(env, mrule, resolution);

10/23/2013