module PostgresExt::Postgis::ActiveRecord::ConnectionAdapters::PostgreSQLColumn::ClassMethods
Public Instance Methods
geometry_to_string(value)
click to toggle source
# File lib/postgres_ext/postgis/active_record/connection_adapters.rb, line 33 def geometry_to_string(value) if RGeo::Feature::Instance wkb_generator.generate value else value end end
string_to_geometry(value)
click to toggle source
# File lib/postgres_ext/postgis/active_record/connection_adapters.rb, line 25 def string_to_geometry(value) if value.index('(') wkt_parser.parse value else wkb_parser.parse value end end
wkb_generator()
click to toggle source
# File lib/postgres_ext/postgis/active_record/connection_adapters.rb, line 17 def wkb_generator @wkb_generator ||= RGeo::WKRep::WKBGenerator.new hex_format: true, type_format: :ewkb, emit_ewkb_srid: true end
wkb_parser()
click to toggle source
# File lib/postgres_ext/postgis/active_record/connection_adapters.rb, line 13 def wkb_parser @wkb_parser ||= RGeo::WKRep::WKBParser.new nil, support_ewkb: true end
wkt_parser()
click to toggle source
# File lib/postgres_ext/postgis/active_record/connection_adapters.rb, line 21 def wkt_parser @wkt_parser ||= RGeo::WKRep::WKTParser.new nil, support_ewkt: true end