Updating mosaic dataset footprint table row's date values ArcObjects SDK

579
1
03-04-2021 11:32 PM
tanerkoka
Occasional Contributor II

Hi ,

We have mosaic dataset with our mosaic datas, and we view our mosaic data from here. However, it is desired to sort our mosaic data by date (TARIH) by opening a date (TARIH)  field later. 

Is it possible to avoid wasting time by using the program like ArcMap Tool (Arc Objects SDK Win app ) instead of adding one to the mosaic date and date information? If possible, can you share a sample link or code? 

The table to be updated is a Footprint and its table is as in the picture.

UpdateMosaicDataset.png

 

 

Thanks For Helping

 

 

 

0 Kudos
1 Reply
KirkKuykendall1
Occasional Contributor III

I think IMosaicDataset.Catalog returns a polygon featureclass containing the footprints.

This works for me (Adapted from here  )

 

// Input database and Mosaic Dataset
string MDWorkspaceFolder = @"D:\nhd_data\mosaictest1.gdb";
string MDName = @"mymosaic";

// Open MD
Type factoryType = Type.GetTypeFromProgID("esriDataSourcesGDB.FileGDBWorkspaceFactory");
IWorkspaceFactory mdWorkspaceFactory = (IWorkspaceFactory)Activator.CreateInstance(factoryType);
IWorkspace mdWorkspace = mdWorkspaceFactory.OpenFromFile(MDWorkspaceFolder, 0);
IRasterWorkspaceEx workspaceEx = (IRasterWorkspaceEx)(mdWorkspace);
IMosaicDataset mosaicDataset = (IMosaicDataset)workspaceEx.OpenRasterDataset(MDName);
IFeatureClass footprintFeatclass = mosaicDataset.Catalog;
for (int i = 0; i < footprintFeatclass.Fields.FieldCount; i++)
    Console.WriteLine(footprintFeatclass.Fields.Field[i].Name);

 

 

0 Kudos