[R-sig-Geo] gDistance problem on RHEL 6 64-bit
Roger Bivand
Roger.Bivand at nhh.no
Thu Feb 5 21:28:07 CET 2015
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