How can we get the Uncompressed Size of a raster as shown in the layer properties below using ArcObjects?

enter image description here

  • 1
    Do you mean just columns * rows * bands * pixel_depth / 8?
    – Vince
    Sep 12, 2014 at 5:40
  • 1
    That's all it is. ( Rows x Columns * Bits * band_count ) / 8 to put it into bytes - add some for the header but if you look closely that Uncompresses Size listed there does not include header allowance (most noticeable on small rasters as the header is a greater % of the total file size). This is true for any uncompressed BINARY format, text and other formats would be much bigger. If you're really interested, images with less than 8 bits must make whole words (32bits) for each row so that may not be exactly correct for images with less than a byte-per-pixel. Sep 12, 2014 at 5:44
  • 2
    to downvoter - is it really that bad a question?
    – vinayan
    Sep 12, 2014 at 5:51
  • @MichaelMiles-Stimson - thank you..that gives me a value close to this..but how to get this exact value? Does arcobjects expose it through any interface?
    – vinayan
    Sep 12, 2014 at 6:03
  • 1
    I don't see importance of this question (considered bounty was added). Why should Uncompressed Size of a raster be of interest to people? Sep 22, 2014 at 13:34

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
    Sep 22, 2014 at 13:54

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.