Project

underpass

0.0
No release in over 3 years
Low commit activity in last 3 years
A library that makes it easy to query the Overpass API and translate its responses into RGeo objects
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
 Dependencies

Development

~> 2.15.0, >= 2.15.0
~> 4.7.3, >= 4.7.3
~> 1.3.0, >= 1.3.0
~> 3.8, >= 3.8.0
~> 0.16.0

Runtime

~> 2.0, >= 2.0.0
 Project Readme

underpass

Gem Version Build Status Coverage Status

A library that makes it easy to query the Overpass API and translate its responses into RGeo objects. It supports queries written in the Overpass QL.

Installation

Install globally:

gem install underpass

Or put it in your Gemfile:

gem 'underpass'

Usage

# Require the library if it's not autoloaded
require 'underpass'
# Define a polygon to be used as bounding box
wkt = <<-WKT
  POLYGON ((
    23.669 47.65,
    23.725 47.65,
    23.725 47.674,
    23.669 47.674,
    23.669 47.65
  ))
WKT
# Create the bounding box in which the query will run
bbox = RGeo::Geographic.spherical_factory.parse_wkt(wkt)
# Define the Overpass QL query
query = 'way["heritage:operator"="lmi"]["ref:ro:lmi"="MM-II-m-B-04508"];'
# Perform the query and get your matches
matches = Underpass::QL::Query.perform(bbox, query)

See more usage examples.

To Do

Have a look at the issue tracker.

How To Contribute

  • Check out the latest master branch to make sure the feature hasn't been implemented or the bug hasn't been fixed yet
  • Check out the issue tracker to make sure someone already hasn't requested it and / or contributed it
  • Fork the project, clone the fork, run bundle install and then make sure rspec runs
  • Start a feature / bugfix branch
  • Commit and push until you are happy with your contribution
  • Make sure to add specs for it - this is important so your contribution won't be broken in a future version unintentionally
  • Open a pull request

Further tips:

  • To test drive the library run bundle console
  • Run guard in the project directory, it'll watch for file changes and run Rubocop and RSpec for real time feedback

License

underpass is released under the MIT License. See the LICENSE file for further details.