module RGeo::ActiveRecord
Constants
- VERSION
Public Class Methods
geometric_type_from_name(name)
click to toggle source
Return a feature type module given a string type.
# File lib/rgeo/active_record/common_adapter_elements.rb, line 6 def self.geometric_type_from_name(name) case name.to_s when /^geometrycollection/i then Feature::GeometryCollection when /^geometry/i then Feature::Geometry when /^linestring/i then Feature::LineString when /^multilinestring/i then Feature::MultiLineString when /^multipoint/i then Feature::MultiPoint when /^multipolygon/i then Feature::MultiPolygon when /^point/i then Feature::Point when /^polygon/i then Feature::Polygon end end
spatial_expressions_supported?()
click to toggle source
Returns true if spatial expressions (i.e. the methods in the SpatialExpressions
module) are supported.
# File lib/rgeo/active_record/spatial_expressions.rb, line 7 def self.spatial_expressions_supported? defined?(Arel::Nodes::NamedFunction) end