public class

MosaicRule

extends Object
implements Serializable
java.lang.Object
   ↳ com.esri.core.map.MosaicRule

Class Overview

Specifies the mosaic rule when defining how individual images should be mosaicked. It specifies selection, mosaic method, sort order, overlapping pixel resolution, etc. Mosaic rules are for mosaicking rasters in the mosaic dataset. A mosaic rule is used to define:

  • The selection of rasters that will participate in the mosaic (using where clause).
  • The mosaic method, e.g. how the selected rasters are ordered.
  • The mosaic operation, e.g. how overlapping pixels at the same location are resolved.

  • Summary

    Constants
    int METHOD_ATTRIBUTE Sorts rasters based on an attribute field and its difference from a base value.
    int METHOD_CENTER Sorts rasters where rasters that have their centers closest to the view center or center of view extent are placed on top.
    int METHOD_LOCKRASTER Specifies that only rasters in the given list of raster Ids participate in the mosaic.
    int METHOD_NADIR Sorts rasters by the distance between the nadir position and view center.
    int METHOD_NONE No mosaic method specified.
    int METHOD_NORTHWEST Sorts rasters in a view independent way, where rasters with their centers most northwest are displayed on top.
    int METHOD_SEAMLINE Cuts the raster using the predefined seamline shape.
    int METHOD_VIEWPOINT Sorts rasters based on a user-defined viewpoint location and nadir location.
    int OPERATION_BLEND Takes the blended value of all overlapping pixels.
    int OPERATION_FIRST Takes the first value of all overlapping pixels.
    int OPERATION_LAST Takes the last value of all overlapping pixels.
    int OPERATION_MAX Takes the maximum value of all overlapping pixels.
    int OPERATION_MEAN Takes the mean value of all overlapping pixels.
    int OPERATION_MIN Takes the minimum value of all overlapping pixels.
    int OPERATION_SUM Takes the sum of all overlapping pixels.
    Public Constructors
    MosaicRule()
    Instantiates an object of MosaicRule.
    MosaicRule(MosaicRule params)
    Copies the properties from the given MosaicRule to the current instance.
    Public Methods
    boolean equals(Object obj)
    static MosaicRule fromJson(JsonParser parser)
    Creates a MosaicRule object from json.
    RasterFunction getItemRenderingRule()
    Gets the rendering rule that is applied on items before mosaicking.
    int[] getLockRasterIds()
    Gets an array of raster Ids.
    int getMethod()
    Gets the method of the MosaicRule.
    int[] getObjectIds()
    Defines a selection using a set of ObjectIds.
    int getOperation()
    Gets the operation of the MosaicRule.
    String getSortField()
    Gets the name of the attribute field that is used together with a constant sortValue to define the mosaicking order when the mosaic method is set to METHOD_ATTRIBUTE.
    String getSortValue()
    Gets the sortValue of the MosaicRule.
    Point getViewpoint()
    Gets the viewpoint location on which the ordering is defined based on the distance from the viewpoint and the nadir of rasters.
    SpatialReference getViewpointSpatialReference()
    Gets the SpatialReference of the ViewPoint.
    String getWhere()
    Gets the where clause of the MosaicRule.The where clause determines which rasters will participate in the mosaic.
    int hashCode()
    boolean isAscending()
    Gets the ascending of the MosaicRule.
    void setAscending(boolean ascending)
    Sets the ascending of the MosaicRule.
    void setItemRenderingRule(RasterFunction itemRenderingRule)
    Sets the rendering rule that is applied on items before mosaicking.
    void setLockRasterIds(int[] lockRasterIds)
    Sets an array of raster Ids.
    void setMethod(int method)
    Sets the method of the MosaicRule.
    void setObjectIds(int[] objectIds)
    Defines a selection using a set of ObjectIds.
    void setOperation(int operation)
    Sets the operation of the MosaicRule.
    void setSortField(String sortField)
    Sets the name of the attribute field that is used together with a constant sortValue to define the mosaicking order when the mosaic method is set to METHOD_ATTRIBUTE.
    void setSortValue(String sortValue)
    Sets the sortValue of the MosaicRule.
    void setViewpoint(Point viewpoint)
    Sets the viewpoint location on which the ordering is defined based on the distance from the viewpoint and the nadir of rasters.
    void setViewpointSpatialReference(SpatialReference viewpointSpatialReference)
    Sets the SpatialReference of the ViewPoint.
    void setWhere(String where)
    Sets the where clause of the MosaicRule.
    String toJson()
    Converts the instance to a Json string.
    String toString()
    Returns string representation of the class.
    [Expand]
    Inherited Methods
    From class java.lang.Object

    Constants

    public static final int METHOD_ATTRIBUTE

    Sorts rasters based on an attribute field and its difference from a base value. All mosaic operations apply (see operation constants).

    Constant Value: 1 (0x00000001)

    public static final int METHOD_CENTER

    Sorts rasters where rasters that have their centers closest to the view center or center of view extent are placed on top. All mosaic operations apply (see operation constants).

    Constant Value: 2 (0x00000002)

    public static final int METHOD_LOCKRASTER

    Specifies that only rasters in the given list of raster Ids participate in the mosaic. All mosaic operations apply (see operation constants).

    Constant Value: 3 (0x00000003)

    public static final int METHOD_NADIR

    Sorts rasters by the distance between the nadir position and view center. This is similar to the METHOD_CENTER but uses the nadir point to a raster, which may be different than the center, especially for oblique imagery. All mosaic operations apply (see operation constants).

    Constant Value: 4 (0x00000004)

    public static final int METHOD_NONE

    No mosaic method specified.

    Constant Value: 0 (0x00000000)

    public static final int METHOD_NORTHWEST

    Sorts rasters in a view independent way, where rasters with their centers most northwest are displayed on top. All mosaic operations apply (see operation constants).

    Constant Value: 5 (0x00000005)

    public static final int METHOD_SEAMLINE

    Cuts the raster using the predefined seamline shape. Optional feathering is used along the seams. The ordering is predefined during seamline generation. The First, Blend, Min, Max and Mean raster operations apply (see operation constants).

    Constant Value: 6 (0x00000006)

    public static final int METHOD_VIEWPOINT

    Sorts rasters based on a user-defined viewpoint location and nadir location. All mosaic operations apply (see operation constants).

    Constant Value: 7 (0x00000007)

    public static final int OPERATION_BLEND

    Takes the blended value of all overlapping pixels.

    Constant Value: 1 (0x00000001)

    public static final int OPERATION_FIRST

    Takes the first value of all overlapping pixels.

    Constant Value: 2 (0x00000002)

    public static final int OPERATION_LAST

    Takes the last value of all overlapping pixels.

    Constant Value: 3 (0x00000003)

    public static final int OPERATION_MAX

    Takes the maximum value of all overlapping pixels.

    Constant Value: 4 (0x00000004)

    public static final int OPERATION_MEAN

    Takes the mean value of all overlapping pixels.

    Constant Value: 5 (0x00000005)

    public static final int OPERATION_MIN

    Takes the minimum value of all overlapping pixels.

    Constant Value: 6 (0x00000006)

    public static final int OPERATION_SUM

    Takes the sum of all overlapping pixels.

    Constant Value: 7 (0x00000007)

    Public Constructors

    public MosaicRule ()

    Instantiates an object of MosaicRule.

    public MosaicRule (MosaicRule params)

    Copies the properties from the given MosaicRule to the current instance.

    Parameters
    params MosaicRule: the MosaicRule to copy from.

    Public Methods

    public boolean equals (Object obj)

    Parameters
    obj Object
    Returns
    boolean

    public static MosaicRule fromJson (JsonParser parser)

    Creates a MosaicRule object from json.

    Parameters
    parser JsonParser: contains the JSON to parse
    Returns
    MosaicRule a RasterFunction object
    Throws
    IOException
    JsonParseException
    JsonParseException
    IOException

    public RasterFunction getItemRenderingRule ()

    Gets the rendering rule that is applied on items before mosaicking.

    Returns
    RasterFunction a rendering rule

    public int[] getLockRasterIds ()

    Gets an array of raster Ids. All the rasters with the given list of raster Ids are selected to participate in the mosaic. The rasters will be visible at all pixel sizes regardless of the minimum and maximum pixel size range of the locked rasters.

    Returns
    int[] Returns the lockRasterIds.

    public int getMethod ()

    Gets the method of the MosaicRule. The mosaic method determines how the selected rasters are ordered. View the constants (e.g. METHOD_CENTER) for valid values.

    Returns
    int Returns the method.

    public int[] getObjectIds ()

    Defines a selection using a set of ObjectIds. This property applies to all mosaic methods.

    Returns
    int[] Returns the objectIds.

    public int getOperation ()

    Gets the operation of the MosaicRule. It defines the mosaic operation used to resolve overlapping pixels. See the constants (e.g. OPERATION_BLEND) for a list of valid values.

    Returns
    int Returns the operation.

    public String getSortField ()

    Gets the name of the attribute field that is used together with a constant sortValue to define the mosaicking order when the mosaic method is set to METHOD_ATTRIBUTE.

    Returns
    String Returns the sortField.

    public String getSortValue ()

    Gets the sortValue of the MosaicRule. It is a constant value defining a reference or base value for the sort field when the mosaic method is set to METHOD_ATTRIBUTE.

    Returns
    String Returns the sortValue.

    public Point getViewpoint ()

    Gets the viewpoint location on which the ordering is defined based on the distance from the viewpoint and the nadir of rasters.

    Returns
    Point Returns the viewpoint.

    public SpatialReference getViewpointSpatialReference ()

    Gets the SpatialReference of the ViewPoint.

    Returns
    SpatialReference Returns the viewpointSpatialReference.

    public String getWhere ()

    Gets the where clause of the MosaicRule.The where clause determines which rasters will participate in the mosaic. This property applies to all mosaic methods.

    Returns
    String Returns the where clause.

    public int hashCode ()

    Returns
    int

    public boolean isAscending ()

    Gets the ascending of the MosaicRule. It indicates whether the sort should be ascending or not.

    Returns
    boolean Returns the ascending.

    public void setAscending (boolean ascending)

    Sets the ascending of the MosaicRule. It indicates whether the sort should be ascending or not.

    Parameters
    ascending boolean: The ascending to set.

    public void setItemRenderingRule (RasterFunction itemRenderingRule)

    Sets the rendering rule that is applied on items before mosaicking.

    Parameters
    itemRenderingRule RasterFunction: the rendering rule

    public void setLockRasterIds (int[] lockRasterIds)

    Sets an array of raster Ids. All the rasters with the given list of raster Ids are selected to participate in the mosaic. The rasters will be visible at all pixel sizes regardless of the minimum and maximum pixel size range of the locked rasters.

    Parameters
    lockRasterIds int: The lockRasterIds to set.

    public void setMethod (int method)

    Sets the method of the MosaicRule. The mosaic method determines how the selected rasters are ordered. View the constants (e.g. METHOD_CENTER) for valid values.

    Parameters
    method int: The method to set.

    public void setObjectIds (int[] objectIds)

    Defines a selection using a set of ObjectIds. This property applies to all mosaic methods.

    Parameters
    objectIds int: The objectIds to set.

    public void setOperation (int operation)

    Sets the operation of the MosaicRule. It defines the mosaic operation used to resolve overlapping pixels. See the constants (e.g. OPERATION_BLEND) for a list of valid values.

    Parameters
    operation int: The operation to set.

    public void setSortField (String sortField)

    Sets the name of the attribute field that is used together with a constant sortValue to define the mosaicking order when the mosaic method is set to METHOD_ATTRIBUTE.

    Parameters
    sortField String: The sortField to set.

    public void setSortValue (String sortValue)

    Sets the sortValue of the MosaicRule. It is a constant value defining a reference or base value for the sort field when the mosaic method is set to METHOD_ATTRIBUTE.

    Parameters
    sortValue String: The sortValue to set.

    public void setViewpoint (Point viewpoint)

    Sets the viewpoint location on which the ordering is defined based on the distance from the viewpoint and the nadir of rasters.

    Parameters
    viewpoint Point: The viewpoint to set.

    public void setViewpointSpatialReference (SpatialReference viewpointSpatialReference)

    Sets the SpatialReference of the ViewPoint.

    Parameters
    viewpointSpatialReference SpatialReference: The viewpointSpatialReference to set.

    public void setWhere (String where)

    Sets the where clause of the MosaicRule. The where clause determines which rasters will participate in the mosaic. This property applies to all mosaic methods.

    Parameters
    where String: The where clause to set.

    public String toJson ()

    Converts the instance to a Json string.

    Returns
    String the Json string.
    Throws
    JsonGenerationException the json generation exception
    IOException the IO exception

    public String toString ()

    Returns string representation of the class. The format and content of the returned string is not part of the contract of the method and is subject to change in any future release or patch without further notice.

    Returns
    String