RGeo::ActiveRecord is an optional RGeo module providing spatial extensions for ActiveRecord, as well as a set of helpers for writing spatial ActiveRecord adapters based on RGeo.
RGeo is a key component for writing location-aware applications in the Ruby programming language. At its core is an implementation of the industry standard OGC Simple Features Specification, which provides data representations of geometric objects such as points, lines, and polygons, along with a set of geometric analysis operations. See the README for the “rgeo” gem for more information.
RGeo::ActiveRecord is an optional RGeo add-on module providing spatial extensions for ActiveRecord, as well as a set of helpers for writing spatial ActiveRecord adapters based on RGeo. Generally, you will not need to interact directly with this library.
RGeo::ActiveRecord has the following requirements:
Ruby 1.8.7 or later. Ruby 1.9.2 or later preferred.
RGeo 0.3.2 or later.
ActiveRecord 3.0.3 or later. Earlier versions will not work. Appears to be compatible with Rails 3.1rc5.
Arel 2.0.6 or later. Earlier versions will not work.
Generally, ActiveRecord adapters which depend on this module should be installed as gems, and they will install this module automatically as a dependency. However, you can also install it manually as a gem:
gem install rgeo gem install rgeo-activerecord
See the README for the “rgeo” gem, a required dependency, for further installation information.
We consider this gem to be in a late alpha state. There are a still a few holes in the intended functionality, but it is now being tested in a variety of contexts, and we know of several successful production deployments.
We are also currently working on a mechanism for constructing complex spatial queries via extensions to Arel. This work is in the experimental stage, and requires the Rails 3.1 / Arel 2.1 head.
Development and support
Documentation is available at virtuoso.rubyforge.org/rgeo-activerecord/README_rdoc.html
Source code is hosted on Github at github.com/dazuma/rgeo-activerecord
Contributions are welcome. Fork the project on Github.
Report bugs on Github issues at github.org/dazuma/rgeo-activerecord/issues
Support available on the rgeo-users google group at groups.google.com/group/rgeo-users
Contact the author at dazuma at gmail dot com.
RGeo is written by Daniel Azuma (www.daniel-azuma.com).
Development of RGeo is sponsored by GeoPage, Inc. (www.geopage.com).
Copyright 2010-2011 Daniel Azuma
All rights reserved.
Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.
Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.
Neither the name of the copyright holder, nor the names of any other contributors to this software, may be used to endorse or promote products derived from this software without specific prior written permission.
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS “AS IS” AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.