{"name":"proj4","version":"2.7.1-alpha","description":"Proj4js is a JavaScript library to transform point coordinates from one coordinate system to another, including datum transformations.","main":"dist/proj4-src.js","module":"lib/index.js","directories":{"test":"test","doc":"docs"},"scripts":{"prepare":"grunt","build":"grunt","build:tmerc":"grunt build:tmerc","test":"npm run build && istanbul test node_modules/mocha/bin/_mocha test/test.js"},"repository":{"type":"git","url":"git://github.com/proj4js/proj4js.git"},"author":"","license":"MIT","devDependencies":{"chai":"~4.1.2","curl-amd":"github:cujojs/curl","grunt":"^1.0.1","grunt-cli":"~1.2.0","grunt-contrib-connect":"~1.0.2","grunt-contrib-jshint":"~1.1.0","grunt-contrib-uglify":"~3.1.0","grunt-mocha-phantomjs":"~4.0.0","grunt-rollup":"^6.0.0","istanbul":"~0.4.5","mocha":"~4.0.0","rollup":"^0.50.0","rollup-plugin-json":"^2.3.0","rollup-plugin-node-resolve":"^3.0.0","rollup-plugin-replace":"^2.0.0","tin":"~0.5.0"},"dependencies":{"mgrs":"1.0.0","wkt-parser":"^1.2.4"},"contributors":[{"name":"Mike Adair","email":"madair@dmsolutions.ca"},{"name":"Richard Greenwood","email":"rich@greenwoodmap.com"},{"name":"Calvin Metcalf","email":"calvin.metcalf@gmail.com"},{"name":"Richard Marsden","url":"http://www.winwaed.com"},{"name":"T. Mittan"},{"name":"D. Steinwand"},{"name":"S. Nelson"}],"gitHead":"6eb1bcd2241dd3d1f11f8c495f9cad997ff8c536","bugs":{"url":"https://github.com/proj4js/proj4js/issues"},"homepage":"https://github.com/proj4js/proj4js#readme","_id":"proj4@2.7.1-alpha","_nodeVersion":"15.3.0","_npmVersion":"7.6.0","dist":{"integrity":"sha512-3m51tC5yuw6AXE8xIsomOvXtIHYihCqpe8wvSfrmEAk+CA8oWzWx796sB7rHCDWRSMnsccYFyPzeupqCg79sZw==","shasum":"80e92c09c7a88ffa21271ddede294718bb175c4b","tarball":"http://registry-npm.ywwl.com/proj4/download/proj4-2.7.1-alpha.tgz","fileCount":117,"unpackedSize":824598,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgP/6oCRA9TVsSAnZWagAApX4P/3KXZ7LRPH/pxQMlwsEP\nMWmFyxWIBQZyP24saNu9P7Y8xQ/LlenEXFNMt5nJ6NMFAfbSAWfsF8cDCntq\nWVsLTwhcK2Ct/THAm7K9VMRQ0c4soTUybKqPJ723BOL2Q+ur4kKizdWBk3pn\nlwmBmVZPfwKNrqzMTdFgJDy+DKxwVAaWriliiGiTC2t0BYl7LQDcEheoSpul\nHkaF58lWVAlyKy1KEd9TuHixkjk5JakxaV9h9SLqRRZPqVLBhe9rN3vhfzRJ\nrAbc3A/Pw/B1wrmKSlVEohLR3znFANj3/xw5I21B9ryn9tiuPA0ZPbQKtb2K\nLclzI8MScipEyFSxwfbVX4LX1UAf1UIrmOdi5Fhp5gnpeOUE9+7sbG8P5Lux\n50lSXRirJYwcwTtMSrceJLBWJshEmR264yxS0+MLAhtHhGBhsrG7Z1Q9Xiix\njukJrXxzXrFON3KahxShvk0/FNLbx2yNGY3tmmcjia7kDyThEODvi9g2adqK\nh+gm+br474ctuI+jDMZ/kt1OMAZF6aA9SJChMnkKrXIAPM3xKQ/KfGUkQlbR\nEbk7MB4D6n3XRqtAAFHWG1to8DMrTFhZZ79m0WQeCMZISq/Xv+1bvh8S1zUM\nrDPTnphsBLJkHTnzfA+UnVY2yVnVxqqcT6/UOL4lccgVTJtUBL6pXoGEel8p\nD0Ny\r\n=PDML\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIF2KBP4R/SUY0VEVM8K0+dJDjEjoXo1UVmyvxRFA72ZfAiEAoeSYxnxFmJqXSLwnjZfR/cRTaIaugDIRwDP/HBRquGw="}],"size":289901,"noattachment":false,"key":"/proj4/-/proj4-2.7.1-alpha.tgz"},"_npmUser":{"name":"ahocevar","email":"andreas.hocevar@gmail.com"},"maintainers":[{"name":"ahocevar","email":"andreas.hocevar@gmail.com"},{"name":"cwmma","email":"calvin.metcalf@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/proj4_2.7.1-alpha_1614806695815_0.6205165458590869"},"_hasShrinkwrap":false,"readme":"# PROJ4JS [![Build Status](https://api.travis-ci.org/proj4js/proj4js.svg?branch=master)](https://travis-ci.org/proj4js/proj4js)\n\nProj4js is a JavaScript library to transform point coordinates from one coordinate system to another, including datum transformations.\nOriginally a port of [PROJ](https://proj.org/) ([then known as PROJ.4](https://proj.org/faq.html#what-happened-to-proj-4)) and GCTCP C ([Archive](https://web.archive.org/web/20130523091752/http://edcftp.cr.usgs.gov/pub/software/gctpc/)) it is\na part of the [MetaCRS](https://trac.osgeo.org/metacrs/wiki) group of projects.\n\n## Installing\n\nDepending on your preferences\n\n```bash\nnpm install proj4\nbower install proj4\ncomponent install proj4js/proj4js\n```\n\nor just manually grab the file `proj4.js` from the [latest release](https://github.com/proj4js/proj4js/releases)'s `dist/` folder.\n\nIf you do not want to download anything, Proj4js is also hosted on [cdnjs](https://www.cdnjs.com/libraries/proj4js) for direct use in your browser applications.\n\n## Using\n\nThe basic signature is:\n\n```javascript\nproj4([fromProjection, ]toProjection[, coordinates])\n```\n\nProjections can be proj or wkt strings.\n\nCoordinates may be an object of the form `{x:x,y:y}` or an array of the form `[x,y]`.\n\nWhen all 3 arguments  are given, the result is that the coordinates are transformed from projection1 to projection 2. And returned in the same format that they were given in.\n\n```javascript\nvar firstProjection = 'PROJCS[\"NAD83 / Massachusetts Mainland\",GEOGCS[\"NAD83\",DATUM[\"North_American_Datum_1983\",SPHEROID[\"GRS 1980\",6378137,298.257222101,AUTHORITY[\"EPSG\",\"7019\"]],AUTHORITY[\"EPSG\",\"6269\"]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.01745329251994328,AUTHORITY[\"EPSG\",\"9122\"]],AUTHORITY[\"EPSG\",\"4269\"]],UNIT[\"metre\",1,AUTHORITY[\"EPSG\",\"9001\"]],PROJECTION[\"Lambert_Conformal_Conic_2SP\"],PARAMETER[\"standard_parallel_1\",42.68333333333333],PARAMETER[\"standard_parallel_2\",41.71666666666667],PARAMETER[\"latitude_of_origin\",41],PARAMETER[\"central_meridian\",-71.5],PARAMETER[\"false_easting\",200000],PARAMETER[\"false_northing\",750000],AUTHORITY[\"EPSG\",\"26986\"],AXIS[\"X\",EAST],AXIS[\"Y\",NORTH]]';\nvar secondProjection = \"+proj=gnom +lat_0=90 +lon_0=0 +x_0=6300000 +y_0=6300000 +ellps=WGS84 +datum=WGS84 +units=m +no_defs\";\n//I'm not going to redefine those two in latter examples.\nproj4(firstProjection,secondProjection,[-122.305887, 58.9465872]);\n// [-2690575.447893817, 36622916.8071244564]\n```\n\nThe library can also parse coordinates provided with an elevation and measure, again as an object of the form `{x:x,y:y,z:z,m:m}` or an array of the form `[x,y,z,m]`.\n\n```javascript\nproj4(firstProjection,secondProjection,[-122.305887, 58.9465872,10]);\n// [-2690575.447893817, 36622916.8071244564, 10]\n```\n\nIf only 1 projection is given then it is assumed that it is being projected *from* WGS84 (fromProjection is WGS84).\n\n```javascript\nproj4(firstProjection,[-71,41]);\n// [242075.00535055372, 750123.32090043]\n```\n\nIf no coordinates are given an object with two methods is returned, its methods are `forward` which projects from the first projection to the second and `inverse` which projects from the second to the first.\n\n```javascript\nproj4(firstProjection,secondProjection).forward([-122.305887, 58.9465872]);\n// [-2690575.447893817, 36622916.8071244564]\nproj4(secondProjection,firstProjection).inverse([-122.305887, 58.9465872]);\n// [-2690575.447893817, 36622916.8071244564]\n```\n\nAnd as above if only one projection is given, it's assumed to be coming from wgs84:\n\n```javascript\nproj4(firstProjection).forward([-71,41]);\n// [242075.00535055372, 750123.32090043]\nproj4(firstProjection).inverse([242075.00535055372, 750123.32090043]);\n// [-71, 40.99999999999986]\n```\nNote: The generation of the floating point value `40.99999999999986` in this example represents the fact that some variance in precision is involved in any conversion between one coordinate reference system and another.\n\n## Named Projections\n\nIf you prefer to define a projection as a string and reference it that way, you may use the proj4.defs method which can be called 2 ways, with a name and projection:\n\n```js\nproj4.defs('WGS84', \"+title=WGS 84 (long/lat) +proj=longlat +ellps=WGS84 +datum=WGS84 +units=degrees\");\n```\n\nor with an array\n\n```js\nproj4.defs([\n  [\n    'EPSG:4326',\n    '+title=WGS 84 (long/lat) +proj=longlat +ellps=WGS84 +datum=WGS84 +units=degrees'],\n  [\n    'EPSG:4269',\n    '+title=NAD83 (long/lat) +proj=longlat +a=6378137.0 +b=6356752.31414036 +ellps=GRS80 +datum=NAD83 +units=degrees'\n  ]\n]);\n```\n\nyou can then do\n\n```js\nproj4('EPSG:4326');\n```\n\ninstead of writing out the whole proj definition, by default proj4 has the following projections predefined:\n\n- 'EPSG:4326', which has the following alias\n    - 'WGS84'\n- 'EPSG:4269'\n- 'EPSG:3857', which has the following aliases\n    - 'EPSG:3785'\n    - 'GOOGLE'\n    - 'EPSG:900913'\n    - 'EPSG:102113'\n\nDefined projections can also be accessed through the proj4.defs function (`proj4.defs('EPSG:4326')`).\n\nproj4.defs can also be used to define a named alias:\n\n```javascript\nproj4.defs('urn:x-ogc:def:crs:EPSG:4326', proj4.defs('EPSG:4326'));\n```\n\n## Axis order\n\nBy default, proj4 uses `[x,y]` axis order for projected (cartesian) coordinate systems and `[x=longitude,y=latitude]` for geographic coordinates. To enforce the axis order of the provided proj or wkt string, use the\n```javascript\nproj4(fromProjection, toProjection).forward(coordinate, enforceAxis);\nproj4(fromProjection, toProjection).inverse(coordinate, enforceAxis);\n```\nsignatures with `enforceAxis` set to `true`:\n```javascript\nproj4('+proj=longlat +ellps=WGS84 +datum=WGS84 +units=degrees +axis=neu', firstProjection).forward([41, -71], true);\n// [242075.00535055372, 750123.32090043]\nproj4('+proj=longlat +ellps=WGS84 +datum=WGS84 +units=degrees +axis=neu', firstProjection).inverse([242075.00535055372, 750123.32090043], true);\n//[40.99999999999986, -71]\n//the floating points to answer your question\n```\n\n## Grid Based Datum Adjustments\n\nTo use `+nadgrids=` in a proj definition, first read your NTv2 `.gsb` file (e.g. from https://github.com/OSGeo/proj-datumgrid) into an ArrayBuffer, then pass it to `proj4.nadgrid`. E.g:\n\n```javascript\nconst buffer = fs.readFileSync('ntv2.gsb').buffer\nproj4.nadgrid('key', buffer);\n```\n\nthen use the given key in your definition, e.g. `+nadgrids=@key,null`. See [Grid Based Datum Adjustments](https://proj.org/usage/transformation.html?highlight=nadgrids#grid-based-datum-adjustments).\n\n## TypeScript\n\nTypeScript implementation was added to the [DefinitelyTyped repository](https://github.com/DefinitelyTyped/DefinitelyTyped).\n\n```bash\n$ npm install --save @types/proj4\n```\n\n## Developing\nTo set up build tools make sure you have node and grunt-cli installed and then run `npm install`.\n\nTo do the complete build and browser tests run\n\n```bash\nnode_modules/.bin/grunt\n```\n\nTo run node tests run\n\n```bash\nnpm test\n```\n\nTo run node tests with coverage run\n\n```bash\nnpm test --coverage\n```\n\nTo create a build with only default projections (latlon and Mercator) run\n\n```bash\nnode_modules/.bin/grunt build\n```\n\nTo create a build with only custom projections include a comma separated list of projections codes (the file name in 'lib/projections' without the '.js') after a colon, e.g.\n\n```bash\nnode_modules/.bin/grunt build:tmerc\n#includes transverse Mercator\nnode_modules/.bin/grunt build:lcc\n#includes lambert conformal conic\nnode_modules/.bin/grunt build:omerc,moll\n#includes oblique Mercator and Mollweide\n```\n","publish_time":1614806696013,"_cnpm_publish_time":1614806696013,"dist-tags":{"alpha":"2.20.1-alpha","latest":"2.22.0"}}