JSPM

osm-pbf-to-mddf

1.1.0
  • ESM via JSPM
  • ES Module Entrypoint
  • Export Map
  • Keywords
  • License
  • Repository URL
  • TypeScript Types
  • README
  • Created
  • Published
  • Downloads 1
  • Score
    100M100P100Q20583F
  • License MIT

convert open street map protocol buffers to mddf

Package Exports

  • osm-pbf-to-mddf

This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (osm-pbf-to-mddf) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

Readme

osm-pbf-to-mddf

convert open street map protocol buffers to mddf

example

#!/usr/bin/env node

var fs = require('fs');
var fd = fs.openSync(argv.outfile, 'w+');
var stat = fs.fstatSync(fd);

var mddf = require('mddf');
var df = mddf({
    blksize: argv.blksize,
    dim: 3, size: 0,
    read: fs.read.bind(null, fd),
    write: fs.write.bind(null, fd)
});

var osmddf = require('osm-pbf-to-mddf')(df);
fs.createReadStream('auckland.osm.pbf').pipe(osmddf);

methods

var osmddf = require('osm-pbf-to-mddf')

var w = osmddf(df, opts)

Create a writable stream w that will write an incoming open street map protobuf file to the mddf index df.

Set opts.fatal to false to emit error events like usual but continue processing.

usage

usage: osm-pbf-to-mddf OPTIONS

OPTIONS are:

  -i INFILE   Read from INFILE, an open street map pbf file.
  -o OUTFILE  Write to OUTFILE, an mddf index.
  -b BLKSIZE  Block size to use for mddf index. Default: 4096.
  
  --no-fatal  Print errors to stderr but continue processing.

install

To get the library, do:

npm install osm-pbf-to-mddf

To get the command-line program, do:

npm install -g osm-pbf-to-mddf

license

MIT