Module: SpatialAdapter

Defined in:
lib/postgis_adapter/common_spatial_adapter.rb

Overview

PostGIS Adapter

Common Spatial Adapter for ActiveRecord

Code from georuby.rubyforge.org Spatial Adapter

Instance Method Summary collapse

Instance Method Details

#geometry_data_typesObject

Translation of geometric data types



12
13
14
15
16
17
18
19
20
21
22
23
# File 'lib/postgis_adapter/common_spatial_adapter.rb', line 12

def geometry_data_types
  {
    :point => { :name => "POINT" },
    :line_string => { :name => "LINESTRING" },
    :polygon => { :name => "POLYGON" },
    :geometry_collection => { :name => "GEOMETRYCOLLECTION" },
    :multi_point => { :name => "MULTIPOINT" },
    :multi_line_string => { :name => "MULTILINESTRING" },
    :multi_polygon => { :name => "MULTIPOLYGON" },
    :geometry => { :name => "GEOMETRY"}
  }
end