Code Monkey home page Code Monkey logo

query-overpass's Introduction

A few words on diversity in tech

Greenkeeper badge

I need to take some of your time. I can't believe we let shit like the Kathy Sierra incident or what happened to Brianna Wu happen over and over again. I can't believe we, the open source community, let sexist, misogynous shit happen over and over again.

I strongly believe that it is my โ€” and your โ€” duty to make the open source community, as well as the tech community at large, a community where everyone feel welcome and is accepted. At the very minimum, that means making sure the community and its forums both are safe, and are perceived as safe. It means being friendly and inclusive, even when you disagree with people. It means not shrugging off discussions about sexism and inclusiveness with handwaving about censorship and free speech. For a more elaborate document on what that means, the NPM Code of Conduct is a good start, Geek Feminism's resources for allies contains much more.

While I can't force anyone to do anything, if you happen to disagree with this, I ask of you not to use any of the open source I have published. Nor am I interested in contributions from people who can't accept or act respectfully towards other humans regardless of gender identity, sexual orientation, disability, ethnicity, religion, age, physical appearance, body size, race, or similar personal characteristics. If you think feminism, anti-racism or the LGBT movement is somehow wrong, disturbing or irrelevant, I ask you to go elsewhere to find software.

query-overpass NPM version Build Status

Make queries to OpenStreetMap's overpass API and output as GeoJSON.

cli

install:

$ npm install -g query-overpass

use (Bash):

$ echo 'node(57.7,11.9,57.8,12.0)[amenity=bar];out;' | query-overpass

use (Windows cmd):

$ echo node(57.7,11.9,57.8,12.0)[amenity=bar];out; | query-overpass

Optionally, a file containing the query can be passed as the first argument:

$ query-overpass query.ql

Goes well together with other command line tools, like for example geojsonio-cli:

$ npm install -g geojsonio-cli
$ echo 'node(57.7,11.9,57.8,12.0)[amenity=bar];out;' | query-overpass | geojsonio

You can also provide the URL where the Overpass API is located:

$ query-overpass --overpass-url http://my.overpass-provider.org/

The default is to use https://overpass-api.de/api/interpreter.

You can also flatten each GeoJSON feature, making it more easily processable by other software and tools

$ query-overpass --flat-properties

The default behaviour, without adding --flat-properties is to use false to be consistent with previous version.

usage

Installation is easy with npm:

$ npm install query-overpass

api

query-overpass exports a single function:

query_overpass(query, callback, options)

Performs the provided query and calls the callback when done. The callback is of the form

callback(error, data)

Where error is an object containing message and statusCode if an error occured, or undefined if no error occured. data will be the query response as an GeoJSON object.

The options supported at the moment are

  • overpassUrl, which will default to 'https://overpass-api.de/api/interpreter' unless specified.
  • flatProperties which will default to false.

query-overpass's People

Contributors

bsvensson avatar greenkeeper[bot] avatar greenkeeperio-bot avatar haroenv avatar johnjohndoe avatar morganrallen avatar perliedman avatar romankaravia avatar thomasg77 avatar tyrasd avatar waldyrious avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.