Class: Armg::WktSerializer
- Inherits:
-
Object
- Object
- Armg::WktSerializer
- Defined in:
- lib/armg/wkt_serializer.rb
Constant Summary collapse
- DEFAULT_WKB_GENERATOR_OPTIONS =
{ type_format: :ewkb, little_endian: true }.freeze
- DEFAULT_WKT_PARSER_OPTIONS =
{ support_ewkt: true }.freeze
Instance Method Summary collapse
-
#initialize(factory: nil, wkb_generator_options: {}, wkt_parser_options: {}) ⇒ WktSerializer
constructor
A new instance of WktSerializer.
- #serialize(wkt) ⇒ Object
Constructor Details
#initialize(factory: nil, wkb_generator_options: {}, wkt_parser_options: {}) ⇒ WktSerializer
Returns a new instance of WktSerializer.
14 15 16 17 18 19 20 21 22 |
# File 'lib/armg/wkt_serializer.rb', line 14 def initialize(factory: nil, wkb_generator_options: {}, wkt_parser_options: {}) @wkb_generator = RGeo::WKRep::WKBGenerator.new( DEFAULT_WKB_GENERATOR_OPTIONS.merge() ) @wkt_parser = RGeo::WKRep::WKTParser.new( factory, DEFAULT_WKT_PARSER_OPTIONS.merge() ) end |