Message-ID: <4FE43E10.6080400@auckland.ac.nz>
Date: 2012-06-22T09:42:40Z
From: Rolf Turner
Subject: Closest point in R
In-Reply-To: <CAJgfpigoL6+BcDoxe7ks09hpuWsdZMErGj=9Va=+fYPt-xXDHQ@mail.gmail.com>
As far as I can see there is nothing off the peg in "spatstat" to do
this, but I think it is not too hard to build a function that will do what
you want using existing tools. One needs to delve into the code
of existing functions and pick out some relevant bits in order to put
such a function together however.
I will try to build that function for you tomorrow. Unless Adrian
tells me that there *is* an off the peg procedure (that I have
overlooked).
cheers,
Rolf Turner
On 22/06/12 06:15, Ted Rosenbaum wrote:
> Hi,
> I am looking for a way (preferably in spatstat) to obtain the point in a
> polygon (window in my spatstat context) that is closest to a given point
> outside of it (similar to closestpoint in postgis). Approximations
> (something that is approximately the closest point) are fine in my context
> Thanks,
> Ted
>
> ---------------------------------------------
> Ted Rosenbaum
> Graduate Student
> Department of Economics
> Yale University