{"id":19789617,"url":"https://github.com/webfreak001/dopenlocationcode","last_synced_at":"2026-03-03T03:42:59.229Z","repository":{"id":146626464,"uuid":"232554104","full_name":"WebFreak001/DOpenLocationCode","owner":"WebFreak001","description":"D port of google's open-location-code (also known as Plus+Codes)","archived":false,"fork":false,"pushed_at":"2020-01-08T13:33:24.000Z","size":14,"stargazers_count":3,"open_issues_count":0,"forks_count":0,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-01-11T04:13:43.100Z","etag":null,"topics":["dlang","geocoding","geolocation","open-location-code","pluscode"],"latest_commit_sha":null,"homepage":null,"language":"D","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/WebFreak001.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"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}},"created_at":"2020-01-08T12:03:43.000Z","updated_at":"2020-01-12T15:58:08.000Z","dependencies_parsed_at":null,"dependency_job_id":"f419ddea-d06e-4622-af6a-804bd7994b7c","html_url":"https://github.com/WebFreak001/DOpenLocationCode","commit_stats":null,"previous_names":[],"tags_count":2,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/WebFreak001%2FDOpenLocationCode","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/WebFreak001%2FDOpenLocationCode/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/WebFreak001%2FDOpenLocationCode/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/WebFreak001%2FDOpenLocationCode/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/WebFreak001","download_url":"https://codeload.github.com/WebFreak001/DOpenLocationCode/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":241126672,"owners_count":19914057,"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":["dlang","geocoding","geolocation","open-location-code","pluscode"],"created_at":"2024-11-12T06:34:04.776Z","updated_at":"2026-03-03T03:42:54.186Z","avatar_url":"https://github.com/WebFreak001.png","language":"D","readme":"# DOpenLocationCode\n\nPort of the [open-location-code](https://github.com/google/open-location-code) library (also known as [plus codes](https://plus.codes)) for identifying geo areas.\n\nThis ports commit [a6eb95b](https://github.com/google/open-location-code/commit/a6eb95b4d2f934e94dae4f092260caf7f3db7967).\n\n## Example\n\nnormal usage:\n\n```d\nimport openlocationcode;\n\ndouble lat = 54;\ndouble lon = 4;\n\n// get geo coordinates from plus code string\nOpenLocationCode plusCode = OpenLocationCode.fromString(\"8FVC2222+22GCCCC\");\nwriteln(plusCode.decode());\n// -\u003e OpenLocationCodeArea(47.0001, 8.00006, 47.0001, 8.00006, 15)\n\n// get plus code string from geo coordinates\nOpenLocationCode generatedPlusCode = OpenLocationCode.encode(lat, lon);\nwriteln(generatedPlusCode.code);\n// -\u003e 9F662222+22\n```\n\n---\n\n`nothrow @nogc` usage:\n\n```d\nimport openlocationcode;\n\ndouble lat = 54;\ndouble lon = 4;\n\n// get geo coordinates from plus code string\nstring input = \"8FVC2222+22GCCCC\";\n// make sure to only use uppercase characters in your input!\nif (!input.isValidUppercaseCode)\n\treturn error;\nOpenLocationCode plusCode = OpenLocationCode.fromTrustedString(input);\n\nif (!plusCode.isFull)\n\treturn error;\nOpenLocationCodeArea area = plusCode.decodeTrustedFull();\nprintf(\"area around %f, %f\\n\", area.centerLatitude, area.centerLongitude);\n// -\u003e area around 47.000062, 8.000063\n\n// get plus code string from geo coordinates\nubyte[maxOLCLength] buffer;\nscope ubyte[] generatedPlusCodeString = OpenLocationCode.encode(buffer, lat, lon);\nprintf(\"%.*s\\n\", generatedPlusCodeString.length, \u0026generatedPlusCodeString[0]);\n// -\u003e 9F662222+22\n```","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fwebfreak001%2Fdopenlocationcode","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fwebfreak001%2Fdopenlocationcode","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fwebfreak001%2Fdopenlocationcode/lists"}