I need to create a neighbours list from a spatial polygon. At the moment i am using the function poly2nb
, but unfortunately it is not very accurate, and some polygons with no common points are considered neighbours. I have tried changing the snap
argument, but with no luck.
I have however tried the function gTouches
from the rgeos
package, and it works much better. Only problem is, it creates a list
object that cannot be used in spdep
. Is there any way to convert it into a nb
object?
Thank you in advance! :)