1

Let's say I have a set of points and I want to get an indication of their spatial distribution. That is, if all points are at one location a possible return value would be 0, whereas if all points are distributed evenly the return value would be 1.

The use case: I have two data set which cover the same area. I'm developing a tool to compare both sets with each other. I also want to include a rough indication of the point distribution to detect differences in the sets.

My program will be written in python using open source tools (so no arcgis).

PolyGeo
  • 65,136
  • 29
  • 109
  • 338
LarsVegas
  • 2,536
  • 3
  • 30
  • 47
  • Maybe this question will help you http://gis.stackexchange.com/questions/4484/how-to-compare-two-spatial-point-patterns – Francisco Puga Feb 20 '14 at 11:30
  • This type of analysis can be accomplished using Ripley's K function. I am not aware of an implementation of Ripley's K in Python directly, however, you may be able to RPy to access the necessary functions in R. R's spatstat package has everything you need. – Aaron Feb 20 '14 at 13:34

2 Answers2

4

You need to look into spatial point pattern analysis. Here's a course from the world expert that uses R.

http://www.csiro.au/resources/pf16h

I'm not aware of any Python spatial stats library, but you can easily compute things like nearest-neighbour distribution statistics for a quick assessment of whether a point pattern is clustered, completely random, or regularly spaced.

Spacedman
  • 63,755
  • 5
  • 81
  • 115
  • There is always RPy library for access to R from Python - http://rpy.sourceforge.net/ - if You want to stay in Python. Also see CrimeStat documentation - http://www.icpsr.umich.edu/CrimeStat/ - for many ways to analyse point data - You will get the names of the methods. – mrz Feb 20 '14 at 13:50
2

My suggestion is to extract the XY coordinates of your points based on whatever GIS you are using, then measure the entropy of your point distribution in a given extent. See wikipedia for details about entropy. There is a Python module (pyentropy)for advanced tools

radouxju
  • 49,636
  • 2
  • 71
  • 144