Class: Underpass::QL::Query
- Inherits:
-
Object
- Object
- Underpass::QL::Query
- Defined in:
- lib/underpass/ql/query.rb
Overview
Provides a shortcut method that makes it easy to work with the library
Class Method Summary collapse
-
.perform(bounding_box, query) ⇒ Object
Shortcut method that glues together the whole library.
Class Method Details
.perform(bounding_box, query) ⇒ Object
Shortcut method that glues together the whole library.
-
bounding_box
an RGeo polygon -
query
is the Overpass QL query
10 11 12 13 14 |
# File 'lib/underpass/ql/query.rb', line 10 def self.perform(bounding_box, query) op_bbox = Underpass::QL::BoundingBox.from_geometry(bounding_box) response = Underpass::QL::Request.new(query, op_bbox).run Underpass::QL::Parser.new(response).parse.matches end |