wcs.org_kfisher

best way to get size on disk of raster

Discussion created by wcs.org_kfisher on Aug 12, 2011
Latest reply on Dec 18, 2017 by curtvprice
Hello all,

I have a script that requires an input raster. I would like to get the size on disk of this raster, whether it be stored in files or gdb of whatever flavor, and in whatever raster format. I cannot find a built-in gp/arcpy function for this -- neither Describe() nor GetRasterProperties() seem to provide it.

I know about os.path.getsize() and could write a function to find the size of a directory, but not inside a personal/enterprise gdb, and anyway writing a function to anticipate every possible raster format and storage location format seems like a daunting task.

Has anybody done this already, or have suggestions about a good approach?

Thanks,
Kim Fisher

Outcomes