[R-sig-Geo] gDistance problem on RHEL 6 64-bit

Hollister, Jeff Hollister.Jeff at epa.gov
Thu Feb 5 22:06:30 CET 2015


Roger,

Thanks for getting back to me.  I thought it was a GEOS problem too.  I have updated it and re-installed rgeos.

Curret GEOS is:
> version_GEOS()
[1] "3.4.2-CAPI-1.8.2 r3921"

I tried several of the other rgeos examples (gBuffer, gWithin, gEnvelope, gUnion, gLength ...) and they all worked.  gDistance bombs the same as before, as does gWithinDistance.

My version of gcc appears to be a bit old:

-bash-4.1$ gcc --version
gcc (GCC) 4.4.7 20120313 (Red Hat 4.4.7-11)

Could that be the issue?

Thanks again for your help!
Cheers,
Jeff



*****************************
Dr. Jeffrey W. Hollister
Research Ecologist
27 Tarzwell Drive
Narragansett, RI 02879
(o) 401 782 9655
hollister.jeff at epa.gov
Personal Site
*****************************

-----Original Message-----
From: Roger Bivand [mailto:Roger.Bivand at nhh.no] 
Sent: Thursday, February 05, 2015 3:28 PM
To: Hollister, Jeff
Cc: r-sig-geo at r-project.org
Subject: Re: [R-sig-Geo] gDistance problem on RHEL 6 64-bit

On Thu, 5 Feb 2015, Hollister, Jeff wrote:

> Hello all,
>
> I am having a problem with rgeos::gDistance on RHEL 6.  Everytime I 
> try to get a point to point distance, I get
>
> R: GeometryComponentFilter.cpp:34: virtual void geos::geom::GeometryComponentFilter::filter_ro(const geos::geom::Geometry*): Assertion `0' failed.
> Aborted (core dumped)
>
> This only occurs on my RHEL 6 machine.  Win 7 and Ubuntu 14.04 work fine.

The key question is how you installed rgeos and GEOS on these platforms. 
Most likely rgeos on Windows 7 is the CRAN binary statically linked to GEOS, and on RHEL6 and Ubuntu 14.04 rgeos is installed from source and links to the GEOS found on those platforms. We need the output of:

version_GEOS()

on each platform. Most likely you've not installed GEOS from source on either of the two Linux platforms. The cause is most likely a mismatch on the RHEL platform, possibly that GEOS has fallen behind C++, or that GEOS got updated without you re-installing rgeos. Is gDistance() the only function that doesn't work - can you run example(gDistance) and/or the examples of other functions?

Roger

>
> Some code to reproduce the problem:
> library(sp)
> library(rgeos)
> pt1<-SpatialPoints(data.frame(x=c(1,3),y=c(3,1)))
> pt2<-SpatialPoints(data.frame(x=1,y=1))
> gDistance(pt2,pt1)
>
> More info:
>> sessionInfo()
> R version 3.1.2 (2014-10-31)
> Platform: x86_64-redhat-linux-gnu (64-bit)
>
> locale:
> [1] LC_CTYPE=en_US.UTF-8       LC_NUMERIC=C
> [3] LC_TIME=en_US.UTF-8        LC_COLLATE=en_US.UTF-8
> [5] LC_MONETARY=en_US.UTF-8    LC_MESSAGES=en_US.UTF-8
> [7] LC_PAPER=en_US.UTF-8       LC_NAME=C
> [9] LC_ADDRESS=C               LC_TELEPHONE=C
> [11] LC_MEASUREMENT=en_US.UTF-8 LC_IDENTIFICATION=C
>
> attached base packages:
> [1] stats     graphics  grDevices utils     datasets  methods   base
>
> other attached packages:
> [1] rgeos_0.3-8 sp_1.0-15
>
> loaded via a namespace (and not attached):
> [1] grid_3.1.2      lattice_0.20-29
>
> Thanks,
> Jeff Hollister
>
> *****************************
> Dr. Jeffrey W. Hollister
> Research Ecologist
> 27 Tarzwell Drive
> Narragansett, RI 02879
> (o) 401 782 9655
> hollister.jeff at epa.gov<mailto:hollister.jeff at epa.gov>
> Personal Site<http://jwhollister.com/>
> *****************************
>
>
> 	[[alternative HTML version deleted]]
>
> _______________________________________________
> 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