Class: GeoRuby::SimpleFeatures::HexEWKBParser

Inherits:
EWKBParser
  • Object
show all
Defined in:
lib/geo_ruby/simple_features/ewkb_parser.rb

Overview

Parses HexEWKB strings. In reality, it just transforms the HexEWKB string into the equivalent EWKB string and lets the EWKBParser do the actual parsing.

Instance Method Summary collapse

Methods inherited from EWKBParser

#initialize

Constructor Details

This class inherits a constructor from GeoRuby::SimpleFeatures::EWKBParser

Instance Method Details

#decode_hex(hexewkb) ⇒ Object

transforms a HexEWKB string into an EWKB string



161
162
163
# File 'lib/geo_ruby/simple_features/ewkb_parser.rb', line 161

def decode_hex(hexewkb)
  [hexewkb].pack("H*")
end

#parse(hexewkb) ⇒ Object

parses an HexEWKB string



156
157
158
# File 'lib/geo_ruby/simple_features/ewkb_parser.rb', line 156

def parse(hexewkb)
  super(decode_hex(hexewkb))
end