2

I need to display my shape files (.shp) in google map using R packages. I am using maptools package to read the shape files. using function ==> readShapePoly() and then I will use plot() to display.Now here it is plotting the shapefile content in a R static window where i couldn't zoom in/out and also I need to display in a google dynamic map.Is there any package available to plot my shape file's polygon on a google map??

User12345
  • 455
  • 2
  • 10
  • 21
  • 2
    there are two packages specifically for google maps, http://cran.r-project.org/web/packages/RgoogleMaps/index.html and http://cran.r-project.org/web/packages/plotGoogleMaps/index.html – sckott Nov 06 '13 at 16:43
  • 1
    To add to the two excellent suggestions of @Scott Chamberlain: plotGoogleMaps generates maps in a browser, so you can zoom in and out. RgoogleMaps crates static maps. [ggmap](http://cran.r-project.org/web/packages/ggmap/index.html) is another package for static maps. – cengel Nov 07 '13 at 18:08
  • plotGoogleMaps depends on rgdal.I'm not able to install this package it is throwing some errors – User12345 Nov 08 '13 at 05:33
  • this is the error ./proj_conf_test: error while loading shared libraries: libgdal.so.1: cannot open shared object file: No such file or directory checking PROJ.4 Version 4.7 or earlier... yes ./proj_conf_test: error while loading shared libraries: libgdal.so.1: cannot open shared object file: No such file or directory checking PROJ.4: epsg found and readable... yes ./proj_conf_test: error while loading shared libraries: libgdal.so.1: cannot open shared object file: No such file or directory – User12345 Nov 08 '13 at 05:36

1 Answers1

0
        Solution to the following error:
        While Installing rgdal:
        this is the error: ./proj_conf_test: error while loading shared libraries: libgdal.so.1: cannot open shared object file: No such file or directory checking PROJ.4 Version 4.7 or earlier... yes 


        This error came because of the conflict between 32bit/64bit of our linux machine.
        when you install rgdal package 
        we need to install
(refer : http://stackoverflow.com/questions/15248815/rgdal-package-installation)
        1)gdal tar  to overcome the error....> gdal-config not found
        2)proj4 tar to overcome the error.....> proj_api.h not found
    (gdal and proj4 is not a R package u need to install in such a way that
    1)untar  folder
    2)./configure
    3)make 
    4)make install)


        3)libgdal.so.1 or libproj.so.x not found---------->
        then the problem is
        when u install gdal and proj4 packages your files will go to the path-->/usr/local/lib
        now if your machine is a 64bit linux machine..then check manually where your file is...if it is in the path-->/usr/local/lib then copy those files(libgdal.so.1,libproj.so.1 ) to /usr/lib64....now it will work...
User12345
  • 455
  • 2
  • 10
  • 21
  • FYI: indenting text by four or more spaces formats it as code. See the [markdown help](http://stackoverflow.com/editing-help) for some tips. – jbaums Jul 12 '16 at 22:51