[postgis-users] Re: Ruby/PostGIS
Charlie Savage
cfis at interserv.com
Thu Feb 2 01:20:03 PST 2006
Two approaches you could take:
1. Use geos. You'll see the latest head version of GEOS now comes with
Ruby SWIG bindings that strk and I have been working on. This is what
I've been doing and its in pretty good shape.
2. Use ogr (in the gdal project). There was a lot of work put into the
SWIG bindings last fall, and they are in good shape for OGR and OSR.
You'll also have to modify the low-level internals of active record and
the pg connection class. The issue is that at the very bottom active
record has a big switch statement that tries to figure out the returned
column type (i.e., string, float, date, etc.). Unfortunately there is
no way to register a custom type - so you'll have to override the
appropriate methods.
Thanks,
Charlie
Scott Davis wrote:
> Anyone doing any work with Ruby/Rails and PostGIS?
>
> There seems to be decent support for PostgreSQL in ActiveRecord --
> http://wiki.rubyonrails.com/rails/pages/PostgreSQL
>
> The next step is getting ActiveRecord tweaked to recognize the OGC
> datatypes coming out. Since there are Java and C bindings, is SWIG an
> option?
>
> Cheers,
> s
>
> Scott Davis
> scott at davisworld.org
More information about the postgis-users
mailing list