[R-sig-Geo] identify methods for sp-class objects
b.rowlingson at lancaster.ac.uk
Fri Jun 21 19:55:04 CEST 2013
Has anyone written a set of 'identify' methods for sp-class objects?
For example, given a spatial polygons data frame, I want to do:
[click click click]
 23 NA 5
showing my mouse clicks were over polygon 23, no polygon, polygon 5.
For overlapping spdfs, an option might be:
which would return a list of polygon indices under each click.
For spatial line structures, a similar function would either return
the nearest line feature, or all line features within a tolerance.
Similarly for SpatialPoints.
If these don't exist in some package, then I have a job for the weekend...
More information about the R-sig-Geo