Class: MosaicRule

Description

Class added v2.0.

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:

Samples

Search for samples that use this class.  

Class hierarchy

esri.layers.MosaicRule

Constructor

Constructor Description
esri.layers.MosaicRule() Creates a new MosaicRule object

Properties

Property Type Description
ascending Boolean Indicates whether the sort should be ascending or not.
lockRasterIds Number[] 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.
method String The mosaic method determines how the selected rasters are ordered. View the esri.layers.MosaicRule constants for valid values.
objectIds Number[] Defines a selection using a set of ObjectIds. This property applies to all mosaic methods.
operation String Defines the mosaic operation used to resolve overlapping pixels. See the constants for a list of valid values.
sortField String 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.
sortValue String A constant value defining a reference or base value for the sort field when the mosaic method is set to METHOD_ATTRIBUTE.
viewpoint Point Defines the viewpoint location on which the ordering is defined based on the distance from the viewpoint and the nadir of rasters.
where String The where clause determines which rasters will participate in the mosaic. This property applies to all mosaic methods.

Constants

Constant Description
METHOD_ATTRIBUTE Sorts rasters based on an attribute field and its difference from a base value. All mosaic operations apply (see operation constants).
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).
METHOD_LOCKRASTER Specifies that only rasters in the given list of raster Ids participate in the mosaic. All mosaic operations apply (see operation constants).
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).
METHOD_NONE No mosaic method specified.
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).
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).
METHOD_VIEWPOINT Sorts rasters based on a user-defined viewpoint location and nadir location. All mosaic operations apply (see operation constants).
OPERATION_BLEND Takes the blended value of all overlapping pixels.
OPERATION_FIRST Takes the first value of all overlapping pixels.
OPERATION_LAST Takes the last value of all overlapping pixels.
OPERATION_MAX Takes the maximum value of all overlapping pixels.
OPERATION_MEAN Takes the mean value of all overlapping pixels.
OPERATION_MIN Takes the minimum value of all overlapping pixels.

Methods

Method Return Value Description
toJson() Object Returns an easily serializable object representation of the mosaic rule.
Constructor Detail

esri.layers.MosaicRule()

Creates a new MosaicRule object
Code snippets:
var mr = new esri.layers.MosaicRule();
Properties Detail

<Boolean> ascending

Indicates whether the sort should be ascending or not. This property applies to all mosaic methods where an ordering is defined except METHOD_LOCKRASTER and METHOD_SEAMLINE.

<Number[]> lockRasterIds

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.
Code snippets:
var mr = new esri.layers.MosaicRule();
mr.method = esri.layers.MosaicRule.METHOD_LOCKRASTER;
mr.lockRasterIds = [32,454,14]; 

<String> method

The mosaic method determines how the selected rasters are ordered. View the esri.layers.MosaicRule constants for valid values.
Code snippets:
var mr = new esri.layers.MosaicRule();
mr.method = esri.layers.MosaicRule.METHOD_LOCKRASTER;

<Number[]> objectIds

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

<String> operation

Defines the mosaic operation used to resolve overlapping pixels. See the constants for a list of valid values.

<String> sortField

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. The ordering is defined by the absolute value of the difference between the specified sort field value and the sort base value. For example, if the sort field is Month and the sort value is 7 (July), then the ordering is defined by ABS(Month -7).

<String> sortValue

A constant value defining a reference or base value for the sort field when the mosaic method is set to METHOD_ATTRIBUTE.

<Point> viewpoint

Defines the viewpoint location on which the ordering is defined based on the distance from the viewpoint and the nadir of rasters.
Code snippets:
var mr = new esri.layers.MosaicRule();
mr.method = esri.layers.MosaicRule.METHOD_VIEWPOINT;
mr.viewpoint = inPoint;
layer.setMosaicRule(mr);

<String> where

The where clause determines which rasters will participate in the mosaic. This property applies to all mosaic methods.
Methods Detail

toJson()

Returns an easily serializable object representation of the mosaic rule. (As of v2.0)
Return value: Object