Error: isTRUE(gpclibPermitStatus()) is not TRUE

前端 未结 3 1961
梦毁少年i
梦毁少年i 2020-12-29 21:05

This question may be a duplicate of an earlier unanswered one. I still have the problem.

I am trying to use a zipcode shapefile and coming up with the following erro

3条回答
  •  陌清茗
    陌清茗 (楼主)
    2020-12-29 21:22

    You can look at Hadley's master file for ggplot2/R/fortify-spatial.r. Based on this outside link, my understanding is that lines 31–34 (in it's current form) used to read something like

    # Union together all polygons that make up a region
    try_require(c("gpclib", "maptools"))
    unioned <- unionSpatialPolygons(cp, invert(polys))
    

    So back then one way to attack the problem was to turn on the license

    library(rgdal)
    library(maptools)
    if (!require(gpclib)) install.packages("gpclib", type="source")
    gpclibPermit()
    

    As @rcs, @Edzer Pebesma, and this answer mention, rgeos should resolve the issue for more recent installations.

提交回复
热议问题