openstreetmapmongo
Store Openstreetmap data in Mongo DB
Last updated 7 years ago by kwiky .
Repository · Bugs · Original npm · Tarball · package.json
$ cnpm install openstreetmapmongo 
SYNC missed versions from official npm registry.

OpenstreetmapMongo

Credits

Description

Store Openstreetmap data in Mongo DB

Usage

var assert = require('assert');
var util = require('util');

var OsmMongo = require('../osm-mongo').OsmMongo;

settings = {
    MONGO_HOST: 'localhost',
    MONGO_PORT: 27017
}

osm = new OsmMongo(settings.MONGO_HOST, settings.MONGO_PORT);

// find a subway lines near Santiago center
osm.findOsmNear([ -70.650404, -33.4379537 ], 16, {railway: "subway"}, function(error, subway) {
    var len = 0;
    subway.ways.forEach(function(way) {
        len += way.getLengthMeters();
    })
    console.log("Total subway length in km "+len/1000.0);
    process.exit(0);
});

Links

Node and npm modules

Openstreetmap

Current Tags

  • 0.0.2                                ...           latest (7 years ago)

1 Versions

  • 0.0.2                                ...           7 years ago
Maintainers (1)
Downloads
Today 0
This Week 0
This Month 0
Last Day 0
Last Week 0
Last Month 0
Dependencies (4)
Dev Dependencies (0)
None
Dependents (1)

Copyright 2014 - 2017 © taobao.org |