How to get/set path to unmanaged raster dataset?

850
1
12-10-2010 03:32 AM
SteveStanton
New Contributor
How do I access the path to the image files in an unmanaged raster catalog? And how can I change it if the files have been moved?

I'm aware of the ExportRasterCatalogPaths and RepairRasterCatalogPaths in ESRI.ArcGIS.DataManagementTools, but it seems like a lot of jumping through hoops, and documentation of GP tools leaves something to be desired.

I had hoped to do it like this:

string GetPath(IRasterValue rv)
{
[INDENT]    IDatasetName dsn = (rv.RasterDatasetName as IDatasetName);
    IWorkspaceName wsn = dsn.WorkspaceName;
    return wsn.PathName;
[/INDENT]}

But that just gives me the path of the enclosing geodatabase. Looking at the files in the GDB folder, I see things like *.CatItemsByPhysicalName.atx, which I'm guessing contains the information I'm after. Is there a way to get inside these?

I'm working with ArcGIS Engine 10.
0 Kudos
1 Reply
RobertBerger
New Contributor III
Greetings,

Yes these Geoprocessing tools are the ones to use to change the paths. I am sure you can do something similar through code since the paths have to be stored in the catalog table somewhere. I don't know exactly how to access these fields in the table or how to edit them through code though.

Robert
0 Kudos