Command line tool that queries the AWS OSM public datasets.
npm install -g mrworldwide
Currently to use the query
command you should manually setup an Athena database and osm tables. The cli requires the following environment variables to be set:
ATHENA_PREFIX
: A namespace for the database and database tables.AWS_REGION
: Region where the S3 bucket and Athena queries will runAWS_ACCESS_KEY_ID
: AWS access keyAWS_SECRET_ACCESS_KEY
: AWS secret keyAWS_OUTPUT_BUCKET
: Bucket where query results are stored
The cli is aliased to worldwide
Usage
$ worldwide query <sql>
$ echo <sql> | worldwide query
Examples
$ worldwide query "SELECT count(*) from osm.changesets"
Under the hood, mrworldwide
uses Amazon Athena and little-owl
to run queries.
MIT - See LICENSE.md
This tool wouldn't be possible without @mojodna laying the groundwork with transcoding OSM to ORC and making it queryable with Athena.