Ubuntu 14.04, rgeo 0.3.20, and geos

191 views
Skip to first unread message

Ben Deany

unread,
Jul 4, 2015, 11:03:18 AM7/4/15
to rgeo-...@googlegroups.com
Hi everyone,

I am having some difficulty with getting rgeo and GEOS to play nice together on Ubuntu 14.04.

I get the error message (when trying to process a shape file):

GEOS is not available, but is required for correct interpretation of polygons in shapefiles.

My own googling implies to me that rgeo has not been able to bind to the native GEOS bindings. And indeed, the Rails console bears this out;

Loading production environment (Rails 4.2.1)
2.1.2 :001 > RGeo::Geos.supported?
 => false 
2.1.2 :002 > RGeo::CoordSys::Proj4.supported?
 => true 
I've tried a few things (installing other versions of GEOS, including from source) following these instructions;


That was probably a mistake, but anyway, when I try to uninstall / reinstall the rgeo gem I get this output;

Building native extensions.  This could take a while...

/home/crags/.rvm/rubies/ruby-2.1.2/bin/ruby extconf.rb

checking for geos_c.h... yes

checking for GEOSSetSRID_r() in geos_c.h... no

checking for GEOSPreparedContains_r() in geos_c.h... no

checking for GEOSPreparedDisjoint_r() in geos_c.h... no

checking for GEOSWKTWriter_setOutputDimension_r() in geos_c.h... no

checking for rb_memhash() in ruby.h... yes

**** WARNING: Unable to find GEOS headers or GEOS version is too old.

**** Compiling without GEOS support.

creating Makefile


So it does find the geos_c.h file but doesn't think it's correct(?). I have a fews versions of this file;

crags@CRAGS-SERVER:~$ locate geos_c.h

/home/crags/geos-3.3.8/capi/geos_c.h

/home/crags/geos-3.3.8/capi/geos_c.h.in

/usr/include/geos_c.h

/usr/local/include/geos_c.h


All of which appear to contain the correct functions (that I can see listed in the extconf.rb file).

So I am a bit lost... am I missing a dependency somewhere? Using the wrong version of libgeos? The wrong version of rgeo, perhaps?

I feel like (and am hoping!) that I am missing something really simple here...

Many thanks in advance,
Ben





Reply all
Reply to author
Forward
0 new messages