AnsweredAssumed Answered

How to programmatically access the paths of a mosaic dataset's source rasters?

Question asked by DSlayback on Aug 27, 2015
Latest reply on Aug 27, 2015 by DSlayback

I am working with mosaic datasets with many source rasters (10's to 100's of thousands) and we need to keep track of the filesystem path of those source rasters. My process to add rasters to the mosaic dataset automatically populates an added "path" field in the footprints table of the mosaic dataset. However, in a small number of cases, this fails (for unknown reasons), and the field is left as Null. So I'm looking for a way to fix those, after the fact.

 

I know that you can see the source raster's path by clicking on <RASTER> in the footprints table, going to the Functions tab, and then right-click --> Properties of the listed image. But I cannot do this manually for the hundreds of Null entries.  I would like to fully automate via a python script or custom GP service.

 

Is there a way to access that information, for example even via the Field Calculator in the footprints table? The "raster" item is available in the list of fields, but I've no idea how to write a python or VB Script expression to extract the source file's path from that 'raster' item, or any other information, or if thats even possible.  Or if there is another way to access this information....any suggestions much appreciated!

Outcomes