R is perfectly willing to compute a Moran's I statistic (and probably all of the other autocorrelation metrics) for a raster. As best I can tell, PySal and ArcMap's autocorrelation tools specifically require feature data, but it's easy enough to game that requirement by converting a raster into a set of regularly spaced points or a random point sample.

My question is: should I? And if not, what to do instead?

Specifically in reference to this earlier answer:

I would point out (pardon the pun) that ecological phenomena, such as vegetation cover or habitat type, do not meet the assumption of a point process. A point pattern (process) represents a set of "events" that exhibit random or spatial characteristics that can be quantified statistically. The idea that a simulated point process is a sampled representation of a empirical process occurring across discrete areas is an erroneous assertion. Discrete areas do not represent a point process and point pattern analysis statistics are quite inappropriate!

If rasters are the wrong material for the point pattern autocorrelation measures, what is the correct way to quantify the degree of spatial autocorrelation -- local and global -- in the raster's values?


This work concerns the statistical effects of raster smoothing/aggregation. The original rasters contain either elevations or forest canopy heights taken from lidar, distance from a linear feature, counts of conifers, or (still looking for a good example of) categorical data, as well as some wholly artificial rasters designed to embody various spatial structures -- random, ordered transition from high-to-low, isotropy, etc. These are then aggregated by different statistics to a range of cell sizes and shapes. Block statistics so far, with an eye on focal statistics later on. I would also anticipate volume or biomass as a future value, if that requires something different.

  • Question is software/language agnostic, but a python answer would be most welcome.
    – J Kelly
    Jan 13 '17 at 16:22
  • 1
    The answer to your question depends on what kind of data your raster values represent. "What kind" comprises (a) whether the values are samples or full measurements; (b) whether they are totals, averages, point values, maxima, or some other property of each cell; (c) whether they are counts, intensities, totals, angles, or something else; and (d) whether they have been processed so that the cells represent (say) focal statistics within larger neighborhoods. It also depends on your reasons for quantifying autocorrelation. Could you elaborate on your circumstances?
    – whuber
    Jan 13 '17 at 18:00
  • I am trying to assemble a good survey of all/most of those.
    – J Kelly
    Jan 13 '17 at 18:19
  • By "taken from lidar" I mean state-provided DEMs which are probably averaged from many measurements per cell -- OR -- forest canopy height metrics such as 90th percentile cutoff of the lidar point cloud heights and possibly other statistics like point density.
    – J Kelly
    Jan 13 '17 at 18:22
  • whuber, I'll gratefully take a list of references or search terms if it's too much to distill. I don't even know where to start with this.
    – J Kelly
    Jan 14 '17 at 13:37

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.