{"id":13426565,"url":"https://github.com/tyrasd/osmtogeojson","last_synced_at":"2025-05-14T17:03:33.628Z","repository":{"id":10978693,"uuid":"13296600","full_name":"tyrasd/osmtogeojson","owner":"tyrasd","description":"convert osm to geojson","archived":false,"fork":false,"pushed_at":"2024-06-28T18:58:39.000Z","size":561,"stargazers_count":723,"open_issues_count":57,"forks_count":120,"subscribers_count":27,"default_branch":"gh-pages","last_synced_at":"2025-05-09T13:11:39.765Z","etag":null,"topics":["geojson","javascript","openstreetmap","openstreetmap-data","overpass-turbo"],"latest_commit_sha":null,"homepage":"http://tyrasd.github.io/osmtogeojson/","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/tyrasd.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2013-10-03T11:41:07.000Z","updated_at":"2025-05-08T20:24:32.000Z","dependencies_parsed_at":"2024-01-03T05:43:54.744Z","dependency_job_id":"32ffc3ed-c463-4893-a6da-f5bce0e5f714","html_url":"https://github.com/tyrasd/osmtogeojson","commit_stats":{"total_commits":214,"total_committers":12,"mean_commits":"17.833333333333332","dds":0.09813084112149528,"last_synced_commit":"c97381a0c86c0a021641dd47d7bea01fb5514716"},"previous_names":[],"tags_count":31,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tyrasd%2Fosmtogeojson","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tyrasd%2Fosmtogeojson/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tyrasd%2Fosmtogeojson/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tyrasd%2Fosmtogeojson/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/tyrasd","download_url":"https://codeload.github.com/tyrasd/osmtogeojson/tar.gz/refs/heads/gh-pages","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":254190373,"owners_count":22029632,"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":["geojson","javascript","openstreetmap","openstreetmap-data","overpass-turbo"],"created_at":"2024-07-31T00:01:37.998Z","updated_at":"2025-05-14T17:03:33.539Z","avatar_url":"https://github.com/tyrasd.png","language":"JavaScript","funding_links":[],"categories":["JavaScript","Transformations"],"sub_categories":[],"readme":"osmtogeojson\n============\n\nConverts [OSM](https://www.openstreetmap.org/) [data](https://wiki.openstreetmap.org/wiki/OSM_XML) to [GeoJSON](https://geojson.org/). Try the [demo](https://tyrasd.github.io/osmtogeojson/)!\n\n* stable\n* real OSM [polygon detection](https://wiki.openstreetmap.org/wiki/Overpass_turbo/Polygon_Features)\n* proper OSM multipolygon support\n* full support for extended Overpass API [geometry modes](https://wiki.openstreetmap.org/wiki/Overpass_API/Overpass_QL#Print_.28out.29)\n* well [tested](https://github.com/tyrasd/osmtogeojson/tree/gh-pages/test/) and proven\n* fast\n\nThis code is used in and maintained by the [overpass turbo](https://github.com/tyrasd/overpass-turbo) project.\n\n[![Build Status](https://secure.travis-ci.org/tyrasd/osmtogeojson.png)](https://travis-ci.org/github/tyrasd/osmtogeojson)\n\nUsage\n-----\n\n### command line tool\n  \nInstallation:\n\n      $ npm install -g osmtogeojson\n\nUsage:\n\n    $ osmtogeojson file.osm \u003e file.geojson\n\nSupported command line options are shown with:\n\n    $ osmtogeojson --help\n\nWhen working with extra large data files (≳ 100 MB) it is recommended to run the programm with a little extra memory to avoid *process out of memory* errors. The easiest way to do this is by running the command as `node \u003cpath-to-osmtogeojson\u003e` and setting the `--max_old_space_size=…` parameter to the available memory size in MB (osmtogeojson typically needs about 4-5 times the input data size). On a Unix system, you can use the following command:\n\n    $ node --max_old_space_size=8192 `which osmtogeojson` large.osm \u003e large.geojson\n\n### nodejs library\n\nInstallation:\n\n    $ npm install osmtogeojson\n\nUsage:\n\n    var osmtogeojson = require('osmtogeojson');\n    osmtogeojson(osm_data);\n\n### browser library\n\n    \u003cscript src='osmtogeojson.js'\u003e\u003c/script\u003e\n\n    osmtogeojson(osm_data);\n\nAPI\n---\n\n### `osmtogeojson( data, options )`\n\nConverts OSM data into GeoJSON.\n\n* `data`: the OSM data. Either as a XML DOM or in [OSM JSON](https://overpass-api.de/output_formats.html#json).\n* `options`: optional. The following options can be used:\n  * `flatProperties`: If true, the resulting GeoJSON feature's properties will be a simple key-value list instead of a structured json object (with separate tags and metadata). default: false\n  * `uninterestingTags`: Either a [blacklist](https://github.com/tyrasd/osmtogeojson/blob/2.0.0/index.js#L14-L24) of tag keys or a callback function. Will be used to decide if a feature is *interesting* enough for its own GeoJSON feature.\n  * `polygonFeatures`: Either a [json object](https://github.com/tyrasd/osmtogeojson/blob/2.0.0/polygon_features.json) or callback function that is used to determine if a closed way should be treated as a Polygon or LineString. [read more](https://wiki.openstreetmap.org/wiki/Overpass_turbo/Polygon_Features)\n\nThe result is a javascript object of GeoJSON data:\n\nGeoJSON\n-------\n\nThe GeoJSON produced by this library will include exactly one GeoJSON-feature for each of the following OSM objects (that is everything that is also visible in overpass turbo's map view):\n\n* all unconnected or [*interesting*](#api) tagged nodes (POIs)\n* all ways (except [*uninteresting*](#api) multipolygon outlines)\n* all multipolygons (simple multipolygons with exactly one closed outer way are present via their outer way)\n\nAll data is given as a FeatureCollection. Each Feature in the collection has an `id` property that is formed from the type and id of the original OSM object (e.g. `node/123`) and has the member `properties` containing the following data:\n\n* `type`: the OSM data type\n* `id`: the OSM id \n* `tags`: a collection of all tags\n* `meta`: metainformaton about the feature (e.g. version, timestamp, user, etc.)\n* `relations`: an array of relations the feature is member of. Each relation is encoded as an object literal containing the following properties: `role` (membership role), `rel` (the relation's id) and `reltags` (contains all tags of the relation)\n* `tainted`: this flag is set when the feature's geometry is incomplete (e.g. missing nodes of a way or missing ways of a multipolygon)\n\nIf the [option](#api) `flatProperties` is set to true, the `properties` object will not contain any nested object literals, but directly provide a concise id, meta data and the tags of the respective OSM object.\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftyrasd%2Fosmtogeojson","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftyrasd%2Fosmtogeojson","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftyrasd%2Fosmtogeojson/lists"}