Select to view content in your preferred language

How do I count raster cell values?

1032
2
05-02-2013 07:26 PM
GeorgeSinkinson
Emerging Contributor
I'm having a severe senior moment ...
I cannot remember how I obtained the following information in two tables:

Value Red                 Green                 Blue                 Opacity        Count
11 0.28000000000 0.42000000000 0.63000000000 1.00000000000 3487.00000000000
21 0.87000000000 0.79000000000 0.79000000000 1.00000000000 2822.00000000000
...

Value Red                 Green           Blue                 Opacity         Land_Cover
11 0.27843137255 0.41960784314 0.62745098039 1.00000000000 Open Water
21 0.86666666667 0.78823529412 0.78823529412 1.00000000000 Developed, Open Space
...

I'm working with 2 NLCD raster datasets and masked them with the same county polygon.
I applied the colormap that I exported from the original NLCD
I then ran some tool, and probably exported the tables.

The RGB values are useful - if you multiply each by 256, you get the individual RGB numbers used in the colormap,
and can use them to match the colors in Excel.

I'm using ArcMap 10.1 and not always this much of an idiot ...

Looking at the datasets in file explorer, I can see:
xyz.tif
xyz.tif.aux.xml
xyz.tif.vat.dbf      <---  the data shows in this one
xyz.tif.xml
xyz.tif.tfw

How is the .vat file created?
0 Kudos
2 Replies
DuncanHornby
MVP Notable Contributor
The attribute table of a integer raster normally has a value field (the pixel value) and a count field (the number of pixels in the raster with that value). So to see the words "open water/open space" you must have joined another table to it. The other table must have 2 fields in it: one for the pixel value and another the descriptive text (in your case a land class). So at some point you have joined this table and I guess you need to find that table or recreate it?

Duncan
0 Kudos
GeorgeSinkinson
Emerging Contributor
Thank you Duncan.

I understood that the attribute table had values and counts,
but couldn't figure out where in the world the R/G/B/Opacity came from.
I don't believe I joined any table except to apply a colormap,
and I'm too lazy to come up the decimals and type them in...

I guess I was just looking for a tool output that would reproduce
what eventually showed up in a table.

My guess is that it has something to do with the colormap.
Is there a way to display the contents of the colormap
in human readable form?
0 Kudos