Class: GeoRuby::SimpleFeatures::HexEWKBParser
- Inherits:
-
EWKBParser
- Object
- EWKBParser
- GeoRuby::SimpleFeatures::HexEWKBParser
- Defined in:
- lib/geo_ruby/ewk/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
-
#decode_hex(hexewkb) ⇒ Object
transforms a HexEWKB string into an EWKB string.
-
#parse(hexewkb) ⇒ Object
parses an HexEWKB string.
Methods inherited from EWKBParser
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
149 150 151 |
# File 'lib/geo_ruby/ewk/ewkb_parser.rb', line 149 def decode_hex(hexewkb) [hexewkb].pack('H*') end |
#parse(hexewkb) ⇒ Object
parses an HexEWKB string
144 145 146 |
# File 'lib/geo_ruby/ewk/ewkb_parser.rb', line 144 def parse(hexewkb) super(decode_hex(hexewkb)) end |