【问题标题】:Plot shape file in google dynamic map在谷歌动态地图中绘制形状文件
【发布时间】:2013-11-17 23:56:22
【问题描述】:

我需要使用 R 包在谷歌地图中显示我的形状文件 (.shp)。 我正在使用 maptools 包来读取形状文件。 使用函数 ==> readShapePoly() 然后我将使用 plot() 来显示。现在它在 R 静态窗口中绘制 shapefile 内容,我无法放大/缩小,而且我需要在谷歌动态地图中显示。是否有可用的包在谷歌地图上绘制我的形状文件的多边形??

【问题讨论】:

  • 补充@Scott Chamberlain 的两个出色建议:plotGoogleMaps 在浏览器中生成地图,因此您可以放大和缩小。 RgoogleMaps 创建静态地图。 ggmap 是另一个静态地图包。
  • plotGoogleMaps 依赖于 rgdal。我无法安装这个包,它会抛出一些错误
  • 这是错误 ./proj_conf_test: 加载共享库时出错: libgdal.so.1: 无法打开共享对象文件: 没有这样的文件或目录检查 PROJ.4 版本 4.7 或更早版本...是的 ./proj_conf_test:加载共享库时出错:libgdal.so.1:无法打开共享对象文件:没有这样的文件或目录检查 PROJ.4:找到并可读的 epsg... 是的 ./proj_conf_test:加载共享库时出错:libgdal.so.1:无法打开共享对象文件:没有这样的文件或目录

标签: r map shapefile maptools rgdal


【解决方案1】:
        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...

【讨论】:

  • 仅供参考:将文本缩进四个或更多空格将其格式化为代码。有关一些提示,请参阅markdown help
猜你喜欢
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 2016-02-21
  • 1970-01-01
  • 1970-01-01
  • 2019-07-07
  • 1970-01-01
相关资源
最近更新 更多