Module: ActiveRecordSpatial::SpatialColumns

Extended by:
ActiveSupport::Concern
Defined in:
lib/activerecord-spatial/spatial_columns.rb

Overview

This little module helps us out with geometry columns. At least, in PostgreSQL it does.

This module will add a method called spatial_columns to your model which will contain information that can be gleaned from the geometry_columns and geography_columns tables/views that PostGIS creates.

You can also have the module automagically create some accessor methods for you to make your life easier. These accessor methods will override the ActiveRecord defaults and allow you to set geometry column values using Geos geometry objects directly or with PostGIS-style extended WKT and such. See create_spatial_column_accessors! for details.

Defined Under Namespace

Modules: ClassMethods Classes: CantConvertSRID, InvalidGeometry, SRIDNotFound

Constant Summary collapse

SPATIAL_COLUMN_OUTPUT_FORMATS =
%w{ geos wkt wkb ewkt ewkb wkb_bin ewkb_bin }.freeze