R crashes when I run rgeos::gDistance
On Wed, 4 Mar 2015, Adrian Torchiana wrote:
Hi, This is my first post to R-sig-Geo. I'm having trouble getting rgeos to work.
My reply on R-help is at: https://stat.ethz.ch/pipermail/r-help/2015-March/426477.html
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?
Summarising here: rgeos is tested regularly and frequently, so the issue here is on your platform, I'm afraid. How did you install rgeos (from source)? Are other versions of GEOS present not installed as RPMs? The simplest way to resolve this 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. We know that rgeos runs its examples across multiple platforms, but we don't know where your GEOS came from. You can see that rgeos works on Linux platforms from: http://cran.r-project.org/web/checks/check_results_rgeos.html
Please let me know if any additional information would be helpful. Thank you for your time, Adrian PS I sent a near-identical email to r-help recently; only one person responded, and they suggested I post to R-sig-Geo. [[alternative HTML version deleted]]
Please do not post HTML. Really. 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