[R-sig-Geo] [R-sig-geo] Sum lines when they intersect polygons

Barry Rowlingson b.rowlingson at lancaster.ac.uk
Fri Apr 8 14:06:44 CEST 2011

On Fri, Apr 8, 2011 at 9:10 AM, jonathan daeden
<jonathan.daeden at gmail.com> wrote:
> Dear list,
> I am looking for a way to measure lines crossing polygones or a grid.
> I have a line shapefile representing a coastline and a regular grid over it.
> I would like to measure the coastline in each cells of the grid and keep it
> in a data.frame.
> Could not make it with Qgis so i would like to try with R.

 Sounds like another job for rgeos!

 If your grid is defined as a set of polygons (and not just some
horizontal and vertical lines) then you'd just be doing overlays of
the polygons on your coastline, and then getting the
SpatialLinesLength (or similar) of the resulting objects.

 Lunchtime, otherwise I'd be doing this now :)


More information about the R-sig-Geo mailing list