com.esri.arcgis.geoprocessing.tools.datamanagementtools
Class Mosaic
java.lang.Object
com.esri.arcgis.geoprocessing.AbstractGPTool
com.esri.arcgis.geoprocessing.tools.datamanagementtools.Mosaic
- All Implemented Interfaces:
- GPTool
public class Mosaic
- extends AbstractGPTool
Mosaics multiple input rasters into an existing raster dataset.
The Mosaic tool is contained in the Data Management Tools tool box.
Usage tips:
- The target raster must be an existing raster dataset, which can be an empty raster dataset or one already containing data.
- Mosaic is useful when two or more adjacent raster datasets need to be merged into one entity. Some mosaic techniques can help minimize the abrupt changes along the boundaries of the overlapping rasters.
- The overlapping areas of the mosaic can be handled in several ways; for example, you can set the tool to keep only the first raster dataset's data, or you can blend the overlapping cell values. There are also several options to determine how to handle a color map, if the raster dataset uses one. For example, you can keep the color map of the last raster dataset used in the mosaic.
- The Target layer is considered the first raster in the list of Input Rasters.
- For mosaicking of discrete data, First, Minimum, or Maximum Mosaic Operator options will provide the most meaningful results. The Blend and Mean Mosaic Operator options are best suited for continuous data.
- Whenever possible, use the Last Mosaic Operator to mosaic raster datasets to an existing raster dataset in a file geodatabase or ArcSDE geodatabase; it is by far the most effective way to mosaic.
- The pixel type will be the same as the target raster dataset.
- For file-based rasters and personal geodatabase rasters, the Ignore Background Value must be set to the same value as NoData in order for the background value to be ignored. File geodatabase rasters and ArcSDE rasters will simply work without this extra step.
- When mosaicking with raster datasets containing color maps, it is important to note differences across the color maps for each raster dataset you choose to mosaic. You are still able to use the Mosaic tool even if the raster datasets have different color maps; however, you must choose the proper color map mode. If an improper color map mode is chosen, your output might not turn out as you expected.
- The Color Matching Method allows you to choose an algorithm to color match the datasets in your mosaic.
- For floating-point input raster datasets of different resolutions or when cells are not aligned, it is recommended to resample all the data using bilinear interpolation or cubic convolution before running Mosaic. Otherwise, Mosaic will automatically resample the raster datasets using nearest neighbor resampling, which is not appropriate for continuous data types.
- The Mosaic tool doesn't use the because the tool tends to create very large raster datasets and the output extent setting might accidentally clip your data. If the output extent does need to be adjusted, the can achieve that operation.
Constructor Summary |
Mosaic()
Creates the Mosaic tool with defaults. |
Mosaic(Object inputs,
Object target)
Creates the Mosaic tool with the required parameters. |
Mosaic
public Mosaic()
- Creates the Mosaic tool with defaults.
Initializes the array of tool parameters with the default values specified when the tool was created.
Mosaic
public Mosaic(Object inputs,
Object target)
- Creates the Mosaic tool with the required parameters.
Initializes the array of tool parameters with the values as specified for the required parameters and with the default values for the other parameters.
- Parameters:
inputs
- the input raster datasets.target
- the target raster dataset. this raster dataset must already exist. The Target layer is considered the first raster in the list of Input Rasters.
getInputs
public Object getInputs()
- Returns the Input Rasters parameter of this tool .
This parameter is the input raster datasets.
This is a required parameter.
- Returns:
- the Input Rasters
setInputs
public void setInputs(Object inputs)
- Sets the Input Rasters parameter of this tool .
This parameter is the input raster datasets.
This is a required parameter.
- Parameters:
inputs
- the input raster datasets.
getTarget
public Object getTarget()
- Returns the Target Raster parameter of this tool .
This parameter is the target raster dataset. this raster dataset must already exist. The Target layer is considered the first raster in the list of Input Rasters.
This is a required parameter.
- Returns:
- the Target Raster
setTarget
public void setTarget(Object target)
- Sets the Target Raster parameter of this tool .
This parameter is the target raster dataset. this raster dataset must already exist. The Target layer is considered the first raster in the list of Input Rasters.
This is a required parameter.
- Parameters:
target
- the target raster dataset. this raster dataset must already exist. The Target layer is considered the first raster in the list of Input Rasters.
getMosaicType
public String getMosaicType()
- Returns the Mosaic Operator parameter of this tool .
This parameter is the method used to mosaic overlapping areas. the Target layer is considered the first raster in the list of Input Rasters. for more information about each mosaic operator, refer to Mosaic Operator.
This is an optional parameter.
- Returns:
- the Mosaic Operator
setMosaicType
public void setMosaicType(String mosaicType)
- Sets the Mosaic Operator parameter of this tool .
This parameter is the method used to mosaic overlapping areas. the Target layer is considered the first raster in the list of Input Rasters. for more information about each mosaic operator, refer to Mosaic Operator.
This is an optional parameter.
- Parameters:
mosaicType
- the method used to mosaic overlapping areas. the Target layer is considered the first raster in the list of Input Rasters. for more information about each mosaic operator, refer to Mosaic Operator.
getColormap
public String getColormap()
- Returns the Mosaic Colormap Mode parameter of this tool .
This parameter is the method used to choose which colormap from the input rasters will be applied to the mosaic output. the Target layer is considered the first raster in the list of Input Rasters. for more information about each colormap mode, refer to Mosaic colormap mode.
This is an optional parameter.
- Returns:
- the Mosaic Colormap Mode
setColormap
public void setColormap(String colormap)
- Sets the Mosaic Colormap Mode parameter of this tool .
This parameter is the method used to choose which colormap from the input rasters will be applied to the mosaic output. the Target layer is considered the first raster in the list of Input Rasters. for more information about each colormap mode, refer to Mosaic colormap mode.
This is an optional parameter.
- Parameters:
colormap
- the method used to choose which colormap from the input rasters will be applied to the mosaic output. the Target layer is considered the first raster in the list of Input Rasters. for more information about each colormap mode, refer to Mosaic colormap mode.
getBackgroundValue
public double getBackgroundValue()
- Returns the Ignore Background Value parameter of this tool .
This parameter is use this option to remove the unwanted values created around the raster data. The value specified will be distinguished from other valuable data in the raster dataset. For example, a value of zero along the raster dataset's borders will be distinguished from zero values within the raster dataset. the pixel value specified will be set to NoData in the output raster dataset. for file-based rasters and personal geodatabase rasters, the Ignore Background Value must be set to the same value as NoData in order for the background value to be ignored. ArcSDE and file geodatabase rasters will work without this extra step.
This is an optional parameter.
- Returns:
- the Ignore Background Value
setBackgroundValue
public void setBackgroundValue(double backgroundValue)
- Sets the Ignore Background Value parameter of this tool .
This parameter is use this option to remove the unwanted values created around the raster data. The value specified will be distinguished from other valuable data in the raster dataset. For example, a value of zero along the raster dataset's borders will be distinguished from zero values within the raster dataset. the pixel value specified will be set to NoData in the output raster dataset. for file-based rasters and personal geodatabase rasters, the Ignore Background Value must be set to the same value as NoData in order for the background value to be ignored. ArcSDE and file geodatabase rasters will work without this extra step.
This is an optional parameter.
- Parameters:
backgroundValue
- use this option to remove the unwanted values created around the raster data. The value specified will be distinguished from other valuable data in the raster dataset. For example, a value of zero along the raster dataset's borders will be distinguished from zero values within the raster dataset. the pixel value specified will be set to NoData in the output raster dataset. for file-based rasters and personal geodatabase rasters, the Ignore Background Value must be set to the same value as NoData in order for the background value to be ignored. ArcSDE and file geodatabase rasters will work without this extra step.
getNodataValue
public double getNodataValue()
- Returns the NoData Value parameter of this tool .
This parameter is all the pixels with the specified value will be set to NoData in the output raster dataset.
This is an optional parameter.
- Returns:
- the NoData Value
setNodataValue
public void setNodataValue(double nodataValue)
- Sets the NoData Value parameter of this tool .
This parameter is all the pixels with the specified value will be set to NoData in the output raster dataset.
This is an optional parameter.
- Parameters:
nodataValue
- all the pixels with the specified value will be set to NoData in the output raster dataset.
getOnebitToEightbit
public String getOnebitToEightbit()
- Returns the Convert 1 bit data to 8 bit parameter of this tool .
This parameter is choose whether the input 1-bit raster dataset will be converted to an 8-bit raster dataset. In this conversion the value 1 in the input raster dataset will be changed to 255 in the output raster dataset. This is useful when importing a 1-bit raster dataset to ArcSDE. One-bit raster dataset have 8-bit pyramid layers when stored in a file system, but in ArcSDE, 1-bit raster datasets can only have 1-bit pyramid layers, which makes the display unpleasant. By converting the data to 8-bit in ArcSDE, the pyramid layers are built as 8-bit instead of 1-bit, resulting in a proper raster dataset in the display.
This is an optional parameter.
- Returns:
- the Convert 1 bit data to 8 bit
setOnebitToEightbit
public void setOnebitToEightbit(String onebitToEightbit)
- Sets the Convert 1 bit data to 8 bit parameter of this tool .
This parameter is choose whether the input 1-bit raster dataset will be converted to an 8-bit raster dataset. In this conversion the value 1 in the input raster dataset will be changed to 255 in the output raster dataset. This is useful when importing a 1-bit raster dataset to ArcSDE. One-bit raster dataset have 8-bit pyramid layers when stored in a file system, but in ArcSDE, 1-bit raster datasets can only have 1-bit pyramid layers, which makes the display unpleasant. By converting the data to 8-bit in ArcSDE, the pyramid layers are built as 8-bit instead of 1-bit, resulting in a proper raster dataset in the display.
This is an optional parameter.
- Parameters:
onebitToEightbit
- choose whether the input 1-bit raster dataset will be converted to an 8-bit raster dataset. In this conversion the value 1 in the input raster dataset will be changed to 255 in the output raster dataset. This is useful when importing a 1-bit raster dataset to ArcSDE. One-bit raster dataset have 8-bit pyramid layers when stored in a file system, but in ArcSDE, 1-bit raster datasets can only have 1-bit pyramid layers, which makes the display unpleasant. By converting the data to 8-bit in ArcSDE, the pyramid layers are built as 8-bit instead of 1-bit, resulting in a proper raster dataset in the display.
getMosaickingTolerance
public double getMosaickingTolerance()
- Returns the Mosaicking Tolerance parameter of this tool .
This parameter is when mosaicking takes place, the target and the source pixels do not always line up exactly. When there is a misalignment of pixels, a decision needs to be made whether resampling takes place, or whether the data should be shifted. The mosaicking tolerance controls whether resampling of the pixels take place, or if the pixels should be shifted. if the difference in pixel alignment (of the incoming dataset and the target dataset) is greater than the tolerance, resampling will take place. If the difference in pixel alignment (of the incoming dataset and the target dataset) is less than the tolerance, resampling will not take place (instead, a shift is performed). the unit of tolerance is a pixel; the valid value range is 0 to 0.9999. The maximum a pixel can be shifted is 0.5, so anything you set that is greater than 0.5 will guarantee a shift takes place. A tolerance of zero guarantees resampling, if there is a misalignment in pixels. for example, the source and target pixels have a misalignment of 0.25. If the mosaicking tolerance is set to 0.2, then resampling will take place since the pixel misalignment is greater than the tolerance. If the mosaicking tolerance is set to 0.3, then the pixels will be shifted.
This is an optional parameter.
- Returns:
- the Mosaicking Tolerance
setMosaickingTolerance
public void setMosaickingTolerance(double mosaickingTolerance)
- Sets the Mosaicking Tolerance parameter of this tool .
This parameter is when mosaicking takes place, the target and the source pixels do not always line up exactly. When there is a misalignment of pixels, a decision needs to be made whether resampling takes place, or whether the data should be shifted. The mosaicking tolerance controls whether resampling of the pixels take place, or if the pixels should be shifted. if the difference in pixel alignment (of the incoming dataset and the target dataset) is greater than the tolerance, resampling will take place. If the difference in pixel alignment (of the incoming dataset and the target dataset) is less than the tolerance, resampling will not take place (instead, a shift is performed). the unit of tolerance is a pixel; the valid value range is 0 to 0.9999. The maximum a pixel can be shifted is 0.5, so anything you set that is greater than 0.5 will guarantee a shift takes place. A tolerance of zero guarantees resampling, if there is a misalignment in pixels. for example, the source and target pixels have a misalignment of 0.25. If the mosaicking tolerance is set to 0.2, then resampling will take place since the pixel misalignment is greater than the tolerance. If the mosaicking tolerance is set to 0.3, then the pixels will be shifted.
This is an optional parameter.
- Parameters:
mosaickingTolerance
- when mosaicking takes place, the target and the source pixels do not always line up exactly. When there is a misalignment of pixels, a decision needs to be made whether resampling takes place, or whether the data should be shifted. The mosaicking tolerance controls whether resampling of the pixels take place, or if the pixels should be shifted. if the difference in pixel alignment (of the incoming dataset and the target dataset) is greater than the tolerance, resampling will take place. If the difference in pixel alignment (of the incoming dataset and the target dataset) is less than the tolerance, resampling will not take place (instead, a shift is performed). the unit of tolerance is a pixel; the valid value range is 0 to 0.9999. The maximum a pixel can be shifted is 0.5, so anything you set that is greater than 0.5 will guarantee a shift takes place. A tolerance of zero guarantees resampling, if there is a misalignment in pixels. for example, the source and target pixels have a misalignment of 0.25. If the mosaicking tolerance is set to 0.2, then resampling will take place since the pixel misalignment is greater than the tolerance. If the mosaicking tolerance is set to 0.3, then the pixels will be shifted.
getOutput
public Object getOutput()
- Returns the Output Raster parameter of this tool (Read only).
This is an derived parameter.
- Returns:
- the Output Raster
getMatchingMethod
public String getMatchingMethod()
- Returns the Color Matching Method parameter of this tool .
This parameter is choose the color matching method to apply to the rasters.
This is an optional parameter.
- Returns:
- the Color Matching Method
setMatchingMethod
public void setMatchingMethod(String matchingMethod)
- Sets the Color Matching Method parameter of this tool .
This parameter is choose the color matching method to apply to the rasters.
This is an optional parameter.
- Parameters:
matchingMethod
- choose the color matching method to apply to the rasters.
getToolName
public String getToolName()
- Returns the name of this tool.
- Returns:
- the tool name
getToolboxName
public String getToolboxName()
- Returns the name of the tool box containing this tool.
- Returns:
- the tool box name
getToolboxAlias
public String getToolboxAlias()
- Returns the alias of the tool box containing this tool.
- Returns:
- the tool box alias