[R-sig-Geo] Help with gpclib

O'Hanlon, Simon J simon.ohanlon at imperial.ac.uk
Wed Jul 18 11:38:28 CEST 2012


Dear Manuel,
I am also running R2.15.1 on Mac OS X 10.7.

I get:
> library(maptools)
Loading required package: foreign
Loading required package: sp
Loading required package: lattice
Checking rgeos availability: TRUE
> library(rgdal)
Geospatial Data Abstraction Library extensions to R successfully loaded
Loaded GDAL runtime: GDAL 1.9.0, released 2011/12/29
Path to GDAL shared files: /Users/Simon/R64Libs/rgdal/gdal
Loaded PROJ.4 runtime: Rel. 4.8.0, 6 March 2012, [PJ_VERSION: 480]
Path to PROJ.4 shared files: /Users/Simon/R64Libs/rgdal/proj
> library(rgeos)
Loading required package: stringr
Loading required package: plyr
rgeos: (SVN revision 348)
 GEOS runtime version: 3.3.3-CAPI-1.7.4 
 Polygon checking: TRUE 

> gpclibPermitStatus()
[1] FALSE
> gpclibPermit()
[1] TRUE

Perhaps you can try updating to the latest rgeos release? And maybe try updating your rgdal from the kyngchaos website (if it isn't already the latest version)?

HTH,

Simon
--------------------------------
Simon O'Hanlon, BSc MSc
Department of Infectious Disease Epidemiology
Imperial College London
St. Mary's Hospital
London
W2 1PG
________________________________________
From: r-sig-geo-bounces at r-project.org [r-sig-geo-bounces at r-project.org] on behalf of Manuel Spínola [mspinola10 at gmail.com]
Sent: 15 July 2012 16:02
To: r-sig-geo at r-project.org
Subject: [R-sig-Geo] Help with gpclib

Dear list members,

I am running R 2.15.1 on a MAC OSX 10.7.

I receive an error message regarding gpclib (see below):

> library(rgdal)
> library(maptools)
> library(rgeos)
Loading required package: stringr
rgeos: (SVN revision 330)
 GEOS runtime version: 3.3.2-CAPI-1.7.2
 Polygon checking: TRUE
 WARNING! if you turn polygon checking off, and polygons are
 not valid in GEOS, you risk losing data as your R session may crash!

> indice <- readOGR(".", "indicesalud2007crtm")
OGR data source with driver: ESRI Shapefile
Source: ".", layer: "indicesalud2007crtm"
with 82 features and 27 fields
Feature type: wkbPolygon with 2 dimensions

> map <- fortify(indice)
Using NCANTON to define regions.
Error: gpclib, maptools package required for this functionality.  Please
install and try again.

> gpclibPermit()
[1] FALSE

Best,

Manuel


--
*Manuel Spínola, Ph.D.*
Instituto Internacional en Conservación y Manejo de Vida Silvestre
Universidad Nacional
Apartado 1350-3000
Heredia
COSTA RICA
mspinola at una.ac.cr
mspinola10 at gmail.com
Teléfono: (506) 2277-3598
Fax: (506) 2237-7036
Personal website: Lobito de río <https://sites.google.com/site/lobitoderio/>
Institutional website: ICOMVIS <http://www.icomvis.una.ac.cr/>

        [[alternative HTML version deleted]]




More information about the R-sig-Geo mailing list