{"_id":"open-location-code","_rev":"7-330005441cae5928e40e329857504971","name":"open-location-code","description":"Open Location Codes are a way of encoding location into a form that is easier to use than latitude and longitude.  Source for a website to demonstrate Open Location Codes. (https://github.com/google/open-location-code)","dist-tags":{"latest":"1.0.3"},"versions":{"1.0.0":{"name":"open-location-code","version":"1.0.0","description":"Open Location Codes are a way of encoding location into a form that is easier to use than latitude and longitude.  Source for a website to demonstrate Open Location Codes. (https://github.com/google/open-location-code)","main":"openlocationcode.js","scripts":{"test":"echo \"Error: no test specified\" && exit 1"},"keywords":["pluscodes","open location code","google map"],"author":"","license":"Apache-2.0","_id":"open-location-code@1.0.0","_shasum":"fc44cf8d5cc11de5728311c375dd6b0e7c31bb0c","_from":".","_npmVersion":"2.13.4","_nodeVersion":"0.12.7","_npmUser":{"name":"aaronyu","email":"tw.mining@gmail.com"},"dist":{"shasum":"fc44cf8d5cc11de5728311c375dd6b0e7c31bb0c","tarball":"https://registry.npmjs.org/open-location-code/-/open-location-code-1.0.0.tgz","integrity":"sha512-rFU69wdeuH5p5ml8fJTVBeWBFDwS7J6RlYkiooYOxbtpt7qIqWl/86lhoWYMkqGVNngOWss3A2XcKi+vYmrPlA==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCZ89W3rWUcq/T/85cfmFPY9SPA7VKPtSTAqf+4Eb8BHgIgdlc6H5Zbfef6H/Qn65d42GIlSptn+P3DDYG2ESPypsA="}]},"maintainers":[{"name":"aaronyu","email":"tw.mining@gmail.com"}]},"1.0.1":{"name":"open-location-code","version":"1.0.1","description":"Open Location Codes are a way of encoding location into a form that is easier to use than latitude and longitude.  Source for a website to demonstrate Open Location Codes. (https://github.com/google/open-location-code)","main":"openlocationcode.js","scripts":{"test":"echo \"Error: no test specified\" && exit 1"},"keywords":["pluscodes","open location code","google map"],"author":"","license":"Apache-2.0","_id":"open-location-code@1.0.1","_shasum":"f45e4044129585d7b70effa440e2b621d4270ba8","_from":".","_npmVersion":"2.13.4","_nodeVersion":"0.12.7","_npmUser":{"name":"aaronyu","email":"tw.mining@gmail.com"},"dist":{"shasum":"f45e4044129585d7b70effa440e2b621d4270ba8","tarball":"https://registry.npmjs.org/open-location-code/-/open-location-code-1.0.1.tgz","integrity":"sha512-doRr3hRUQhnNR9zrIaxPljHcWfexFeqihsD8pjG7Qofk31Dvl5Vcy1FJBxS0YR6gO7Iko+AOnKydfavmRfshvw==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDiHXqQilrfNe8/qDESlGgUUi5nG1KhMlwgEBpfkVfn1QIhALl+iv+6sef+atSz9tXLGh4R/tnq624NnObCSN1SRE0h"}]},"maintainers":[{"name":"aaronyu","email":"tw.mining@gmail.com"}]},"1.0.2":{"name":"open-location-code","version":"1.0.2","description":"Open Location Codes are a way of encoding location into a form that is easier to use than latitude and longitude.  Source for a website to demonstrate Open Location Codes. (https://github.com/google/open-location-code)","main":"openlocationcode.js","scripts":{"test":"echo \"Error: no test specified\" && exit 1"},"keywords":["pluscodes","open location code","google map"],"author":"","license":"Apache-2.0","_id":"open-location-code@1.0.2","_shasum":"77df27e589df145c1f124d5bbdfe7eaba94978e9","_from":".","_npmVersion":"2.13.4","_nodeVersion":"0.12.7","_npmUser":{"name":"aaronyu","email":"tw.mining@gmail.com"},"dist":{"shasum":"77df27e589df145c1f124d5bbdfe7eaba94978e9","tarball":"https://registry.npmjs.org/open-location-code/-/open-location-code-1.0.2.tgz","integrity":"sha512-entVkB0Aty8yQx04QMbocsUSRriMZUbnPnBsO41NOwVfpOFDa0aoNkjIUzFMVX5IdtCCTbbUX5EMHpRrXCuXlg==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIHhUez0Y3QPAgUScS7/eBsWPxmXq4H0xTlAaqw5yu1PkAiBGs66YxsYgyfmI7wQq+Aas8OPsYYknnNFIQlHZKEcCwg=="}]},"maintainers":[{"name":"aaronyu","email":"tw.mining@gmail.com"}]},"1.0.3":{"name":"open-location-code","version":"1.0.3","description":"Open Location Codes are a way of encoding location into a form that is easier to use than latitude and longitude.  Source for a website to demonstrate Open Location Codes. (https://github.com/google/open-location-code)","main":"openlocationcode.js","scripts":{"test":"echo \"Error: no test specified\" && exit 1"},"keywords":["pluscodes","open location code","google map"],"author":"","license":"Apache-2.0","_id":"open-location-code@1.0.3","_shasum":"5ea1a34ee5221c6cafa04392e1bd906fd7488f7e","_from":".","_npmVersion":"2.13.4","_nodeVersion":"0.12.7","_npmUser":{"name":"aaronyu","email":"tw.mining@gmail.com"},"dist":{"shasum":"5ea1a34ee5221c6cafa04392e1bd906fd7488f7e","tarball":"https://registry.npmjs.org/open-location-code/-/open-location-code-1.0.3.tgz","integrity":"sha512-DBm14BSn40Ee241n80zIFXIT6+y8Tb0I+jTdosLJ8Sidvr2qONvymwqymVbHV2nS+1gkDZ5eTNpnOIVV0Kn2fw==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCuZjwQhcmtwcjQBoFhSShMWduIVs0vWdIuMi7BaJ+XDQIhAPPalRe6wHz3dVmL9O/coa+L17/rBxJ13w9HpSP0FYgf"}]},"maintainers":[{"name":"aaronyu","email":"tw.mining@gmail.com"}]}},"readme":"Open Location Code\n==================\n\nOpen Location Codes are a way of encoding location into a form that is\neasier to use than latitude and longitude.\n\nThey are designed to be used as a replacement for street addresses, especially\nin places where buildings aren't numbered or streets aren't named.\n\nOpen Location Codes represent an area, not a point. As digits are added\nto a code, the area shrinks, so a long code is more accurate than a short\ncode.\n\nCodes that are similar are located closer together than codes that are\ndifferent.\n\nA location can be converted into a code, and a code can be converted back\nto a location completely offline.\n\nThere are no data tables to lookup or online services required. The\nalgorithm is publicly available and can be used without restriction.\n\nLinks\n-----\n * [Demonstration site](http://plus.codes/)\n * [Mailing list](https://groups.google.com/forum/#!forum/open-location-code)\n * [Comparison of existing location encoding systems](https://github.com/google/open-location-code/blob/master/docs/comparison.adoc)\n * [Open Location Code definition](https://github.com/google/open-location-code/blob/master/docs/olc_definition.adoc)\n\nDescription\n-----------\n\nCodes are made up of a sequence of digits chosen from a set of 20. The\ndigits in the code alternate between latitude and longitude. The first\nfour digits describe a one degree latitude by one degree longitude\narea, aligned on degrees. Adding two further digits to the code,\nreduces the area to 1/20th of a degree by 1/20th of a degree within the\nprevious area. And so on - each pair of digits reduces the area to\n1/400th of the previous area.\n\nAs an example, the Parliament Buildings in Nairobi, Kenya are located at\n6GCRPR6C+24. 6GCR is the area from 2S 36E to 1S 37E. PR6C+24 is a 14 meter\nwide by 14 meter high area within 6GCR.\n\nA \"+\" character is used after eight digits, to break the code up into two parts\nand to distinguish shortened Open Location Codes from postal codes.\n\nThere will be locations where a 10 digit code is not sufficiently accurate, but\nrefining it by a factor of 20 is unnecessarily precise and requires extending\nthe code by two digits. Instead, after 10 digits, the area is divided\ninto a 4x5 grid and a single digit used to identify the grid square. A single\ngrid refinement step reduces the area to approximately 3.5x2.8 meters.\n\nCodes can be shortened relative to a location. This reduces the number of digits\nthat must be remembered, by using a location to identify an approximate area,\nand then generating the nearest matching code. Shortening a code, if possible,\nwill drop four or more digits from the start of the code. The degree to which a\ncode can be shortened depends on the proximity of the reference location.\n\nIf the reference location is derived from a town or city name, it is dependent\non the accuracy of the geocoding service. Although one service may place\n\"Zurich\" close to the Google office, another may move it by a hundred meters or\nmore, and this could be enough to prevent the original code being recovered.\nRather than a large city size feature to generate the reference location, it is\nbetter to use smaller, neighbourhood features, that will not have as much\nvariation in their geocode results.\n\nRecovering shortened codes works by providing the short code and a reference\nlocation. This does not need to be the same as the location used to shorten the\ncode, but it does need to be nearby. Shortened codes always include the \"+\"\ncharacter so it is simple to compute the missing component.\n\n * 8F+GG is missing six leading characters\n * 6C8F+GG is missing four leading characters\n\nExample Code\n------------\n  \n  var OpenLocationCode = require('open-location-code').OpenLocationCode;\n\tvar openLocationCode = new OpenLocationCode();\n  \n  // Encode a location, default accuracy:\n\tvar code = openLocationCode.encode(47.365590, 8.524997);\n\tconsole.log(code);\n  \n  // Encode a location using one stage of additional refinement:\n  code = openLocationCode.encode(47.365590, 8.524997, 11);\n  console.log(code);\n  \n  //Decode a full code:\n\tvar coord = openLocationCode.decode(code);\n  var msg = 'Center is ' + coord.latitudeCenter + ',' + coord.longitudeCenter;\n\tconsole.log(msg);\n   \n  // Attempt to trim the first characters from a code:\n\tvar shortCode = openLocationCode.shorten('8FVC9G8F+6X', 47.5, 8.5);\n\tconsole.log(shortCode);\n\n  // Recover the full code from a short code:\n  var nearestCode = openLocationCode.recoverNearest('9G8F+6X', 47.4, 8.6);\n\tconsole.log(nearestCode);\n  nearestCode = openLocationCode.recoverNearest('8F+6X', 47.4, 8.6);\n  console.log(nearestCode);\n\nThe subdirectories contain sample implementations and tests for different\nlanguages. Each implementation provides the following functions:\n\n * Test a code to see if it is a valid sequence\n * Test a code to see if it is a valid full code\n   Not all valid sequences are valid full codes\n * Encode a latitude and longitude to a standard accuracy\n   (14 meter by 14 meter) code\n * Encode a latitude and longitude to a code of any length\n * Decode a code to its coordinates: low, high and center\n * Shorten a full code relative to a location\n * Extend a short code relative to a location\n \n ","maintainers":[{"name":"aaronyu","email":"tw.mining@gmail.com"}],"time":{"modified":"2022-06-22T23:17:24.795Z","created":"2015-08-19T07:46:57.897Z","1.0.0":"2015-08-19T07:46:57.897Z","1.0.1":"2015-08-19T07:52:10.289Z","1.0.2":"2015-08-20T00:09:21.207Z","1.0.3":"2015-08-20T00:15:20.359Z"},"keywords":["pluscodes","open location code","google map"],"license":"Apache-2.0","readmeFilename":"README.md","users":{"goliatone":true}}