{"id":13425755,"url":"https://github.com/google/open-location-code","last_synced_at":"2025-05-14T11:04:51.715Z","repository":{"id":21333310,"uuid":"24650146","full_name":"google/open-location-code","owner":"google","description":"Open Location Code is a library to generate short codes, called \"plus codes\", that can be used as digital addresses where street addresses don't exist.","archived":false,"fork":false,"pushed_at":"2025-05-02T14:45:10.000Z","size":4740,"stargazers_count":4192,"open_issues_count":43,"forks_count":496,"subscribers_count":186,"default_branch":"main","last_synced_at":"2025-05-07T10:52:32.780Z","etag":null,"topics":["c","cplusplus","dart","geo","golang","gps","java","javascript","latitude","longitude","openlocationcode","pluscode","python","ruby","rust","street-address"],"latest_commit_sha":null,"homepage":"https://plus.codes","language":"Java","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/google.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2014-09-30T18:26:35.000Z","updated_at":"2025-05-07T10:14:21.000Z","dependencies_parsed_at":"2023-10-05T00:03:06.338Z","dependency_job_id":"23c553bb-f34a-4ee2-a051-b5bd729ba5c1","html_url":"https://github.com/google/open-location-code","commit_stats":{"total_commits":553,"total_committers":69,"mean_commits":8.014492753623188,"dds":"0.44484629294755873","last_synced_commit":"bf601ad90a4528a4b518ec185d94147357c0481e"},"previous_names":[],"tags_count":6,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/google%2Fopen-location-code","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/google%2Fopen-location-code/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/google%2Fopen-location-code/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/google%2Fopen-location-code/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/google","download_url":"https://codeload.github.com/google/open-location-code/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":254129474,"owners_count":22019628,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["c","cplusplus","dart","geo","golang","gps","java","javascript","latitude","longitude","openlocationcode","pluscode","python","ruby","rust","street-address"],"created_at":"2024-07-31T00:01:18.131Z","updated_at":"2025-05-14T11:04:51.642Z","avatar_url":"https://github.com/google.png","language":"Java","readme":"Open Location Code\n==================\n\n[![Build Status](https://github.com/google/open-location-code/actions/workflows/main.yml/badge.svg?branch=main)](https://github.com/google/open-location-code/actions/workflows/main.yml?query=branch%3Amain)\n[![CDNJS](https://img.shields.io/cdnjs/v/openlocationcode.svg)](https://cdnjs.com/libraries/openlocationcode)\n\nOpen Location Code is a technology that gives a way of encoding location into a form that is\neasier to use than latitude and longitude. The codes generated are called Plus Codes, as their\ndistinguishing attribute is that they include a \"+\" character.\n\nThe technology is designed to produce codes that can be used as a replacement for street addresses, especially\nin places where buildings aren't numbered or streets aren't named.\n\nPlus Codes represent an area, not a point. As digits are added\nto a code, the area shrinks, so a long code is more precise 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 this (full) code can be converted back to a location completely offline, without any data tables to lookup or online services required.\n\nCodes can be shortened for easier communication, in which case they can be used regionally or in combination with a reference location that all users of this short code need to be aware of. If the reference location is given in form of a location name, use of a geocoding service might be necessary to recover the original location.\n\nAlgorithms to\n* encode and decode full codes,\n* shorten them relative to a reference location, and\n* recover a location from a short code and a reference location given as latitude/longitude pair\n\nare publicly available and can be used without restriction. Geocoding services are not a part of the Open Location Code technology.\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](Documentation/Reference/comparison.adoc)\n * [Open Location Code definition](Documentation/Specification/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 2°S 36°E to 1°S 37°E. PR6C+24 is a 14\nby 14 meter wide area within 6GCR.\n\nA \"+\" character is used after eight digits, to break the code up into two parts\nand to distinguish codes from postal codes.\n\nThere will be locations where a 10-digit code is not sufficiently precise, but\nrefining it by a factor of 20 is i) unnecessarily precise and ii) 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\nGuidelines for shortening codes are in the [wiki](Documentation/Specification/Short_Code_Guidance.md).\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\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","funding_links":[],"categories":["Java","Package (computing)","Tools","golang","Miscellaneous"],"sub_categories":["Older resources"],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgoogle%2Fopen-location-code","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fgoogle%2Fopen-location-code","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgoogle%2Fopen-location-code/lists"}