RGeo updates for Rails 3.2

I just released several updates to RGeo and related libraries, focusing on bug fixes and Rails 3.2 compatibility issues.

  • rgeo 0.3.4 fixes a segfault under Ruby 1.8.7, and supports prepared geometries in the FFI-Geos factory.
  • activerecord-postgis-adapter 0.4.1 fixes some Rails 3.2 compatibility issues.
  • activerecord-mysql2spatial-adapter 0.4.2 also fixes some Rails 3.2 compatibility issues.

Just update your gems to get these fixes. Many thanks to those who reported issues and submitted patches on Github. They were very helpful.

I’m still investigating a couple of issues in the spatialite adapter. I hope to get those resolved in a few days.

One other note. I’m not using Rails 3.2 on my own projects yet. (In fact, for the most part I’m still on 3.0.x.) So there may still be regressions and compatibility issues on Rails 3.2 that I haven’t found yet. Please comment here or email me if you find anything.

Geo-Rails part 9: The PostGIS spatial_ref_sys Table and You

When you create a spatial database using PostGIS, you may notice that PostGIS automatically installs a table called “spatial_ref_sys”. This is a standard table for spatial databases, as required by the Open Geospatial Consortium’s specification. It defines which SRIDs are allowed in your geometries, and provides information about the corresponding coordinate systems.

In this article, we’ll take a brief look at the spatial_ref_sys table and how you can use it in your application. We’ll cover:

  • What’s useful about the spatial_ref_sys table
  • Where the spatial_ref_sys data comes from, and how you can populate your own custom data.
  • Accessing spatial_ref_sys data from Ruby using RGeo’s SRSDatabase

This is part 9 of my continuing series of articles on geospatial programming in Ruby and Rails. For a list of the other installments, please visit http://www.daniel-azuma.com/blog/archives/category/tech/georails.

Continue reading