{"name":"sphericalmercator","description":"Transformations between the Web Mercator projection and Latitude Longitude coordinates","version":"1.0.4","licenses":[{"type":"BSD"}],"keywords":["map","projection","transformations"],"url":"http://github.com/mapbox/node-sphericalmercator","repository":{"type":"git","url":"git://github.com/mapbox/node-sphericalmercator.git"},"author":{"name":"MapBox","email":"info@mapbox.com","url":"http://mapbox.com/"},"main":"./sphericalmercator","devDependencies":{"tape":"3.0.x"},"scripts":{"test":"tape test/*.test.js"},"bin":{"bbox":"bin/bbox.js","xyz":"bin/xyz.js","to900913":"bin/to900913.js","to4326":"bin/to4326.js"},"gitHead":"0afd3b5ab962216915126a0e3f7efaafb36b259b","bugs":{"url":"https://github.com/mapbox/node-sphericalmercator/issues"},"homepage":"https://github.com/mapbox/node-sphericalmercator","_id":"sphericalmercator@1.0.4","_shasum":"baad4e34187f06e87f2e92fc1280199fa1b01d4e","_from":".","_npmVersion":"1.4.28","_npmUser":{"name":"yhahn","email":"young@mapbox.com"},"maintainers":[{"name":"kkaefer","email":"kkaefer@gmail.com"},{"name":"tmcw","email":"macwright@gmail.com"},{"name":"yhahn","email":"young@developmentseed.org"},{"name":"willwhite","email":"will@developmentseed.org"},{"name":"springmeyer","email":"dane@dbsgeo.com"},{"name":"mateov","email":"matt@mapbox.com"},{"name":"karenzshea","email":"karen@mapbox.com"},{"name":"edenh","email":"eden@mapbox.com"},{"name":"sgillies","email":"sean@mapbox.com"},{"name":"lbud","email":"lauren@mapbox.com"},{"name":"bsudekum","email":"bobby@mapbox.com"},{"name":"dnomadb","email":"damon@mapbox.com"},{"name":"ian29","email":"ian.villeda@gmail.com"},{"name":"dvncan","email":"duncan@mapbox.com"},{"name":"nickidlugash","email":"nicki@mapbox.com"},{"name":"samanbb","email":"saman@mapbox.com"},{"name":"ajashton","email":"aj.ashton@gmail.com"},{"name":"lxbarth","email":"alex@developmentseed.org"},{"name":"mikemorris","email":"michael.patrick.morris@gmail.com"},{"name":"ianshward","email":"ian@mapbox.com"},{"name":"mourner","email":"agafonkin@gmail.com"},{"name":"tristen","email":"tristen.brown@gmail.com"},{"name":"ingalls","email":"nicholas.ingalls@gmail.com"},{"name":"ansis","email":"ansis.brammanis@gmail.com"},{"name":"jfirebaugh","email":"john.firebaugh@gmail.com"},{"name":"miccolis","email":"jeff@miccolis.net"},{"name":"gretacb","email":"carol@mapbox.com"},{"name":"aaronlidman","email":"aaronlidman@gmail.com"},{"name":"morganherlocker","email":"morgan.herlocker@gmail.com"},{"name":"camilleanne","email":"camille@mapbox.com"},{"name":"rclark","email":"ryan.clark.j@gmail.com"},{"name":"mapbox","email":"accounts@mapbox.com"},{"name":"dthompson","email":"dthompson@gmail.com"}],"dist":{"shasum":"baad4e34187f06e87f2e92fc1280199fa1b01d4e","tarball":"http://registry-npm.ywwl.com/sphericalmercator/download/sphericalmercator-1.0.4.tgz","integrity":"sha512-67wcL7eAVw+zPYBxhsb8YTJL32ZYrIeAXs3aU63WCSElDw2vd7akrX9QVPj+k7EY8Tw8KyuYkhHyOdl05EI0ig==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDbgfS0kXEYRjGcj5pQLTmmbXPaPK8Euho12+0aeOXkIAIgE4900+tAwqm5aqjdM3ykVulqR56QMw4jYZAQTcfUgTw="}],"size":5087,"noattachment":false,"key":"/sphericalmercator/-/sphericalmercator-1.0.4.tgz"},"deprecated":"This module is now under the @mapbox namespace: install @mapbox/sphericalmercator instead","directories":{},"readme":"[![Build Status](https://secure.travis-ci.org/mapbox/node-sphericalmercator.svg?branch=master)](http://travis-ci.org/mapbox/node-sphericalmercator)\n\n`node-sphericalmercator` provides projection math for converting between\nmercator meters, screen pixels (of 256x256 or configurable-size tiles), and\nlatitude/longitude.\n\nCompatible with nodejs packages and in-browser.\n\n## Installation\n\n`npm install sphericalmercator`\n\n## API\n\nSome datatypes are assumed to be arrays: `ll` is `[lon, lat]`, `xy` and `px` are\n`[x, y]`.\n\n```javascript\n// By default, precomputes up to z30\nvar merc = new SphericalMercator({\n    size: 256\n});\n```\n\n### `px(ll, zoom)`\n\nConvert lon, lat to screen pixel x, y from 0, 0 origin, at a certain zoom level.\nThe inverse of `ll`\n\n### `ll(px, zoom)`\n\nConvert screen pixel value to lon, lat, at a certain zoom level. The inverse\nof `px`\n\n### `bbox(x, y, zoom, tms_style, srs)`\n\nConvert tile xyz value to bbox of the form `[w, s, e, n]`\n\n* `x` {Number} x (longitude) number.\n* `y` {Number} y (latitude) number.\n* `zoom` {Number} zoom.\n* `tms_style` {Boolean} whether to compute using tms-style. (optional, default false)\n* `srs` {String} projection for resulting bbox (WGS84|900913). (optional, default WGS84)\n\nReturns bbox array of values in form `[w, s, e, n]`.\n\n### `xyz(bbox, zoom, tms_style, srs)`\n\nConvert bbox to xyz bounds\n\n* `bbox` {Number} bbox in the form `[w, s, e, n]`.\n* `zoom` {Number} zoom.\n* `tms_style` {Boolean} whether to compute using tms-style. (optional, default false)\n* `srs` {String} projection of input bbox (WGS84|900913). (optional, default WGS84)\n\nReturns {Object} XYZ bounds containing minX, maxX, minY, maxY properties.\n\n### `convert(bbox, to)`\n\nConvert bbox from 900913 to WGS84 or vice versa\n\n* `bbox` {Number} bbox in the form `[w, s, e, n]`.\n* `to` {String} projection of resulting bbox (WGS84|900913). (optional, default WGS84)\n\nReturns bbox array of values in form `[w, s, e, n]`.\n\n### `forward(ll)`\n\nConvert lon, lat values to mercator x, y\n\n### `inverse(xy)`\n\nConvert mercator x, y values to lon, lat\n\n## See Also\n\n* [mercantile](https://github.com/sgillies/mercantile) provides similar utilities for projection and tile math in Python\n","publish_time":1443207598627,"_cnpm_publish_time":1443207598627,"dist-tags":{"latest":"1.0.5"}}