{"id":13554151,"url":"https://github.com/osmlab/osm-meta-util","last_synced_at":"2025-04-03T06:31:12.182Z","repository":{"id":27133444,"uuid":"30601982","full_name":"osmlab/osm-meta-util","owner":"osmlab","description":"Utility for downloading and processing OSM metadata","archived":false,"fork":false,"pushed_at":"2015-04-27T21:09:07.000Z","size":349,"stargazers_count":44,"open_issues_count":2,"forks_count":17,"subscribers_count":22,"default_branch":"master","last_synced_at":"2024-11-23T02:19:52.626Z","etag":null,"topics":["cli","metadata","openstreetmap","stream"],"latest_commit_sha":null,"homepage":"","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/osmlab.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2015-02-10T16:37:55.000Z","updated_at":"2022-10-21T20:02:33.000Z","dependencies_parsed_at":"2022-08-31T16:12:02.018Z","dependency_job_id":null,"html_url":"https://github.com/osmlab/osm-meta-util","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/osmlab%2Fosm-meta-util","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/osmlab%2Fosm-meta-util/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/osmlab%2Fosm-meta-util/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/osmlab%2Fosm-meta-util/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/osmlab","download_url":"https://codeload.github.com/osmlab/osm-meta-util/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":246947942,"owners_count":20859345,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["cli","metadata","openstreetmap","stream"],"created_at":"2024-08-01T12:02:40.718Z","updated_at":"2025-04-03T06:31:11.862Z","avatar_url":"https://github.com/osmlab.png","language":"JavaScript","funding_links":[],"categories":["JavaScript","cli"],"sub_categories":[],"readme":"# OSM-Meta-util\n\nA tool to download and process OSM Metadata. This data contains the most recent annotations around a commit to OSM. Specifically, `commit text`, `username`, `bounding box`, `creation date` and `number of edits`. The data is downloaded from the [planet](http://planet.osm.org/replication/changesets/) repository, which contains minutely changesets to OSM.\n\nOnce installed the tool can be used to pipe in compressed XML data between two dates and output it in JSON. OSM Meta Util can also be used in polling mode and continuously download the latest data every minute.\n\nA joint project built by [Development Seed](https://github.com/developmentseed) and the [American Red Cross](https://github.com/americanredcross).\n\n## Installing\n\nClone the repo or download it as a zip. `npm install` the dependencies.\n\n## Running\n\nRequire `osm-meta-util` in your node app.\n\n```javascript\nvar MetaUtil = require('osm-meta-util');\n```\n\nThe `MetaUtil` constructor builds a Node Stream, so you can pipe it into stream transformers or into `process.stdout`\n\nThere are a few ways of using the utility:\n\n### 1. Downloading between two dates\n\nThe files are named in numerical order since February 28th, 2012. They're incremented every minute. You need the file name related to the start and end date. For example, `001181708` refers to [http://planet.osm.org/replication/changesets/001/181/708.osm.gz](http://planet.osm.org/replication/changesets/001/181/708.osm.gz), created on `2015-02-10 20:56`.\n\n```javascript\nvar MetaUtil = require('osm-meta-util');\n// Getting historical metadata, specify a start \u0026 end\nvar meta = MetaUtil({\n     'delay': 1000,\n     'start': '001181708', //2015-02-10 20:56\n     'end': '001181721' //2015-02-10 21:09\n }).pipe(process.stdout)\n```\n\n### 2. Continuously\n\n```javascript\n// Live Mode! Updates every minute\nvar meta = MetaUtil().pipe(process.stdout)\n```\n\n### 3. Using as a command line utility\n\n```javascript\nMetaUtil({\n    'start': process.argv[2],\n    'end': process.argv[3],\n    'delay': process.argv[4]\n}).pipe(process.stdout)\n```\n\nUse it in combination with [jq](https://stedolan.github.io/jq/)\n\n```sh\nnode app 001181708 001181721 1000 | jq -c '{user:.user, date: .closed_at}'\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fosmlab%2Fosm-meta-util","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fosmlab%2Fosm-meta-util","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fosmlab%2Fosm-meta-util/lists"}