【问题标题】:"Regions defined for each Polygons" when mapping shp with R使用 R 映射 shp 时“为每个多边形定义的区域”
【发布时间】:2019-06-23 03:22:07
【问题描述】:

我只是想从自然地球中可视化一些土地多边形

landData2<-readOGR("/home/pavel/Documents/Studium/Hiwi/Maps/ne_10m_land", "ne_10m_land")
landGG2<- fortify(landData2) 

在第二行之后我收到了消息

“为每个多边形定义的区域”

我已经加固了,所以这篇文章没有用

Why does ggplot give a blank page with the message "Regions defined for each Polygons"?

我的数据来自 http://www.naturalearthdata.com/downloads/10m-physical-vectors/ 我使用了简单(未按比例排序)的多边形

有人知道是什么意思吗?

【问题讨论】:

    标签: r ggplot2 rgdal


    【解决方案1】:

    好的,这很快。

    关注这篇文章 Filling polygons of a map using GGplot in R

    问题似乎是 fortify 没有将 id 传输到数字变量

    只需添加 landGG$id

    仍然不确定为什么会出现此消息,以及为什么它仅适用于“hole”变量(id、piece 和 group 变量)之后的数据帧部分,但可能是 fortify 的一些问题 但它有效。 以为我会把它留在这里而不是删除

    【讨论】:

      猜你喜欢
      • 2015-06-17
      • 1970-01-01
      • 1970-01-01
      • 2018-08-05
      • 2014-03-24
      • 1970-01-01
      • 2014-05-29
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多