ArcGIS Pro 3.7 API Reference Guide
ArcGIS.Core.CIM Namespace / CIMMosaicRule Class
Members Example

In This Topic
    CIMMosaicRule Class
    In This Topic
    Represents a mosaic rule.
    Object Model
    CIMMosaicRule ClassCIMMosaicRule ClassCIMMosaicRule ClassTimeValue ClassMapPoint Class
    Syntax
    Example
    Update the sort order - mosaic method on a mosaic layer
    {
        //Note: needs to be called on the QueuedTask
        // Get the image sub-layer from the mosaic layer.
        ImageServiceLayer mosaicImageSubLayer = mosaicLayer.GetImageLayer();
        // Get the mosaic rule.
        CIMMosaicRule mosaicingRule = mosaicImageSubLayer.GetMosaicRule();
        // Set the Mosaic Method to Center.
        mosaicingRule.MosaicMethod = RasterMosaicMethod.Center;
        // Update the mosaic with the changed mosaic rule.
        mosaicImageSubLayer.SetMosaicRule(mosaicingRule);
    }
    Update the resolve overlap - mosaic operator on a mosaic layer
    {
        //Note: needs to be called on the QueuedTask
        // Get the image sub-layer from the mosaic layer.
        ImageServiceLayer mosaicImageSublayerToUse = mosaicLayer.GetImageLayer();
        // Get the mosaic rule.
        CIMMosaicRule mosaicRule = mosaicImageSublayerToUse.GetMosaicRule();
        // Set the Mosaic Operator to Mean.
        mosaicRule.MosaicOperatorType = RasterMosaicOperatorType.Mean;
        // Update the mosaic with the changed mosaic rule.
        mosaicImageSublayerToUse.SetMosaicRule(mosaicRule);
    }
    Update the sort order - mosaic method on an image service layer
    {
        // Get the mosaic rule of the image service.
        //Note: needs to be called on the QueuedTask
        CIMMosaicRule mosaicRule = imageServiceLayer.GetMosaicRule();
        // Set the Mosaic Method to Center.
        mosaicRule.MosaicMethod = RasterMosaicMethod.Center;
        // Update the image service with the changed mosaic rule.
        imageServiceLayer.SetMosaicRule(mosaicRule);
    }
    Update the resolve overlap - mosaic operator on an image service layer
    {
        // Get the mosaic rule of the image service.
        //Note: needs to be called on the QueuedTask
        CIMMosaicRule mosaicingRule = imageServiceLayer.GetMosaicRule();
        // Set the Mosaic Operator to Mean.
        mosaicingRule.MosaicOperatorType = RasterMosaicOperatorType.Mean;
        // Update the image service with the changed mosaic rule.
        imageServiceLayer.SetMosaicRule(mosaicingRule);
    }
    Inheritance Hierarchy

    System.Object
       ArcGIS.Core.CIM.CIMObject
          ArcGIS.Core.CIM.CIMMosaicRule

    Requirements

    Target Platforms: Windows 11 Home, Pro, Enterprise (64 bit)

    ArcGIS Pro version: 3.0 or higher.
    See Also