Sha256: 9a330495b5293e936c3c609f171b028da5250586158966dcd9b7505b336909c7
Contents?: true
Size: 356 Bytes
Versions: 4
Compression:
Stored size: 356 Bytes
Contents
class Armg::WkbSerializer DEFAULT_OPTIONS = { type_format: :ewkb, little_endian: true, } def initialize(**options) options = DEFAULT_OPTIONS.merge(options) @wkb_generator = RGeo::WKRep::WKBGenerator.new(options) end def serialize(obj) srid = Armg::Utils.pack_srid(obj.srid) srid + @wkb_generator.generate(obj) end end
Version data entries
4 entries across 4 versions & 1 rubygems
Version | Path |
---|---|
armg-0.7.1 | lib/armg/wkb_serializer.rb |
armg-0.7.0 | lib/armg/wkb_serializer.rb |
armg-0.6.1 | lib/armg/wkb_serializer.rb |
armg-0.6.0 | lib/armg/wkb_serializer.rb |