Select to view content in your preferred language

Extraction all values from attribute table

5924
8
06-14-2015 06:55 AM
DitlevReventlow
Deactivated User

Hey Everyone.

Is there anyway to get Arcmap to show all pixel values in a attribute table. Basically so that instead of having a attribute table like this:

Rowid          Count           Value_1          Value_2

1                 4                    2                     1 

2                 3                    2                     3

.......

, data is instead presented like below

Rowid     Value_1          Value_3

1               2                    1                             

2               2                    1    

3               2                    1

4               2                    1

5               2                    3

6               2                    3

7               2                    3

..........

It is because for me it is much easier to work with the data if it is in the this format (Especially if you import the data into excel, since I would like to create a scatter plot here with Value_1 and Value_2) 

Alternatively is there anyway to get Arcmap to plot values, find regression equation and R^2 values?

There are many thousand rows in the attribute table so manual alteration is not an option.

Thank you!

Best regards

Ditlev Reventlow

Tags (1)
0 Kudos
8 Replies
XanderBakker
Esri Esteemed Contributor

To convert a raster to a table and create a row for each pixel, you could use the Raster to Points conversion tool and then export the featureclass to Excel. Is this thread related to: only extract some rows from an raster attribute table ?

Alternatively, you might be interested in this video: http://video.esri.com/watch/1949/performing-regression-analysis-using-raster-data

And the Help topics:

ArcGIS Help (10.2, 10.2.1, and 10.2.2)  and ArcGIS Help (10.2, 10.2.1, and 10.2.2)

DitlevReventlow
Deactivated User

Yes the threads are somewhat related to each other, two aspects of a problem that I encountered in getting the results into excel in the best way.

Thank you for the tip about raster to point conversion. It seems like it is only possible to convert it one column at a time and I have 3 columns that I need to have in the attribute table.

Therefore, If I use join on this "pointid" column that is generate from "the raster to point" 3 times (one for each newly derived feature) then the data of the columns should be fitted to the right points, right?

0 Kudos
curtvprice
MVP Esteemed Contributor

Yes, that would do it. The Join Field tool will work. Of course if you have millions of cells in your raster you may start running into trouble with the size of your dataset...

0 Kudos
XanderBakker
Esri Esteemed Contributor

The alternative could be to convert 1 raster to points and use that point featureclass in the Extract Multi Values to Points tool. This will add the values of a number of raster as attributes to the point featureclass and there will be no need to join the results.

0 Kudos
DanPatterson_Retired
MVP Emeritus

You should also learn to use NumPy as in this example

DitlevReventlow
Deactivated User

Thanks Dan, I will look into that!

0 Kudos
DanPatterson_Retired
MVP Emeritus

Ditlev...

I have moved this to Managing Data since it has nothing to do with help on GeoNet (ie the GeoNet Help place

DitlevReventlow
Deactivated User

Thank you, I just thought this was general help.

0 Kudos