[GRASS-user] New AddOns for Analyzing landscape connectivity based on graph-theory - the r.connectivity.*-toolchain

Helmut Kudrnovsky hellik at web.de
Wed Sep 19 06:58:12 PDT 2012


hi Stefan,

>Now I added an example to the manuals based on the North Carolina data set. 

thanks, tested now with osgeo4w-wingrass6.4.3svn in win7-64bit-box following
your example.

some issues:

(A)

manual
###Patch input vector map
##Extract habitat patches
#Condition 1: Category 11 = Bottomland Hardwoods/Hardwood Swamps
#Condition 2: no border-cells are suitable  
r.mapcalc "patches=if(\
landuse96_28m[0,1]==11&&\
[...]

in windows (from the mapcalc-gui):
r.mapcalc patches =
if(landuse96_28m[0,1]==11&&landuse96_28m[0,-1]==11&&landuse96_28m[1,1]==11&&landuse96_28m[1,0]==11&&landuse96_28m[1,-1]==11&&landuse96_28m[-1,1]==11&&landuse96_28m[-1,0]==11&&landuse96_28m[-1,-1]==11&&landuse96_28m==11,1,null())

(B)
manual:
v.extract input=patches at user1 output=patches_1ha
type=point,line,boundary,centroid,area,face layer=1 where=area_ha>1 new=-1
--overwrite

maybe simplified and correctedt to?
v.extract input=patches output=patches_1ha type=area layer=1 where=area_ha >
1

(C)
r.connectivity.distance --verbose patches=patches_1ha at g65 costs=costs at g65
pop_proxy=area_ha prefix=hws_connectivity folder=C:\tmp\connect cutoff=4500
border_dist=18
Preparing boundaries...
Calculating connectivity-distances for patch number 2
C:/OSGeo4W/apps/grass/grass-6.4.3svn/scripts/r.connectivity.
distance: line 379: [: -gt: unary operator expected
C:/OSGeo4W/apps/grass/grass-6.4.3svn/scripts/r.connectivity.
distance: line 386: [: -eq: unary operator expected
Calculating connectivity-distances for patch number 13
[...]
C:/OSGeo4W/apps/grass/grass-6.4.3svn/scripts/r.connectivity.
distance: line 386: [: -eq: unary operator expected
Calculating connectivity-distances for patch number 298
C:/OSGeo4W/apps/grass/grass-6.4.3svn/scripts/r.connectivity.
distance: line 379: [: -gt: unary operator expected
C:/OSGeo4W/apps/grass/grass-6.4.3svn/scripts/r.connectivity.
distance: line 386: [: -eq: unary operator expected
(Wed Sep 19 14:59:51 2012) Command finished (5 min 49 sec) 

there are a lot of these "[: -eq: unary operator expected"-messages.

following files are created:

closest.points
edges.csv
r_connectivity.log
r_connectivity.log.tmp
vertices_part_1.csv
vertices_part_2.csv

(D) some test

r.connectivity.network -y -i folder=C:\tmp\connect
connectivity_cutoff=1500.0 lnbh_cutoff=2.0 cl_thres=10 exponent=-3
kernel_plot=C:\tmp\connect\kernel.eps
overview_plot=C:\tmp\connect\overview.eps cores=1
rm: cannot lstat `C:tmpconnect/r_connectivity.log.tmp': No
such file or directory
which: R: unknown command
ERROR: R is required, please install R first

r.connectivity.network -y -i folder='C:\tmp\connect'
connectivity_cutoff=1500.0 lnbh_cutoff=2.0 cl_thres=10 exponent=-3
kernel_plot=C:\tmp\connect\kernel.eps
overview_plot=C:\tmp\connect\overview.eps cores=1
rm: cannot lstat `C:tmpconnect/r_connectivity.log.tmp': No
such file or directory
which: R: unknown command
ERROR: R is required, please install R first
(Wed Sep 19 15:09:44 2012) Command finished (1 sec)   

r.connectivity.network -y -i folder="C:\tmp\connect"
connectivity_cutoff=1500.0 lnbh_cutoff=2.0 cl_thres=10 exponent=-3
kernel_plot=C:\tmp\connect\kernel.eps
overview_plot=C:\tmp\connect\overview.eps cores=1
ERROR: r_connectivity.log file could not be found or is not readable.  

=> r_connectivity.log seams not be readable
=> R is installed here on my system, but (as default by the R-installation)
not in the %PATH%

have a look how GRASS GIS-R-coupling is done by the
standalone-wingrass-installer (but not in osgeo4w-wingrass):
http://grass.osgeo.org/wiki/R_statistics#MS_Windows









-----
best regards
Helmut
--
View this message in context: http://osgeo-org.1560.n6.nabble.com/New-AddOns-for-Analyzing-landscape-connectivity-based-on-graph-theory-the-r-connectivity-toolchain-tp5000351p5002964.html
Sent from the Grass - Users mailing list archive at Nabble.com.


More information about the grass-user mailing list