Skip to content
Convert GeoJSON to OSM XML
Branch: master
Clone or download
Pull request Compare This branch is 7 commits ahead, 2 commits behind tyrasd:master.
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Type Name Latest commit message Commit time
Failed to load latest commit information.


Converts GeoJSON to OSM data.


  • as a command line tool:

      $ npm install -g geojsontoosm
      $ geojsontoosm file.geojson > file.osm
  • as a nodejs library:

      $ npm install geojsontoosm
      var geojsontoosm = require('geojsontoosm');
  • included a browser: Install browserify globally, probably need sudo:

      $ npm install -g browserify
      create the js file for the browser: 
      $ browserify node_modules/geojsontoosm/index.js -d --s geos  > dist/pizza.js
      Now include pizza in your project
      <script src="dist/pizza.js" charset="utf-8"></script>
      And you can call with geos() in your project:
      var xml = geos(JSON.parse(json));
      or as text
      var xml = geos(json);
You can’t perform that action at this time.
You signed in with another tab or window. Reload to refresh your session. You signed out in another tab or window. Reload to refresh your session.