class Underpass::QL::BoundingBox

Bounding box related utilities.

Public Class Methods

from_geometry(geometry) click to toggle source

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

# 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