How to create Military Analyst raster layers


Many of the ArcGIS Military Analyst and MOLE extension application programming interface (API) objects you have used in the past have equivalent or near equivalent objects in the ArcGIS 10 ArcObjects API. These new objects should now be used and do not require a Military Analyst extension or MOLE extension license. See Migrating from Military Analyst and MOLE for information on how to accomplish tasks in ArcGIS 10 that previously required the Military Analyst and MOLE APIs.
Instructions:
  1. Import the defensesolutions package.
  2. Create IWorkspaceFactory from an AccessWorkspaceFactory.
  3. Create a IRasterWorkspaceEx and pass it to method createMARasterLayer.
[Java]
//Create Raster layer
public IMARasterLayer createMARasterLayer(IRasterWorkspaceEx rasterWsExt, String
    name){
    try{
        //rasterWsExt represets the workspace where the raster catalog resides.
        //name is the name of the MA Raster catalog 
        //Open the raster catalog 
        com.esri.arcgis.geodatabase.IRasterCatalog rasCatalog;
        rasCatalog = rasterWsExt.openRasterCatalog(name);
        ITable table = new ITableProxy(rasCatalog);
        //Create the MARasterLayer 
        IMARasterLayer maRasterLy = new MARasterLayer();
        maRasterLy.setup(table);
        if (!maRasterLy.setup(table))
            return null;
        else
            return maRasterLy;
    }
    catch (Exception ex){
        ex.printStackTrace();
    }
    return null;
}


See Also:

Defense Solutions Library Reference - Creating and Displaying Military Analyst Layers
Sample: How to create Military Analyst DTED layers




Development licensing Deployment licensing
Engine Developer Kit: Military Analyst Engine Runtime: Military Analyst