Class: Underpass::QL::BoundingBox

Inherits:
Object
  • Object
show all
Defined in:
lib/underpass/ql/bounding_box.rb

Overview

Bounding box related utilities.

Class Method Summary collapse

Class Method Details

.from_geometry(geometry) ⇒ Object

Returns the Overpass query language bounding box string when provided with an RGeo geometry



9
10
11
12
# File 'lib/underpass/ql/bounding_box.rb', line 9

def self.from_geometry(geometry)
  r_bb = RGeo::Cartesian::BoundingBox.create_from_geometry(geometry)
  "bbox:#{r_bb.min_y},#{r_bb.min_x},#{r_bb.max_y},#{r_bb.max_x}"
end