Method: GeoCombine::BoundingBox.from_envelope

Defined in:
lib/geo_combine/bounding_box.rb

.from_envelope(envelope) ⇒ Object



50
51
52
53
54
55
56
57
58
59
60
# File 'lib/geo_combine/bounding_box.rb', line 50

def self.from_envelope(envelope)
  return if envelope.nil?

  envelope = envelope[/.*ENVELOPE\(([^)]*)/, 1].split(',')
  new(
    west: envelope[0],
    south: envelope[3],
    east: envelope[1],
    north: envelope[2]
  )
end