Hi, This is my first post to R-help. I'm having trouble getting rgeos to work. Info on the server and packages I'm using: $ *uname -a* Linux some-server.somewhere.com 2.6.32-431.11.2.el6.x86_64 #1 SMP Tue Mar 25 19:59:55 UTC 2014 x86_64 x86_64 x86_64 GNU/Linux $ *R --version* R version 3.0.2 (2013-09-25) -- "Frisbee Sailing" Copyright (C) 2013 The R Foundation for Statistical Computing Platform: x86_64-redhat-linux-gnu (64-bit) $ *lsb_release -a* LSB Version: :base-4.0-amd64:base-4.0-noarch:core-4.0-amd64:core-4.0-noarch:graphics-4.0-amd64:graphics-4.0-noarch:printing-4.0-amd64:printing-4.0-noarch Distributor ID: CentOS Description: CentOS release 6.5 (Final) Release: 6.5 Codename: Final $ *rpm -qa | grep geos* geos-devel-3.4.2-1.rhel6.x86_64 geos-3.4.2-1.rhel6.x86_64 $ *rpm -qa | grep gdal* gdal-1.9.2-6.rhel6.x86_64 gdal-libs-1.9.2-6.rhel6.x86_64 gdal-devel-1.9.2-6.rhel6.x86_64 gdal-java-1.9.2-6.rhel6.x86_64 $ *R -q*> *library(rgeos)*rgeos version: 0.3-8, (SVN revision 460) GEOS runtime version: 3.4.2-CAPI-1.8.2 r3921 Polygon checking: TRUE> *example(gDistance)*gDstnc> pt1 = readWKT("POINT(0.5 0.5)") gDstnc> pt2 = readWKT("POINT(2 2)") gDstnc> p1 = readWKT("POLYGON((0 0,1 0,1 1,0 1,0 0))") gDstnc> p2 = readWKT("POLYGON((2 0,3 1,4 0,2 0))") gDstnc> gDistance(pt1,pt2) R: GeometryComponentFilter.cpp:34: virtual void geos::geom::GeometryComponentFilter::filter_ro(const geos::geom::Geometry*): Assertion `0' failed. Aborted (core dumped) I'd like to be able to use the gDistance function. What should I do to fix this? Please let me know if any additional information would be helpful. Thank you for your time, Adrian [[alternative HTML version deleted]]
Adrian Torchiana <adrian.torchiana <at> gmail.com> writes:> > Hi, > > This is my first post to R-help. I'm having trouble getting rgeos to work.R-help is arguably too general to help, please ask questions of this kind on R-sig-geo.> > Info on the server and packages I'm using: >...> $ *rpm -qa | grep geos* > geos-devel-3.4.2-1.rhel6.x86_64 > geos-3.4.2-1.rhel6.x86_64 >How did you install rgeos (from source)? Are other versions of GEOS present not installed as RPMs? ...> $ *R -q* > > *library(rgeos)* > rgeos version: 0.3-8, (SVN revision 460) > GEOS runtime version: 3.4.2-CAPI-1.8.2 r3921 > Polygon checking: TRUE > > > *example(gDistance)* > > gDstnc> pt1 = readWKT("POINT(0.5 0.5)") > > gDstnc> pt2 = readWKT("POINT(2 2)") > > gDstnc> p1 = readWKT("POLYGON((0 0,1 0,1 1,0 1,0 0))") > > gDstnc> p2 = readWKT("POLYGON((2 0,3 1,4 0,2 0))") > > gDstnc> gDistance(pt1,pt2) > R: GeometryComponentFilter.cpp:34: virtual void > geos::geom::GeometryComponentFilter::filter_ro(const > geos::geom::Geometry*): Assertion `0' failed. > Aborted (core dumped)rgeos is tested regularly and frequently, so the issue here is on your platform, I'm afraid.> > I'd like to be able to use the gDistance function. What should I do to fix > this?The simplest way is to install GEOS from source, because you avoid relying on upstream packaging. This will however interfere with other software that may depend on your existing GEOS.> > Please let me know if any additional information would be helpful. > > Thank you for your time, > > Adrian > > [[alternative HTML version deleted]] >Please do not post HTML. Roger>