Geographic Information Systems Stack Exchange is a question and answer site for cartographers, geographers and GIS professionals. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I am a total newbie on the GIS scene so I hope this is not a stupid question.

I have two layers in a PostgreSQL database. The first layer contains points where events happened in Europe. The second contains a shape file of Europe. I have been able to map the points on the map of Europe using QGIS. I would now like to implement Spatial Autocorrealation (Moran i).

I have seen a few demos of this being done using GeoDA but it appears that it only handles a single shapefile.

Can anyone point me in the right direction on how to implement this using QGIS or PostgreSQL or any other free application.

share|improve this question
up vote 12 down vote accepted

Learning by doing is my preferred way. And when it comes to spatial statistics, R is getting seriously powerful tool. So if this is an option browse through some course materials, download the data and try it yourself.

Few starting points covering spatial autocorrelation (SA) (and generally speaking handling spatial stuff in R):

  1. Center for Studies in Demography and Ecology (CSDE) at University of Washington provides materials from Spatial R workshop.

  2. Institute for Quantitative Social Science at Harvard University has materials from the Applied Spatial Statistics in R workshop covering SA.

  3. Geography Department at the University of Colorado offers materials on SA as part of its Introduction to Quantitative Methods course.

Once you get some familiarity with R you can couple it with PostgreSQL using PL/R - R Procedural Language for PostgreSQL, but I cannot comment on it since I'm not knowledgeable on the topic.

Python might be another alternative. PySAL is an actively developed and well documented library that will let you implement all of GeoDa functionality, including SA (and most likely, even more). Python and Postgres are usually good friends so investing some time you could most likely marry those two as well.

share|improve this answer

I have no idea how to perform your QGIS/PostgreSQL idea but the following software can calculate measures for autocorrelation

GeoDa can only handle vector, Passage2 and SAGA only raster, PAST only XYZ.txt and SAM (I think) both.

share|improve this answer

Your Answer


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.