Can I detect if pyramids have been created for a raster in Arcpy?

1119
2
08-11-2014 04:01 PM
AllanMills
New Contributor III

I'm writing a tool in Python that looks through rasters stored in a workspace and notes down certain details about them. The results are stored in a feature class. One of the things I'm trying to determine about the rasters is if pyramids have been made for each of them. The only way I can find so far is to look for a .rrd file with the raster. But that won't work for any rasters that are stored in a geodatabase. Can someone please tell me if there is some other way in Python to detect if pyramids have been created?

0 Kudos
2 Replies
DanPatterson_Retired
MVP Emeritus

Apparently you can't unless you can program in a right-click (can't find anything anywhere, except *.ovr files can also be created, but I don't know if you can check for them)

0 Kudos
OwenEarley
Occasional Contributor III

I am not aware of any way to do this using arcpy but would also be interested to know if this functionality exists.

The functionality *should* be part of arcpy describe but it doesn't seem to be exposed. It is obviously there in the underlying ArcObjects as the Layer Properties shows this in the Raster Information section:

lyr-props-pyramids.png

Also, note that as of ArcGIS 10 pyramids for file based rasters will be created as OVR files instead of RRD files. However this doesn't help if the raster is in a geodatabase.

Owen

Spatial XP