[R-sig-Geo] Does there already exist a function in R to identify intersection between pairs of points?

JLong jed.long at st-andrews.ac.uk
Mon Dec 8 11:15:34 CET 2014


Sharon,
You are likely best to leave the road data as lines (SpatialLines) and then
convert your radio collar to SpatialLines connecting consecutive fixes. see: 
http://stackoverflow.com/questions/24284356/convert-spatialpointsdataframe-to-spatiallinesdataframe-in-r
<http://stackoverflow.com/questions/24284356/convert-spatialpointsdataframe-to-spatiallinesdataframe-in-r> 
, keep in mind the ordering of the points will matter.

Then intersecting the two SpatialLines can be done using the rgeos package
and gIntersection function. The output will be the SpatialPoints
(Coordinates) where the collar fix segments and roads intersect
(representing presumably road crossing areas?), which you can map.

Cheers,
Jed



-----
Jed Long
Lecturer in GeoInformatics
Department of Geography & Sustainable Development
University of St Andrews, UK
--
View this message in context: http://r-sig-geo.2731867.n2.nabble.com/Does-there-already-exist-a-function-in-R-to-identify-intersection-between-pairs-of-points-tp7587531p7587532.html
Sent from the R-sig-geo mailing list archive at Nabble.com.



More information about the R-sig-Geo mailing list