[R-sig-Geo] GRASS with R and distances between polygon edges
Colin Robertson
colinr23 at gmail.com
Mon Oct 30 17:58:59 CET 2006
Hi Duncan,
For calculating the distance between polygons, there are descriptions of
the calculations for average distance and minimum distance in the
reference below. Although I'm not sure if they're implemented in any R
packages.
Okabe, A. and Miller, H. J. (1996) "Exact computational methods for
calculating distances between objects in a cartographic database,"
Cartography and Geographic Information Systems, 23, 180-195.
Colin
Colin Robertson
MSc Candidate
Dept of Geography
University of Victoria
www.geog.uvic.ca/spar
(250) 885-8065
-----Original Message-----
From: r-sig-geo-bounces at stat.math.ethz.ch
[mailto:r-sig-geo-bounces at stat.math.ethz.ch] On Behalf Of Duncan
Golicher
Sent: Monday, October 30, 2006 8:10 AM
To: r-sig-geo at stat.math.ethz.ch
Subject: [R-sig-Geo] GRASS with R and distances between polygon edges
I have a follow up question regarding moving old (R <2.4) sp objects to
R 2.4. It is indeed easy using GRASS as an intermediary with spgrass6.
But one of my students has installed GRASS with the QGIS interface
rather than running GRASS under Cygwin. He wanted to do the same.
I tried with him and quickly got R to communicate with GRASS by simply
changing the first lines of system to read .....
function (command, intern = FALSE, wait = TRUE, input = NULL,
show.output.on.console = TRUE, minimized = FALSE, invisible = FALSE)
{
command<-paste(Sys.getenv("COMSPEC"),"/c",command)
etc}
But we still couldn't get spgrass6 to import and export raster layers
even after fiddling with the code to get rid of cygpath etc. Perhaps
Roger has a fix? It would be useful.
Also while posting, can anyone suggest a way of measuring the closest
distance between disjunct polygons in R (forest fragments)? Its easy to
use centroids in spdep, but we were interested in the distances between
the edges.
Duncan
--
Dr Duncan Golicher
Ecologia y Sistematica Terrestre
Conservación de la Biodiversidad
El Colegio de la Frontera Sur
San Cristobal de Las Casas,
Chiapas, Mexico
Email: dgoliche at sclc.ecosur.mx
Tel: 967 674 9000 ext 1310
Fax: 967 678 2322
United Kingdom Skypein; 020 7870 6251
Skype name: duncangolicher
_______________________________________________
R-sig-Geo mailing list
R-sig-Geo at stat.math.ethz.ch
https://stat.ethz.ch/mailman/listinfo/r-sig-geo
More information about the R-sig-Geo
mailing list