[R-sig-Geo] Spatial clustering of points within a given line
Julius Tesoro
jutesoro at yahoo.com
Mon Sep 14 10:55:55 CEST 2009
Thanks for that. Is the distance of the point to this 'line segment' perpendicular?
Also, is there a package where you can do automated spatial clustering?
--- On Mon, 9/14/09, Adrian.Baddeley at csiro.au <Adrian.Baddeley at csiro.au> wrote:
> From: Adrian.Baddeley at csiro.au <Adrian.Baddeley at csiro.au>
> Subject: Spatial clustering of points within a given line
> To: r-sig-geo at stat.math.ethz.ch
> Cc: jutesoro at yahoo.com, Adrian.Baddeley at csiro.au, r.turner at auckland.ac.nz
> Date: Monday, September 14, 2009, 3:14 PM
> Julius Tesoro <jutesoro at yahoo.com>
> writes:
>
> > I have a dilemma, Considering I have a number of
> points and a line (shapefile). How do > I compute for the
> shortest distance between a line and a point?
>
> In package 'spatstat' you would use
> nncross(X,Y)
> or
>
> project2segment(X, Y)
> where X is a point pattern (class "ppp") and Y is a line
> segment pattern (class "psp"). This computes the shortest
> distance from each point to the nearest line segment,
> identifies which line segment is closest to each point, and
> projects each point in X to a point on the nearest line
> segment. To convert your shapefile data to spatstat data,
> see the vignette supplied with the spatstat package.
>
> > Also how do you identify which points aggregate near
> the line
> > like in spatial clustering?
>
> I'm not sure exactly what you want to do.. You could simply
> select all points whose distance to the nearest line segment
> is smaller than a certain threshold.
>
> regards
> Adrian Baddeley
>
>
More information about the R-sig-Geo
mailing list