[R-sig-Geo] RGEOS error

Roger Bivand Roger.Bivand at nhh.no
Wed Aug 27 18:23:26 CEST 2014


On Wed, 27 Aug 2014, Sancta Vega wrote:

> HI,
> Just for dissolving I use the rgeos package with "gUnaryUnion".
> But I get this error :" No UnaryUnion in this version of GEOS".
> I remove the package and install it again but I get the same error.
> Is it linked to my version of R  or something else?
> Thank you in advance.
>
> 	[[alternative HTML version deleted]]
         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

Please only post plain text, HTML may carry unwanted payloads.

Please do provide the output of sessionInfo() and the messages shown on 
the console when rgeos is loaded.

Most likely your platform is Linux, probably old Debian or Ubuntu, and 
that your installed GEOS is version < 3.3.0; version_GEOS0() also returns 
your GEOS version directly.

On the help page ?gUnaryUnion you see that you should use gUnionCascaded() 
instead:

     "gUnionCascaded expects a single sp object of class SpatialPolygons
      with subgeometries which it unions together. gUnionCascaded can
      only dissolve MultiPolygon objects, so GeometryCollection objects
      to be dissolved, here a SpatialPolygons object, must be flattened
      a Polygons object; if GEOS version 3.3.0 is available, use
      gUnaryUnion."

I.e. fortunes::fortune(14) applies.

Version 3.3.0 was released in May 2011, so very few users are still 
suffering such old components, but in Debian, squeeze still has 3.2.0, 
wheezy 3.3.3, and newer at 3.4.2 (current release).

I doubt Windows or OSX, to be honest, but if so, you've installed rgeos 
from source linking to an ancient version of GEOS.

Hope this clarifies,

Roger

>
> _______________________________________________
> R-sig-Geo mailing list
> R-sig-Geo at r-project.org
> https://stat.ethz.ch/mailman/listinfo/r-sig-geo
>

-- 
Roger Bivand
Department of Economics, Norwegian School of Economics,
Helleveien 30, N-5045 Bergen, Norway.
voice: +47 55 95 93 55; fax +47 55 95 91 00
e-mail: Roger.Bivand at nhh.no



More information about the R-sig-Geo mailing list