Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
convert osm to geojson
JavaScript

Fetching latest commit…

Cannot retrieve the latest commit at this time

Failed to load latest commit information.
test
LICENSE
README.md
osmtogeojson
osmtogeojson.js
package.json

README.md

osmtogeojson

Converts OSM data to GeoJSON.

This code is used in and maintained by the overpass turbo project.

Usage & API

  • as a command line tool:

    npm install -g osmtogeojson
    $ osmtogeojson file.osm > file.geojson
    
  • as a nodejs libary:

    npm install osmtogeojson
    
    var osm = require('osmtogeojson');
    osm.toGeojson(xml_data);
    
  • as a browser library:

    <script src='osmtogeojson.js'></script>
    
    osmtogeojson.toGeojson(xml_data);
    
Something went wrong with that request. Please try again.