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


IRasterGeometryProc.Merge Method (ArcObjects .NET 10.5 SDK)
ArcObjects Library Reference (DataSourcesRaster)  

IRasterGeometryProc.Merge Method

Merges the input rasters into a single dataset.

[Visual Basic .NET]
Public Function Merge ( _
    ByVal saveas_name As String, _
    ByVal ipWorkspace As IWorkspace, _
    ByVal outRasterFormat As String, _
    ByVal CellSize As Double, _
    ByVal ipSR As ISpatialReference, _
    ByVal pRaster As IRaster _
) As IRaster
[C#]
public IRaster Merge (
    string saveas_name,
    IWorkspace ipWorkspace,
    string outRasterFormat,
    double CellSize,
    ISpatialReference ipSR,
    IRaster pRaster
);
[C++]
HRESULT Merge(
  BSTR saveas_name,
  IWorkspace* ipWorkspace,
  BSTR outRasterFormat,
  double CellSize,
  ISpatialReference* ipSR,
  IRaster* pRaster,
  IRaster** ippOutRaster
);
[C++]

Parameters saveas_name [in] saveas_name is a parameter of type BSTR ipWorkspace [in]
ipWorkspace is a parameter of type IWorkspace outRasterFormat [in] outRasterFormat is a parameter of type BSTR CellSize [in] CellSize is a parameter of type double ipSR [in]
ipSR is a parameter of type ISpatialReference pRaster [in]
pRaster is a parameter of type IRaster ippOutRaster [out, retval]
ippOutRaster is a parameter of type IRaster

Product Availability

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

Remarks

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

The Merge method combines multiple adjacent single band raster datasets into a single output raster dataset. Merge determines the value of an overlapping output cell from the last NoData cell input of the input rasters.

The ipRaster is a Raster object that contains two or more bands, and the Merge operation combines all the bands of this raster into a 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