{"_id":"geo-distance","_rev":"12-a8b431dc2abc0309209dbd2896c2cfa0","name":"geo-distance","description":"A common JS module for calculating and converting Earth distances using correct great-circle distance formula.","dist-tags":{"latest":"0.2.0"},"versions":{"0.1.0":{"name":"geo-distance","version":"0.1.0","description":"Common JS module for calculating and converting Earth distances using correct great-circle distance formula.","author":{"name":"Bjarke Walling","email":"bwp@bwp.dk"},"repository":{"type":"git","url":"git://github.com/walling/geo-distance.git"},"main":"./lib/geo-distance.js","engines":{"node":">= 0.4.0"},"_npmJsonOpts":{"file":"/home/bjarke/.npm/geo-distance/0.1.0/package/package.json","wscript":false,"contributors":false,"serverjs":false},"_id":"geo-distance@0.1.0","dependencies":{},"devDependencies":{},"_engineSupported":true,"_npmVersion":"1.0.13","_nodeVersion":"v0.4.8","_defaultsLoaded":true,"dist":{"shasum":"1940d0ea90c518431fcad65f9172eed5cc05891c","tarball":"https://registry.npmjs.org/geo-distance/-/geo-distance-0.1.0.tgz","integrity":"sha512-HGvd9livURhhlzLfAljHXiYOpNBl5pNIYBWvvROYaKXm4b+oSsKpWB/6ueDfUFVD0/J1r29+MWIDMtILnbO8vw==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIAlln3FpnNuZHZh2TS/SIMdm72vBb0/jlHVFB6kRxfYWAiBFkSU0SUNzAQOpi6gv0G77ClVr/rTJffE5KrqtigYbfg=="}]},"scripts":{},"directories":{}},"0.1.1":{"name":"geo-distance","version":"0.1.1","description":"Common JS module for calculating and converting Earth distances using correct great-circle distance formula.","author":{"name":"Bjarke Walling","email":"bwp@bwp.dk"},"repository":{"type":"git","url":"git://github.com/walling/geo-distance.git"},"main":"./lib/geo-distance.js","engines":{"node":">= 0.4.0"},"_npmJsonOpts":{"file":"/home/bjarke/.npm/geo-distance/0.1.1/package/package.json","wscript":false,"contributors":false,"serverjs":false},"_id":"geo-distance@0.1.1","dependencies":{},"devDependencies":{},"_engineSupported":true,"_npmVersion":"1.0.13","_nodeVersion":"v0.4.8","_defaultsLoaded":true,"dist":{"shasum":"6b048160f7d52febb4d5cc9ffdeecc1502434e78","tarball":"https://registry.npmjs.org/geo-distance/-/geo-distance-0.1.1.tgz","integrity":"sha512-wyWbvaRgpMMNYvcuGTiQYIfSMvfAoZGzTBL1aoupKCh6fY/0vXhdItXsj2O/A3sWnkWNGunLJfTDesvFoaoxkQ==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQD+zEphBygN8yR3FKOrIe33pjYKgDjG9P7JQs1U9ZFNQAIhAI5rfWtzdPfYwkYCG6mu7BJVEBMXIoWLZ5hMDkVJrjdv"}]},"scripts":{},"directories":{}},"0.1.2":{"name":"geo-distance","version":"0.1.2","description":"Common JS module for calculating and converting Earth distances using correct great-circle distance formula.","author":{"name":"Bjarke Walling","email":"bwp@bwp.dk"},"repository":{"type":"git","url":"git://github.com/walling/geo-distance.git"},"main":"./lib/geo-distance.js","engines":{"node":">= 0.4.0"},"_npmJsonOpts":{"file":"/home/bjarke/.npm/geo-distance/0.1.2/package/package.json","wscript":false,"contributors":false,"serverjs":false},"_id":"geo-distance@0.1.2","dependencies":{},"devDependencies":{},"_engineSupported":true,"_npmVersion":"1.0.13","_nodeVersion":"v0.4.8","_defaultsLoaded":true,"dist":{"shasum":"578fe83438d594fffa7f4cfb95afbc390af20c4b","tarball":"https://registry.npmjs.org/geo-distance/-/geo-distance-0.1.2.tgz","integrity":"sha512-u7GPth+xRKslZFxllrOUrq4D3pA1eN8d2/Jp+BRgpjMzSsSpJ54Jyz2dDf4T3taE6ogM+qf/uo0mCk8uA2Kapw==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDuZSAEFY/DSnUij+cux6gSyaIHRGr8hL/PJtMcRN6hYgIgCRlwod9uHs8MxRrDui+WooeM1iwm6ChyUt5w8QqQBkE="}]},"scripts":{},"directories":{}},"0.2.0":{"name":"geo-distance","version":"0.2.0","description":"A common JS module for calculating and converting Earth distances using correct great-circle distance formula.","author":{"name":"Bjarke Walling","email":"bwp@bwp.dk"},"repository":{"type":"git","url":"git+ssh://git@github.com/walling/geo-distance.git"},"main":"./lib/geo-distance.js","engines":{"node":">= 0.4.0"},"gitHead":"6ef53560237e7f18c09db6286049e94fe0b455d7","bugs":{"url":"https://github.com/walling/geo-distance/issues"},"homepage":"https://github.com/walling/geo-distance#readme","_id":"geo-distance@0.2.0","_npmVersion":"5.6.0","_nodeVersion":"9.8.0","_npmUser":{"name":"walling","email":"bwp@bwp.dk"},"dist":{"integrity":"sha512-FAWcCG6vhrfHIXMBipeNj1p6U4NucdlOMoTYrgRtFdudZEQjjrCDTYaw2Nh5go9MhjhY/RcZ+GVlAOa/dLDiVQ==","shasum":"687bfa32ebb95a51438d219592388d74776b4418","tarball":"https://registry.npmjs.org/geo-distance/-/geo-distance-0.2.0.tgz","fileCount":11,"unpackedSize":70952,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJbWMpQCRA9TVsSAnZWagAAvqYP/1LAN+oKs+ECgH6N5rEa\nFE3ZI6xSW0pjDeN/8Jd6TffmluloDoy8i8rUlxHzMJU2c80+e7yc/LGNel7/\ndeSALKS47vgExPUOQ9W1p0wA+9kegIzoCllBitm5kmAhpuQCRa/hPF7CGizM\n+79ulhwGHvDGv92mBr41dkeJIVmhNIAob6T4Lja5OO6+z6N0i5KwarSj5DIJ\nU1trpxFxi1fL6YyCTJNk4VOvrR5ac+ASIo89UypC8ksHu3H7TEY2D4UpZDo7\nwdPsEjGneEoFcxFQuzEPQtkm7bokZ5mIqLUm3t0EHUDd5mEWjeaKFSJ0pMMD\nIFHz57UXUuLjJl78+9h4o6w47ABo/aAuo7a690mA5I+QojtgBoVMI/NNQ6vS\nVHXTfsitf39equMG0NATHwrWUBLcViahhoT3b4Z19rr/HOV0WpftkUSFKxwz\nei9py12BGridPB4cN2umpvwSK6fHsLGYrF7eL8z3SxOlGwPg7epiU1Q8hTdG\nXQbQmIjbzNnxeHQTSzyMQHkkqB6oVPqDdiIKqSpEaMPob+ajGnzFmoafl1gt\nKPlD8p4UOdqw+cWycbAsreOjuMpNWdj2pRlTrMCSzT+Dxp0bZUgVBvuSYXJ2\nF8WCKqMUbQJL9mCK34cSC5dU8SjAPLJsaV3iMc9JMHO2UtxF7Vnb7lg116i+\nSEe5\r\n=CVaU\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIB+VSRZTZHR+vvzYRNDnyAkQEOyF2TF7DOJf7kdIYmeDAiAuGxwE+8++04YnDKhrVqUiWsQ6EaUa/c5N2qiDp4b+vg=="}]},"maintainers":[{"name":"walling","email":"bwp@bwp.dk"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/geo-distance_0.2.0_1532545615970_0.5811097888135879"},"_hasShrinkwrap":false}},"maintainers":[{"name":"walling","email":"bwp@bwp.dk"}],"time":{"modified":"2022-06-18T07:33:10.407Z","created":"2011-07-01T12:51:55.551Z","0.1.0":"2011-07-01T12:51:56.120Z","0.1.1":"2011-07-01T14:58:27.824Z","0.1.2":"2011-07-01T15:15:10.356Z","0.2.0":"2018-07-25T19:06:56.105Z"},"author":{"name":"Bjarke Walling","email":"bwp@bwp.dk"},"repository":{"type":"git","url":"git+ssh://git@github.com/walling/geo-distance.git"},"users":{"alcovegan":true},"homepage":"https://github.com/walling/geo-distance#readme","bugs":{"url":"https://github.com/walling/geo-distance/issues"},"readme":"\nCommon JS module for calculating and converting Earth distances using correct\n[great-circle distance formula](http://en.wikipedia.org/wiki/Great-circle_distance).\n\n\nInstallation\n------------\n\n    npm install geo-distance\n\n\nNotice\n------\n\nThe lat/lon coordinates were flipped until v0.1.2. This is fixed in v0.2.0. Please be aware, when updating. [Discussion here](https://github.com/walling/geo-distance/issues/2).\n\n\nUsage example\n-------------\n\nFor JavaScripters:\n\n    var Distance = require('geo-distance');\n\n    console.log('' + Distance('50 km').human_readable('customary'));\n\n\t// https://www.latlong.net/place/oslo-norway-14195.html: Oslo, Norway, Latitude and longitude coordinates are: 59.911491, 10.757933\n    var Oslo = {\n      lat: 59.914,\n      lon: 10.752\n    };\n    var Berlin = {\n      lat: 52.523,\n      lon: 13.412\n    };\n    var OsloToBerlin = Distance.between(Oslo, Berlin);\n\n    console.log('' + OsloToBerlin.human_readable());\n    if (OsloToBerlin > Distance('800 km')) {\n      console.log('Nice journey!');\n    }\n\nFor CoffeeScripters:\n\n    Distance = require 'geo-distance'\n\n    console.log \"#{ Distance('50 km').human_readable 'customary' }\"\n\n    Oslo =\n      lat: 59.914\n      lon: 10.752\n    Berlin =\n      lat: 52.523\n      lon: 13.412\n    OsloToBerlin = Distance.between Oslo, Berlin\n\n    console.log \"#{ OsloToBerlin.human_readable() }\"\n    console.log 'Nice journey!' if OsloToBerlin > Distance '800 km'\n\n\nOther modules\n-------------\n\nIf you want to work with GeoJSON or maybe just want to calculate distance as a number (fx. kilometers or miles), it is possible to use the [@turf/distance](https://www.npmjs.com/package/@turf/distance) npm module.\n\n\nLicense\n-------\n\nThe image `example/earth.jpg` is a rescaled version of a NASA image in the\npublic domain. All other files are released under the MIT license:\n\n    Copyright (c) 2011 Bjarke Walling <bwp@bwp.dk>\n    \n    Permission is hereby granted, free of charge, to any person obtaining a copy\n    of this software and associated documentation files (the \"Software\"), to\n    deal in the Software without restriction, including without limitation the\n    rights to use, copy, modify, merge, publish, distribute, sublicense, and/or\n    sell copies of the Software, and to permit persons to whom the Software is\n    furnished to do so, subject to the following conditions:\n    \n    The above copyright notice and this permission notice shall be included in\n    all copies or substantial portions of the Software.\n    \n    THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n    IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n    FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n    AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n    LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING\n    FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS\n    IN THE SOFTWARE.\n\n","readmeFilename":"README.md"}