{"name":"sphericalmercator","description":"Transformations between the Web Mercator projection and Latitude Longitude coordinates","version":"1.0.2","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":{},"scripts":{"pretest":"npm install mocha","test":"mocha"},"_npmUser":{"name":"springmeyer","email":"dane@dbsgeo.com"},"_id":"sphericalmercator@1.0.2","dependencies":{},"optionalDependencies":{},"engines":{"node":"*"},"_engineSupported":true,"_npmVersion":"1.1.21","_nodeVersion":"v0.6.18","_defaultsLoaded":true,"dist":{"shasum":"ab363d077214b9b253c68cd4070bb8e848b4a24c","tarball":"http://registry-npm.ywwl.com/sphericalmercator/download/sphericalmercator-1.0.2.tgz","integrity":"sha512-Lw2nwEwP+yBoff76PbdBuudAn/BHrZ+wd6pMm1CYC4/JhmsbCFtUUfnbycyruAdfsqSraAytvhyiYDKdlEzSXA==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQD4cktAICsFJxZ8kNDW5RZzeV8TjTKW3wkbX7aIIl5ZDQIhAJLICDLBd8RMrEIpkCibIkD2A+LxkNRNfYtT1UtJ5PBY"}],"size":3830,"noattachment":false,"key":"/sphericalmercator/-/sphericalmercator-1.0.2.tgz"},"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"}],"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":1343757818518,"_cnpm_publish_time":1343757818518,"dist-tags":{"latest":"1.0.5"}}