[GRASS-user] Landscape connectivity‏

Robert Nuske rnuske at gwdg.de
Thu Dec 3 09:12:57 EST 2009


Hi Markus,


Am Donnerstag 03 Dezember 2009 01:02:00 schrieb Pablo Carreira:
>  Hi Markus M., after a fast look at Urban & Keitt here is my sugestions:
> a)Create a single central vector point for each patch.
> b)Connect that vector to an MySQL database.
> c)create the columns ID, X, Y, NHABDIST, NHABID.
> d)v.to.db the coordinates of the central points.
> e)Now you have a a database with all you need to make the calculations:
> 
> 1) how far away is the nearest other habitat patch
> 2) what's the id of the nearest habitat patch
> 
> With
> SQL, basic math and a script calculate for each single point the
> distance for the all other points, then make the script select the
> nearest and input the distance and the id in the NHABDIST, NHABID.


PostGIS gives you the power to use the boundaries of your patches.

It provides amongst others the two functions ST_Distance [1] (calculates the 
shortest distance between two polygon boundaries) and ST_DWithin [2] (giving 
all other patches within a certain distance). 
Vector data can be imported easily with ogr2ogr.
The rest is again standard sql.


[1] http://postgis.refractions.net/documentation/manual-1.4/ST_DWithin.html
[2] http://postgis.refractions.net/documentation/manual-1.4/ST_Distance.html


cheers,
  robert


More information about the grass-user mailing list