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).

If you wanted to put data on top of Google maps you could use the gmap
function from dismo by transforming the data you plot on top to Mercator
first (see the help file). In the development version of that package
(R-Forge also, sorry about that), you can also request the Google map to be
returned in longitude/latitude.

Both packages should be updated on CRAN within a week or two.

Robert


On Tue, Oct 23, 2012 at 8:39 PM, Ebrahim Jahanshiri
<[email protected]>wrote:

> Dear all,
>
> I am trying to create a map that is click-able i.e. like most GIS platforms
> that let the user click on the points or entities and for example see their
> attributes. I want to do this within R since I need R to do the analysis
> (multiple regression) and show the results of regression along with other
> attributes for each entity on a base map by a click of user on a map
> overlay (simple GIS work).
>
> I can not use anything based on Google maps (like GoogleVis and KML
> exportation and so on) since my data is using different projection and
> transforming them into WGS84 creates overlay miss-positions on Google
> Earth/Maps. So I need to first load up my area polygon and then overlay the
> points on top of them and as I mentioned I need it to be click-able.
>
> So far I couldn't find a way to do this totally within R. I am aware that
> by linking R to other GIS software (like GRASS GIS for example) it is
> possible to do this but my priority is R since it will be easier for me to
> work with and also I have no experience with GRASS or other open-source
> software. Moreover it will be good to find out if there is any capability
> already implemented in R.
>
> I appreciate any clue that you might have for me,
>
> Best regards,
>
> Ebrahim Jahanshiri
>
>         [[alternative HTML version deleted]]
>
> _______________________________________________
> R-sig-Geo mailing list
> [email protected]
> https://stat.ethz.ch/mailman/listinfo/r-sig-geo
>

        [[alternative HTML version deleted]]

_______________________________________________
R-sig-Geo mailing list
[email protected]
https://stat.ethz.ch/mailman/listinfo/r-sig-geo

Reply via email to