Euclidean Nearest-Neighbor Distance (ENN)

ENN equals the distance (m) to the nearest neighboring patch of the same type, based on shortest edge-to-edge distance.
Note that the edge-to-edge distances are from cell center to cell center.
ENN equals 0 if only one patch is present and has no upper limit. Units is defined by the projection so make sure you have a meter-based projection.