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


How to build a boundary on a Mosaic dataset (ArcObjects .NET 10.6 SDK)
ArcObjects Help for .NET developers > Developing with ArcGIS > Learning ArcObjects > Managing data > Working with image and raster data > Working with Mosaic datasets > How to build a boundary on a Mosaic dataset (ArcObjects .NET 10.6 SDK)

How to build a boundary on a Mosaic dataset


Building a boundary on a Mosaic dataset

The Mosaic dataset operation interface is used to perform operations on a Mosaic dataset. Do the following steps to build a boundary on a Mosaic Dataset:
  1. Create a build boundary parameters object.
  2. Set flags that control boundary generation.
  3. Use the Mosaic dataset operation interface to build the boundary.

    See the following code example:
[C#]
public void BuildBoundaryOnMD(IMosaicDataset theMosaicDataset)
{
    // The mosaic dataset operation interface is used to perform operations on 
    // a mosaic dataset.
    IMosaicDatasetOperation theMosaicDatasetOperation=(IMosaicDatasetOperation)
        (theMosaicDataset);

    // Create a build boundary parameters object.
    IBuildBoundaryParameters boundaryArgs=new BuildBoundaryParametersClass();
    // Set flags that control boundary generation.
    boundaryArgs.AppendToExistingBoundary=true;
    // Use the mosaic dataset operation interface to build the boundary.
    theMosaicDatasetOperation.BuildBoundary(boundaryArgs, null);
}
[VB.NET]
Public Sub BuildBoundaryOnMD(ByVal theMosaicDataset As IMosaicDataset)
    ' The mosaic dataset operation interface is used to perform operations on
    ' a mosaic dataset.
    Dim theMosaicDatasetOperation As IMosaicDatasetOperation =
    DirectCast((theMosaicDataset), IMosaicDatasetOperation)
    
    ' Create a build boundary parameters object.
    Dim boundaryArgs As IBuildBoundaryParameters=New BuildBoundaryParametersClass()
    ' Set flags that control boundary generation.
    boundaryArgs.AppendToExistingBoundary=True
    ' Use the mosaic dataset operation interface to build the boundary.
    theMosaicDatasetOperation.BuildBoundary(boundaryArgs, Nothing)
End Sub


See Also:

How to open a Mosaic dataset




To use the code in this topic, reference the following assemblies in your Visual Studio project. In the code files, you will need using (C#) or Imports (VB .NET) directives for the corresponding namespaces (given in parenthesis below if different from the assembly name):
Development licensing Deployment licensing
ArcGIS Desktop Standard ArcGIS Desktop Standard
ArcGIS Desktop Advanced ArcGIS Desktop Advanced