[R-sig-Geo] How to establish location of points relative to a line

Barry Rowlingson b.rowlingson at lancaster.ac.uk
Fri Oct 10 16:40:19 CEST 2008


2008/10/10 Bjarke Christensen <Bjarke.Christensen at sydbank.dk>:
> Hi,
>
> I have a SpatialLinesDataFrame (A) and a SpatialPointsDataFrame (B). How
> can I establish which points in B are to the east of a given line in A?
>
> The problem is to figure out which persons (whose addresses are geocoded in
> B) have addresses to the east of a given road (whose coordinates are given
> in A).

 Is this problem well-defined for a wiggly road? You could be both
east and west of a particularly curvy road.

 You could take the nearest point of the road to the address location
and then see if this vector has a positive or negative X component....

 And of course it would be a trivial problem in New York (except for Broadway!).

Barry




More information about the R-sig-Geo mailing list