Skip to content

gplv2/geojsontoosm

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

geojsontoosm

Converts GeoJSON to OSM data.

Usage

  • 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');
      geojsontoosm(geojson_data);
    
  • 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);
    

About

Convert GeoJSON to OSM XML

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • JavaScript 100.0%