Take the 2-minute tour ×
Geographic Information Systems Stack Exchange is a question and answer site for cartographers, geographers and GIS professionals. It's 100% free, no registration required.

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).

share|improve this question
    
Maybe this question will help you gis.stackexchange.com/questions/4484/… –  Francisco Puga Feb 20 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 at 13:34

2 Answers 2

up vote 4 down vote accepted

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.

share|improve this answer
    
There is always RPy library for access to R from Python - rpy.sourceforge.net - if You want to stay in Python. Also see CrimeStat documentation - icpsr.umich.edu/CrimeStat - for many ways to analyse point data - You will get the names of the methods. –  mrz Feb 20 at 13:50

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

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.