This document is archived and information here might be outdated.  Recommended version.


IRasterGeometryProc.Mosaic Method (ArcObjects .NET 10.8 SDK)
ArcObjects Help for .NET developers > ArcObjects Help for .NET developers > ArcObjects namespaces > DataSourcesRaster > ESRI.ArcGIS.DataSourcesRaster > Interfaces > IR > IRasterGeometryProc Interface > IRasterGeometryProc.Mosaic Method
ArcGIS Developer Help

IRasterGeometryProc.Mosaic Method

Mosaics the input rasters into a single dataset.

[Visual Basic .NET]
Public Function Mosaic ( _
    ByVal saveas_name As String, _
    ByVal pWorkspace As IWorkspace, _
    ByVal outRasterFormat As String, _
    ByVal CellSize As Double, _
    ByVal pSR As ISpatialReference, _
    ByVal pRaster As IRaster _
) As IRaster
[C#]
public IRaster Mosaic (
    string saveas_name,
    IWorkspace pWorkspace,
    string outRasterFormat,
    double CellSize,
    ISpatialReference pSR,
    IRaster pRaster
);
[C++]
HRESULT Mosaic(
  BSTR saveas_name,
  IWorkspace* pWorkspace,
  BSTR outRasterFormat,
  double CellSize,
  ISpatialReference* pSR,
  IRaster* pRaster
);
[C++]
Parameters
saveas_name [in]

saveas_name is a parameter of type BSTR pWorkspace [in]
pWorkspace is a parameter of type IWorkspace* outRasterFormat [in]
outRasterFormat is a parameter of type BSTR CellSize [in]
CellSize is a parameter of type double pSR [in]
pSR is a parameter of type ISpatialReference* pRaster [in]
pRaster is a parameter of type IRaster*

Product Availability

Available with ArcGIS Engine, ArcGIS Desktop, and ArcGIS Server.

Remarks

Mosaic only work with single band images. It is recomended to use MosaicRaster object, which handles both single band and multiple band images,to perform mosaic operation.

The Mosaic method combines multiple adjacent single band raster datasets into a single output raster dataset. Mosaic determines the value of an output call by averaging the values of the overlapping input cells.

The ipRaster is a Raster object that contains two or more raster bands, and the Mosaic operation combines all the bands of the raster into one single band raster dataset on disk.

Passing Nothing to the ipSR will result in an output with an unknown spatial reference.

The OutRasterFormat can only be one of the following formats. The format strings used for the supported formats are below, and they are case sensitive:

Format Name String Used
Imagine "IMAGINE Image"
TIFF "TIFF"
GRID "GRID"
JPEG "JPG"
JP2000 "JP2"
BMP "BMP"
PNG "PNG"
GIF "GIF"
PCI Raster "PIX"
USGS ASCII DEM "DEM"
X11 Pixmap "XPM"
PCRaster "MAP"
USGS ASCII DEM "DEM"
Memory Raster "MEM"
Geodatabase Raster "GDB"

 

 

 

See Also

IRasterGeometryProc Interface