2

I'm simply trying to visualize some land polygons from natural earth

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

after the second line I get the message

"Regions defined for each Polygons"

I already fortified it so this post was of no use

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

I got the data from http://www.naturalearthdata.com/downloads/10m-physical-vectors/ I used the simple (not scale ranked) polygons

Does anyone know what it means?

M--
  • 25,431
  • 8
  • 61
  • 93

1 Answers1

1

Ok, this went fast.

Following this Post Filling polygons of a map using GGplot in R

the problem seems to be that fortify does not transfer the id to a numeric variable

simply adding landGG$id <-as.numeric(landGG$id) helps

Still not sure why exactly this message comes out and why it is only true for the parts of the data frame after the "hole" variable (id, piece and group variable) but probably some problem with fortify But it works. Thought I'd leave it here instead of deleting

Community
  • 1
  • 1