ClipFunction

Base Type: RasterFunction

A class for a raster clipping function.

Remarks

This function clips a raster according to the extents provided and the method specified. The raster can be clipped outside of the extents, or the inside. The extents are provided as an Envelope object.

Examples

C#

renderRule = new RenderingRule();

ClipFunction clipFunction1 = new ClipFunction();

ClipFunctionArguments clipArgument1 = new ClipFunctionArguments();

EnvelopeN clipEnvelope1 = new EnvelopeN();

double xmin, xmax, ymin, ymax;

xmin = ((EnvelopeN)isInfo.Extent).XMin;

xmax = ((EnvelopeN)isInfo.Extent).XMax;

ymin = ((EnvelopeN)isInfo.Extent).YMin;

ymax = ((EnvelopeN)isInfo.Extent).YMax;

clipEnvelope1.XMin = xmin + (xmax - xmin) / 5;

clipEnvelope1.XMax = xmin + (xmax - xmin) * 4 / 5;

clipEnvelope1.YMin = ymin + (ymax - ymin) / 5;

clipEnvelope1.YMax = ymin + (ymax - ymin) * 4 / 5;

clipEnvelope1.SpatialReference = ((EnvelopeN)isInfo.Extent).SpatialReference;

clipArgument1.Names = new string[] { "ClippingGeometry", "ClippingType", "Raster" };

clipArgument1.Values = new object[] { clipEnvelope1, 1, rfv };

renderRule = new RenderingRule();

renderRule.Function = clipFunction1 ;

renderRule.VariableName = "Raster";

11/8/2016