Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

osm2json

Package Overview
Dependencies
Maintainers
1
Versions
9
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

osm2json

Converts an OSM XML file to JSON objects as a transform stream

  • 0.0.1
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
1
decreased by-50%
Maintainers
1
Weekly downloads
 
Created
Source

Implements a Node Transport Stream. Takes a readable stream of OSM XML and outputs a stream of JSON in the following format:

{
    "attrs": {
        "changeset": "50", 
        "id": "29", 
        "lat": "38.9003573", 
        "lon": "-77.0232578", 
        "timestamp": "2013-09-05T19:38:11Z", 
        "version": "1"
    }, 
    "tags": [
        {
            "k": "amenity", 
            "v": "place_of_worship"
        }
    ], 
    "type": "node"
}
{
  "type": "way",
  "attrs": {
    "id": "3",
    "version": "3",
    "timestamp": "2013-09-05T19:38:11Z",
    "changeset": "49"
  },
  "nodes": [{
    "ref": "19"
  }, {
    "ref": "20"
  }, {
    "ref": "21"
  }, {
    "ref": "22"
  }, {
    "ref": "26"
  }, {
    "ref": "27"
  }],
  "tags": [{
    "k": "name",
    "v": "York St"
  }]
}

##Example

var fs = require('fs')
  , Osm2Json = require('../lib/osm2json');
  
var rs = fs.createReadStream('./test.osm');

var osm2Json = new Osm2Json();

rs.pipe(osm2Json).pipe(process.stdout);

Keywords

FAQs

Package last updated on 10 Sep 2013

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc