grantbrown / inla

Automatically exported from code.google.com/p/inla
5 stars 6 forks source link

Feature request: Create besag graph file from shapefiles #11

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
Some researchers will not have the technical skills to create graph files for 
besag effects themselves. 

To make spatial regression with INLA simpler to end users, INLA should include 
functions that generates graph files from shapefiles.

Why shapefiles?
For spatial features, shapfiles are more or less the standard in ecology, 
political science and social economic etc.

The files are simple, and contain a ID vector which can function as a 
key in the graph files.

The R library for INLA's now decrepit rival BayesX, had similar function.

http://rgm2.lab.nig.ac.jp/RGM2/func.php?rd_id=BayesX:shp2bnd

borrow the code from them?

Original issue reported on code.google.com by haavard....@gmail.com on 31 May 2011 at 3:01

GoogleCodeExporter commented 9 years ago

Original comment by finn.lin...@gmail.com on 4 Jun 2011 at 8:07

GoogleCodeExporter commented 9 years ago
A simple solution in R is gTouches from rgeos. This function uses GEOS so it 
robust, and works with the spatialpolygon class.

It should be simple to implement it as part of R-INLA.

Original comment by haavard....@gmail.com on 7 Jun 2011 at 2:14