[R-sig-Geo] Determine if a line segment intersects a polygon

Roger Bivand Roger.Bivand at nhh.no
Sat Aug 11 12:58:09 CEST 2007


On Fri, 10 Aug 2007, Waichler, Scott R wrote:

> I am looking for a method that would determine whether any part of a
> line segment defined by (x0, y0) and (x1, y1) intersects a given polygon
> (true or false).  I don't have any other geospatial needs here, so if a
> solution exists using base R that would be great.

Perhaps look at crossing.psp() in the spatstat package - there are lots of 
useful functions there.

Roger

>
> Thanks,
> Scott Waichler
> Pacific Northwest National Laboratory
> scott.waichler _at_ pnl.gov
>
> _______________________________________________
> R-sig-Geo mailing list
> R-sig-Geo at stat.math.ethz.ch
> https://stat.ethz.ch/mailman/listinfo/r-sig-geo
>

-- 
Roger Bivand
Economic Geography Section, Department of Economics, Norwegian School of
Economics and Business Administration, Helleveien 30, N-5045 Bergen,
Norway. voice: +47 55 95 93 55; fax +47 55 95 95 43
e-mail: Roger.Bivand at nhh.no




More information about the R-sig-Geo mailing list