Need a table of raster from kernel density - how?

6683
10
01-29-2014 02:56 AM
ManneGerell
New Contributor
I am running several different methods (intitially distance and kernel density with different radius) to create rasters with same size (50*50meters) pixels of the same area. I need to export the raster to a table for analysis with HLM (multilevel statistics program), where i would like to have OID and a value from the raster for each individual pixel, but i have been unable to get this done. The rasters come with float values and no attribute table, and when i try to use Int () to convert them i do get an attribute table - but not one of each individual pixel. The attribute table i get then instead lists all the unique values i have in the raster and the number of pixels with that value - so OID is for each unique value rather than for a pixel.

I hope someone understands what i am getting at and can point me in the right direction. I'd guess i am just making some stupid mistake here that magically will solve everything.



Thanks in advance,
Manne
0 Kudos
10 Replies
JeffreyEvans
Occasional Contributor III
I guess your best bet would be to apply Int() with a scaling factor (i.e., Int("raster" * 1000) ). You would then convert the resulting raster to a point feature class and divide the attribute field by the scaling factor to coerce the data back to floating point. You could then join each resulting converted point feature class. This will give you want your are after but is highly inefficient. I would also make the argument that, at this point you have a population and not a sample, which will cause notable issues with your statistical analysis.

The more prudent, and considerably more efficient, approach would be to figure out the sample size required for an adequate sample distribution of the data. You can then create a random point sample, representing the derived optimal n, and use this to sample all of the KDE rasters. The results would be a point feature class with columns for each raster. You could then simply export the attributes as a table. 

You would use the following tools:
    1) Data Management Tools > Feature Class > Create random points
    2) Spatial Analyst Tools > Extraction > Extract Multi Values to Points
0 Kudos
SteveLynch
Esri Regular Contributor
If you use the Reclassify tool the output will be an integer raster which has a table (categorical values). Or you can convert you raster to a point feature class which has a table (unique values).
0 Kudos
ChristieMacdonald
New Contributor

Is there a way to convert to a point feature class, but only converting the raster cells with a value >0?

A large proportion of my raster cell values are 0 and I don't want to include them in the table.

0 Kudos
ShaunWalbridge
Esri Regular Contributor

You can use SetNull to set the 0 values to NoData, and then run the raster to point conversion process.

0 Kudos
ChristieMacdonald
New Contributor

Thanks Shaun!

Do you know how I might be able to transform the output raster so the resulting frequency distribution is normal?

0 Kudos
JeffreyEvans
Occasional Contributor III

A kernel density estimate is a fit distribution and is commonly referred to as a probability density function (PDF). If you transform the resulting PDF it will become somewhat meaningless.

0 Kudos
ManneGerell
New Contributor
Thank you both for the help! Problem now solved!
0 Kudos
ChristieMacdonald
New Contributor

Could you describe what you mean by Int ()? I am looking to generate a table like this from raster data (a kernel density output), but don't know how.

Thanks!

0 Kudos
ShaunWalbridge
Esri Regular Contributor

Int() is the Spatial Analyst function to convert data between floating point values (i.e. real numbers) into discrete integer values (i.e. whole numbers). For this specific problem, you might want to start with the two techniques Steve Lynch mentions, or the sampling that Jeffery Evans mentions at the end of his post if you are interested in just sampling for a statistical analysis.

0 Kudos