Skip to content
Branch: master
Find file History
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Type Name Latest commit message Commit time
Failed to load latest commit information.

Create a custom raster type from the ground up for DMCII data

This sample shows how to implement a custom raster type from the ground up to provide support for DMCII data. Also provided is an optional test application to create a geodatabase and a mosaic dataset, and add data using the custom type. The main interface to be implemented is the IRasterBuilder interface along with secondary interfaces such as IRasterBuilderInit (which provides access to the parent MD), IPersistVariant (which implements persistence), IRasterBuilderInit2 and IRasterBuilder2 (new interfaces added at 10.2).
The interface IRasterFactory also needs to be implemented for the raster type to show up in the list of raster types in the Add Rasters GP tool. The factory is responsible for creating the raster type object and setting some properties on it. It also enables the use of the aster product.
Language:              C#, VB
Subject:               Raster
Organization:          Esri,
Date:                  11/17/2017
ArcObjects SDK:        10.6
Visual Studio:         2015, 2017
.NET Target Framework: 4.5



Setting up the custom function

  1. Start Visual Studio and open the solution.
  2. Build the DMCIIRasterType and TestDMCIIRasterType projects.
  3. The raster type can now be used like any of the built-in raster types in the system.

Using the custom raster type in desktop

  1. Start ArcMap.
  2. Create a mosaic dataset.
  3. Run the Add Rasters To Mosaic Dataset tool.
  4. Select the mosaic dataset created as source.
  5. Select the DMCII Raster Type from the list of raster types.
  6. To adjust raster type specific properties, click the Raster Type Properties button to the right of the Raster Type Selection drop-down list. The Raster Type properties page opens with options to pick the specific product to add (All, L1R, or L1T) and the template to apply (Raw or Stretch).
  7. Change settings as desired and click OK.
  8. Use the directory picker, or drag and drop the directory containing the DMCII data into the table showing input workspaces.
  9. Click OK.
  10. The tool adds the DMCII data to the mosaic dataset using the custom raster type.

Using the custom raster type test application

  1. Start Visual Studio and open the solution file.
  2. Open the TestDMCIIRasterType project.
  3. Edit the strings in the Setup MD Test Parameters region to specify the parameters that control what geodatabase to create, where to create the geodatabase and mosaic dataset, the names of the geodatabase and the mosaic dataset, what folder to add data from, and so on.
  4. Compile and run the program.
  5. The program console displays detailed messaging regarding the steps it performs and whether it has succeeded or not. It will also display any errors that occur.
  6. Load the created mosaic dataset into ArcMap or ArcCatalog.


Development licensing Deployment licensing
ArcGIS Desktop Standard ArcGIS Desktop Standard
ArcGIS Desktop Advanced ArcGIS Desktop Advanced
Engine Developer Kit Engine
You can’t perform that action at this time.