[geos-devel] GEOS Ruby bindings gem and extensions

Charlie Savage cfis at savagexi.com
Tue Nov 30 19:08:28 EST 2010


Hi J,

> We're specifically looking to release the following:
>
> - we've gemified the Ruby bindings portion of the GEOS library so it
> can be installed separately from the library itself. It still depends
> on the library, obviously, but can be built as a standalone gem. We've
> extracted the geos.i.in and ruby.i files from the GEOS tarball and
> wrote a gemspec and extconf.rb for it that extracts the relevant
> version information from geos_c.h and builds the SWIG output
> accordingly.

Great - I think it would be a good idea to package this code as a gem so 
its more easily available to the Ruby community.  Will the gem also 
include the generated swig file (I'd say it probably should to eliminate 
the extra dependency on swig) or have you ported the code to just a 
straight ruby extensions?


> - we've also extracted the Ruby test files and the gem has been tested
> on OSX and CentOS 5.5, although some of the tests appear to fail. (The
> tests themselves may be a bit stale, perhaps -- one test looks for a
> version string matching "3.0.0rc4-CAPI-1.3.3", for instance.)
>
> As for the extensions to the library, we've implemented the following
> in Ruby userland as wrappers and whatnot around the GEOS library:
> - in all, some 70+ helper methods have been added to Geos::Geometry types.

Ok, I've done something similar.  Happy to move over to these.  They are 
in Ruby code I assume?

>
> - Geos::GeometryCollection has been made an Enumerable.

Cool.

>
> We've also included some Rails integration for PostGIS, including:

> Our plan at the moment would be to put the code up on to github along
> with the appropriate Rubygems releases.

How about two gems.  One for the geos bindings, and then a separate one 
for rails.  That way people don't have to have the extra rails code if 
they don't want it.

Charlie


More information about the geos-devel mailing list