I am trying to develop an accuracy assessment tool using ArcObjects. As an output I would like to show a matrix with the fields such as road ,land,water etc. I just want to know how can I fetch unique values from the raster value attribute table into a matrix format.

enter image description here

  • Can you post the sample inputs that would result in the example you provided? – blah238 Apr 14 '13 at 2:32
  • I just want the row and column headers to be populated with unique values like road,building,trees and water. These attributes can be read from the attribute table of a raster file. – SNT Apr 14 '13 at 2:55
  • Then how does the Excel file come into play? It may seem simple to you but the question is not clear at all to me. – blah238 Apr 14 '13 at 3:29
  • 2
    What does the matrix represent and how should it be created? Describe a sample dataset you would use as an input and describe how it should be transformed into the desired output. We are not mind readers. – blah238 Apr 14 '13 at 5:50
  • 1
    What part of problem are you having trouble with? Creating the VAT table, or populating it with values? – Devdatta Tengshe Apr 14 '13 at 6:29

If you are trying to access the raster table to get row value, see link below (code is VBA not .NET but should give you a general e.g. of how to do it):

How to access a raster table


Use your ArcObjects code to call on the built-in tools Combine and Pivot Table. You can combine two different rasters having the same classes that you wish to compare as shown here, and before pivoting, add two new text fields to calculate strings for the class values that correspond to InRas1 and InRas2.

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.