Files

GeoRuby::SimpleFeatures::HexEWKBParser

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

Public Class Methods

new(factory) click to toggle source
# File lib/geo_ruby/simple_features/ewkb_parser.rb, line 150
def initialize(factory)
  super(factory)
end

Public Instance Methods

decode_hex(hexewkb) click to toggle source

transforms a HexEWKB string into an EWKB string

# File lib/geo_ruby/simple_features/ewkb_parser.rb, line 158
def decode_hex(hexewkb)
  result=""
  num_bytes = (hexewkb.size + 1) / 2
  0.upto(num_bytes-1) do |i|
    result << hexewkb[i*2,2].hex
  end
  result
end
parse(hexewkb) click to toggle source

parses an HexEWKB string

# File lib/geo_ruby/simple_features/ewkb_parser.rb, line 154
def parse(hexewkb)
  super(decode_hex(hexewkb))
end

[Validate]

Generated with the Darkfish Rdoc Generator 2.