JRuby PostGIS options

151 views
Skip to first unread message

Jason Gilman

unread,
Aug 23, 2011, 8:34:48 AM8/23/11
to georails
I haven't seen any posts in this group but I hope people are paying
attention. My project is currently using JRuby, GeoRuby, Oracle and
Oracle Spatial. I'm evaluating and prototyping a switch to Postgres
and PostGIS. I've been looking for prebuilt solutions that work in
Rails with JRuby and I'm coming up short. The spatial_adapter gem
doesn't support jdbcpostgres. I looked at that first because all of
our code is centered around GeoRuby now. I found the activerecord-
postgis-adapter (https://github.com/dazuma/activerecord-postgis-
adapter) but that doesn't look like it will work with the JDBC
postgres adapter.

Any ideas on what might provide postgis support in rails under JRuby?
I'm willing to switch to RGeo if that works. If there isn't support
yet where would be the best place to start adding it?

Jevin Maltais

unread,
Aug 23, 2011, 12:27:27 PM8/23/11
to geor...@googlegroups.com
Hiya Jason,

I've used PostGis_Adaptor (an extension of spatial_adaptor): https://github.com/nofxx/postgis_adapter and it works pretty well.  It's not maintained too much but it's pretty stable so that's probably why.

Taking the development hit to move to RGeo is probably a really good idea.  It's more actively maintained and seems more feature complete between databases.

Jevy


--
You received this message because you are subscribed to the Google Groups "georails" group.
To post to this group, send email to geor...@googlegroups.com.
To unsubscribe from this group, send email to georails+u...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/georails?hl=en.


Daniel Azuma

unread,
Aug 23, 2011, 12:31:25 PM8/23/11
to geor...@googlegroups.com
Hi Jason,

I'm not aware of a solution for JDBC PostGIS right now. Both the spatial_adapter gem (GeoRuby's adapter) and the activerecord-postgis-adapter gem (RGeo's adapter) work only with the MRI postgres driver at this time. (But if, as Jevin mentioned, postgis_adapter works with the JDBC driver, that might be a solution. I'm not familiar with everything that's been done on that adapter.)

I could look into writing an RGeo-based adapter for JDBC PostGIS, but I don't use JRuby often so I'm not sure I'm the most effective one to do it. I'm also on vacation at the moment (hello from Yosemite!).

Daniel

Jason Gilman

unread,
Aug 23, 2011, 1:32:21 PM8/23/11
to geor...@googlegroups.com
Thanks for the suggestion, Jevy. I took a look at the postgis_adapter gem.  It looks like it's missing support for the geography type in postgres though I do see that the original spatial_adapter gem has support for it.  I'm going to continue without trying to find a perfect set of gems to solve my problem.  I'll just use the "bare metal" approach during this prototype phase.  Later if we choose to switch to postgres then I'll look for or enhance an existing gem.

Jevin Maltais

unread,
Aug 23, 2011, 1:33:41 PM8/23/11
to geor...@googlegroups.com
Email the maintainer.  See what he says.  Might be really easy to add.

Jevin
Reply all
Reply to author
Forward
0 new messages