[R] another question on shapefiles and geom_point in ggplot2

Pierre Roudier pierre.roudier at gmail.com
Mon Apr 4 06:23:46 CEST 2011


Hi all,

2011/4/4 Felipe Carrillo <mazatlanmexico at yahoo.com>:
> Manuel:
> As far as I know one needs gpclibPermit() in order to fortify
> see this:
> Note: polygon geometry computations in maptools
>         depend on the package gpclib, which has a
>         restricted licence. It is disabled by default;
>         to enable gpclib, type gpclibPermit()
> I am going to guess that ahmadou dicko doesn't show gpclibPermit() on his
> code
> because he loaded it with Rprofile or some other way. I tried to run his
> code without
> gpclibPermit() and it wouldn't let me fortify, so not sure how he did it.

On that specific point, Colin Arundel and Roger Bivant released the
rgeos package on CRAN a few days [1]. This is a great achievement as
it brings bindings to the GEOS C++ lib [2] - long story short, it
makes the job the non-free [3] gpclib used to do.

In its later release, maptools has an option to check if rgeos if
present - if it is the case it is used instead of gpclib:

> library(maptools)
Loading required package: foreign
Loading required package: sp
Loading required package: lattice

        Note: polygon geometry computations in maptools
        depend on the package gpclib, which has a
        restricted licence. It is disabled by default;
        to enable gpclib, type gpclibPermit()

Checking rgeos availability as gpclib substitute:
TRUE
> ?gpclibPermit

Pierre

[1] http://cran.r-project.org/web/packages/rgeos/
[2] http://trac.osgeo.org/geos/
[3] https://stat.ethz.ch/pipermail/r-sig-geo/2010-January/007400.html
-- 
Scientist
Landcare Research, New Zealand



More information about the R-help mailing list