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.
    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)
    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 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()
    [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 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 the MosaicRule to copy from.

    Public Methods

    public boolean equals (Object obj)

    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
    • 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
    • Returns the method.

    public int[] getObjectIds ()

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

    Returns
    • 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
    • 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
    • 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
    • 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
    • Returns the viewpoint.

    public SpatialReference getViewpointSpatialReference ()

    Gets the SpatialReference of the ViewPoint.

    Returns
    • 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
    • Returns the where clause.

    public int hashCode ()

    public boolean isAscending ()

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

    Returns
    • 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 The ascending to set.

    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 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 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 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 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 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 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 The viewpoint to set.

    public void setViewpointSpatialReference (SpatialReference viewpointSpatialReference)

    Sets the SpatialReference of the ViewPoint.

    Parameters
    viewpointSpatialReference 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 The where clause to set.

    public String toJson ()

    Converts the instance to a Json string.

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

    public String toString ()