Skip to content
Prev 25547 / 398502 Next

Distance between points and a polygon?

Thanks Rolf,

The necessary function do indeed exists in the spatstat package, but 
rather well hidden I would say.
But after looking thru the bdist.points code I came up with this example:
#Define a matrix with all the points
#Define a matrix with the points the polyline consists of
#Returns the minimun distance for each point to the polyline
Cheers,

Hans Gardfjell
Ume? University, Sweden
Rolf Turner wrote:
-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
r-help mailing list -- Read http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html
Send "info", "help", or "[un]subscribe"
(in the "body", not the subject !)  To: r-help-request at stat.math.ethz.ch
_._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._