I have a SpatialLines object representing roads and a SpatialPolygons object
containing cities.
I’d like to know how to overlay a SpatialLines object by a SpatialPolygons
object in R.
I’d like to know the Lines that passes over the two cities and which cities in?
Is it possible?
In general, overlays of spatial objects are handled by the
overfunction from thesppackage. In the Methods section of the documentation ofover(?over) there is a list of methods forover, which does not include the combination ofLinesandPolygons. Luckily, the documentation ofoversays that by installing thergeospackage these kind of methods are made available.