OSM & GeoJSON is a Javascript module for converting OSM XML to GeoJSON, and the inverse, GeoJSON to OSM XML. It is dependency free and works in the browser or nodejs. The OSM conversion is a fork of OSM2GEO by tecoholic with some improvements, most notably multipolygon support.
Usage:<script src='osm_geojson.js'></script>
npm install osm-and-geojson
true
, osm_geojson.osm2geojson(yourOsm, true) to include metadata about the item in the properties, namespaced osm_*.download OSM & GeoJSON
github: aaronlidman/osm-and-geojson
npm: osm-and-geojson
license: WTFPL