Hi,
thanks for your reply. I assumed something like this.
the solution with the raster paths sounds good, unfortunately it wouldn't work in my case. in my situation it is very important to query the raster properties directly in the mosaic dataset. i have to do that because i changed the reference system (define projection) of the raster datasets after i added them to a mosaic. the problem is, if i first add the rasters to a mosaic and afterwards change their reference system, the mosaic doesn't recognize the change. i found out that i have to do a synchronize that the changes are recognized. after synchronizing i would have run this python script to ensure, that really the raster properties are up to date.
From what I understand, the Mosaic is just a reference pointing to the actual Raster Datasets that are used to populate it. That is, I usually have a File Geodatabase as a workspace that contains both the Mosaic and the individual raster datasets that are added to it.So, if you change/alter the projection information on the individual raster datasets that were originally added to the Mosaic, you should see the change in the properties of the individual rows of the raster field found in the Attribute table of the mosaic.I am uncertain how to reset or redefine the coordinate properties of the Mosaic itself.Use this to check the spatial reference of the individual raster datasets:
env.workspace = r'your path to the worspace containing the raster datasets'
for raster in arcpy.ListRasters():
print raster
desc = arcpy.Describe(raster)
print("Spatial reference name: {0}:".format(desc.spatialReference.name))
I use this to redefine the spatial reference of all raster datasets contained in a workspace. Note: I make this script the source for a Toolbox script/tool and set two parameters (a workspace parameter and a spatial reference parameter)
import arcpy
from arcpy import env
from arcpy.sa import *
prjfile = arcpy.GetParameter(1)
env.workspace = arcpy.GetParameter(0)
for raster in arcpy.ListRasters():
arcpy.AddMessage(str(raster))
arcpy.DefineProjection_management(raster, prjfile)
arcpy.AddMessage("defined projection")