Monday, March 16, 2009

Continuous or Discrete Raster

Ever needed to know if the raster you're working with is continuous or discrete? If so, you only need to open ArcCatalog and bring up the properties and check out the Source Type. While this is usually something that's pretty obvious given the type of data, there are times when it's good to know programatically whether a raster is continuous or discrete. However, the only problem is trying to determe how to do this. Unfortunately, as of ArcGIS 9.3 Service Pack 1 you won't be able to find the answer because the property needed to do this is NOT documented and it took some effort to find it. The answers is to use IRasterBand::RepresentationType. With this property there is an enumeration called rstRepresentationType which returns DT_THEMATIC (discrete), DT_ATHEMATIC (continuous) or DT_EITHER (both). So, not only is this method not documented, the enumeration's values don't match the wording in ArcCatalog. Truly lame. Anyway, I hope this helps someone else.

No comments:

Post a Comment