All Projects → BrunoSalerno → overpass-api-ruby

BrunoSalerno / overpass-api-ruby

Licence: MIT License
A Ruby wrapper for OpenStreetMap Overpass API

Programming Languages

ruby
36898 projects - #4 most used programming language

Projects that are alternatives of or similar to overpass-api-ruby

Osm
General purpose library for reading, writing and working with OpenStreetMap data
Stars: ✭ 153 (+595.45%)
Mutual labels:  xml, openstreetmap
Osmnx
OSMnx: Python for street networks. Retrieve, model, analyze, and visualize street networks and other spatial data from OpenStreetMap.
Stars: ✭ 3,357 (+15159.09%)
Mutual labels:  openstreetmap, overpass-api
vxquery
Mirror of Apache VXQuery
Stars: ✭ 19 (-13.64%)
Mutual labels:  xml
XPathTools
A Visual Studio Extension which can run any XPath and XPath function; navigates through results at the click of a button. Can show and copy any XPath incl. XML namespaces, avoiding XML namespace induced headaches. Keeps track of the current XPath via the statusbar.
Stars: ✭ 40 (+81.82%)
Mutual labels:  xml
osm-wikidata
Match OSM entities with Wikidata items
Stars: ✭ 72 (+227.27%)
Mutual labels:  openstreetmap
pyEDAA.IPXACT
An IP-XACT DOM for IEEE 1685-2014 in Python.
Stars: ✭ 13 (-40.91%)
Mutual labels:  xml
libcitygml
C++ Library for CityGML Parsing and Visualization
Stars: ✭ 69 (+213.64%)
Mutual labels:  xml
spec
Just Data. Save up to 85% network bandwidth and storage.
Stars: ✭ 86 (+290.91%)
Mutual labels:  xml
osm-analytics-cruncher
Backend code for osm-analytics
Stars: ✭ 14 (-36.36%)
Mutual labels:  openstreetmap
datamaker
Data generator command-line tool and library. Create JSON, CSV, XML data from templates.
Stars: ✭ 23 (+4.55%)
Mutual labels:  xml
SNAP
Easy data format saving and loading for GameMaker Studio 2.3.2
Stars: ✭ 49 (+122.73%)
Mutual labels:  xml
osmoscope-ui
An OpenStreetMap Quality Assurance Tool - User Interface
Stars: ✭ 31 (+40.91%)
Mutual labels:  openstreetmap
sitewriter
A rust library to generate sitemaps.
Stars: ✭ 18 (-18.18%)
Mutual labels:  xml
synapse
Apache Synapse is a lightweight and high-performance Enterprise Service Bus (ESB)
Stars: ✭ 43 (+95.45%)
Mutual labels:  xml
openinframap
Open Infrastructure Map
Stars: ✭ 59 (+168.18%)
Mutual labels:  openstreetmap
laravel-xml-middleware
A Laravel Middleware to accept XML requests
Stars: ✭ 17 (-22.73%)
Mutual labels:  xml
MapComplete
A small and easy OpenStreetMap editor
Stars: ✭ 101 (+359.09%)
Mutual labels:  openstreetmap
video seg
视频片段提取
Stars: ✭ 14 (-36.36%)
Mutual labels:  xml
vscode-odoo-snippets
Develop Odoo modules faster and with no Typing Errors.
Stars: ✭ 20 (-9.09%)
Mutual labels:  xml
xmlresolver
The xmlresolver project provides an advanced implementation of the SAX EntityResolver (and extended EntityResolver2), the Transformer URIResolver, the DOM LSResourceResolver, the StAX XMLResolver, and a new NamespaceResolver. It uses the OASIS XML Catalogs V1.1 Standard to provide a mapping from external identifiers and URIs to local resources.
Stars: ✭ 31 (+40.91%)
Mutual labels:  xml

Overpass API Ruby CircleCI

A Ruby wrapper for OpenStreetMap Overpass API. Supports both QL and XML.

Note: Version 0.2 introduces breaking changes. Check the file CHANGELOG.md.

Install

gem install overpass-api-ruby

or add gem 'overpass-api-ruby' to your Gemfile

Usage

Using XML:

require 'overpass_api_ruby'

options={:bbox => {:s => -34.705448, :n => -34.526562,
                   :w => -58.531471, :e => -58.335159},
         :timeout => 900,
         :element_limit => 1073741824}

overpass = OverpassAPI::XML.new(options)

query = "<union><query type='relation'><has-kv k='route' v='subway'/></query>" <<
        "</union><union><item/><recurse type='down'/></union>"

response = overpass.query(query)

Using QL:

require 'overpass_api_ruby'

options={:bbox => {:s => -34.705448, :n => -34.526562,
                   :w => -58.531471, :e => -58.335159},
         :timeout => 900,
         :maxsize => 1073741824}

overpass = OverpassAPI::QL.new(options)

query = "rel['route'='subway'];(._;>;);out body;"

response = overpass.query(query)

Common options on instantiation

bbox                    Hash. Global bounding box.
endpoint                String.
                        Defaults to http://overpass-api.de/api/interpreter
timeout                 Integer.

Specific options on instantiation

QL

maxsize                 Integer.

XML

element_limit           Integer.

See Overpass API

Public methods

Both QL and XML classes have the same public methods:

query (<String query>)      Performs the query passed using the global values set on instantiation.

raw_query (<String query>)  The whole query must be passed.

buid_query (<String query>) Returns a String containing the whole query.

bounding_box (s,n,w,e)      Defines the global bounding box.

Test

Run rake spec

License

MIT.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].