1.1.0 • Published 7 years ago

cleangeojson2mongo v1.1.0

Weekly downloads
-
License
ISC
Repository
-
Last release
7 years ago

stable

Import document in GeoJSON format to MongoDB .

This converts KML & GPX to GeoJSON, in a browser or with Node.js. Then this convert document is imported into MongoDB mongoimport

  • Dependency-free
  • Tiny
  • Tested
  • Node.js

Want to use this with Leaflet? Try leaflet-omnivore!

API

cleanGeoJson2Mongo.parse2savemongo(path, collection, host, port, db, user, pass, authdb)

Convert a KML or GPX 'file | path' to GeoJSON and insert into MongoDB. DB parameters is necessary include them.

The output is a log with operations and MongoDB results.

CLI

Install it into your path with npm install -i cleangeojson2mongo.

~> node test/test.js PATH COLLECTION [database info - host port db user pass authDB]

Node.js

Install it into your project with npm install --save cleangeojson2mongo.

// using cleangeojson2mongo in nodejs

var cj2m = require('cleangeojson2mongo');

console.log('Resultado:: ' + cj2m.parse2savemongo(path, collection, host, port, db, user, pass, authdb));

KML Feature Support

  • Point
  • Polygon
  • LineString
  • name & description
  • ExtendedData
  • SimpleData
  • MultiGeometry -> GeometryCollection
  • Styles with hashing
  • Tracks & MultiTracks with gx:coords, including altitude
  • TimeSpan
  • TimeStamp
  • NetworkLinks
  • GroundOverlays

GPX Feature Support

  • Line Paths
  • Line styles
  • Properties
    • 'name', 'cmt', 'desc', 'link', 'time', 'keywords', 'sym', 'type' tags
    • 'author', 'copyright' tags
1.1.0

7 years ago

1.0.7

7 years ago

1.0.6

7 years ago

1.0.5

7 years ago

1.0.4

7 years ago

1.0.3

7 years ago

1.0.2

7 years ago

1.0.1

7 years ago

1.0.0

7 years ago