JSPM

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

Coordinate projections

Package Exports

  • projections

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 (projections) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

Readme

projections

Collection of map projections. See this Wikipedia list. Reverse projections still to be implemented.

npm version Build Status dependency status dev dependency status MIT License

Installation

npm install --save projections

Usage

Each projection function returns an object in the form of {x: …, y: …} where 0 ≤ x ≤ 1.

const collection = require('projections') // for all projections
const miller = require('projections').miller // for a specific projection

collection.mercator({lat:, lon:}, {option:}) // {x: …, y: …}
miller({lat:, lon:}, opt) // {x: …, y: …}

Projections

Projection Full name Available option(s) Map height
braun Braun stereographic projection latLimit
centralcylindrical Central cylindrical projection meridian, latLimit
equirectangular Equirectangular projection meridian, standardParallel
gall Gall stereographic projection -
gallpeters Gall–Peters projection - 2 / π
lambert Lambert cylindrical equal-area projection meridian 1 / π
mercator (Web-)Mercator projection meridian, latLimit
miller Miller cylindrical projection latLimit
sinusoidal Sinusoidal projection meridian 1/2

Options

Option description Default
meridian Latitude of the central meridian 0
latLimit maximal latitude in degrees (<90°) 85
standardParallel latitude of the standard parallel(s) 0

Contributing

If you found a bug, want to propose a feature or feel the urge to complain about your life, feel free to visit the issues page.