Skip to content
Converters for various coordinate representations.
JavaScript Makefile
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
lib
test
.editorconfig
.gitignore
.jshintrc
.travis.yml
History.md
Makefile
Readme.md
index.js
package.json

Readme.md

NPM version Build Status Dependency Status

lonlat

Converters for various coordinate representations.

Install

$ npm install --save lonlat

Usage

var lonlat = require('lonlat');

lonlat.geojson.centerSphere();
lonlat.mongo.toPoly();

geojson methods always return geojson shape or collection of shapes

  • centerSphere- create a Sphere corresponding to inscribed circle
  • multiPolygon - create a Polygon from the string of coordinates
  • polygon - create a Polygon from the string of coordinates
  • shapesArray - split boxes into Polygons and Multipolygons
  • splitBox - split box into grid of Polygons

mongo methods return coordinates pairs [lon,lat] that can be indexed by mongo

  • toLonLat
  • toPoly
  • toBox
  • toBoxes

License

MIT © Damian Krzeminski

You can’t perform that action at this time.