[R-sig-Geo] Interactive (click-able) map within R
Barry Rowlingson
b.rowlingson at lancaster.ac.uk
Wed Oct 24 11:08:16 CEST 2012
On Wed, Oct 24, 2012 at 5:13 AM, Robert J. Hijmans <r.hijmans at gmail.com> wrote:
> Ebrahim,
>
> The raster package has the function "click" for raster data (Raster* of
> Spatial*) that allows you to visually query spatial data by clicking on
> plots. In the development version of that package on R-Forge there is also
> a click method for object data (SpatialPolygons, Lines, Points).
More minimally than the click function, there's always the locator
function which lets users click on the current plot and returns the
coordinates. Then you can do whatever you want with those coordinates,
including testing against a set of polygons to see which one the user
clicked on.
The direction that this thread seems to have gone in (now we're on
geo web servers and REST APIs to R-in-the-cloud SaaS providers) seems
a little over the top for a 'please choose a region' query.
Barry
More information about the R-sig-Geo
mailing list