How can we get the Uncompressed Size of a raster as shown in the layer properties below using ArcObjects?
enter image description here
1 Answer 1
For file based rasters, have a look at the IDatasetFileStat2 interface. It appears that the RasterDataset CoClass implements this interface. So you would need a reference to IRasterDataset3 interface first, then you could cast that information into IDatasetFileStat2 and store it into a variable.
I don't see an SDE equivalent so that method might work on SDE as well. The only source that the documentation guarantees it won't work with is personal geodatabases. But who uses those to store rasters in anyway?
There is fairly good documentation on how to get a reference to the IRasterDataset interface here.
-
There really is no way to tell the storage requirement in an ArcSDE raster, since the database may have additional overhead (e.g. extent size, high water mark, pages marked as deleted but not yet reused, et. al.).Vince– Vince2014年09月22日 13:54:37 +00:00Commented Sep 22, 2014 at 13:54
columns * rows * bands * pixel_depth / 8
?