ランキングに戻る

google/open-location-code

Javaplus.codes

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.

geogpsccplusplusdartgolangjavascriptjavapythonrubyrustopenlocationcode
スター成長
スター
4.3k
フォーク
530
週間成長
Issue
39
2k4k
2014年10月2018年9月2022年8月2026年7月
成果物Mavengit clone https://github.com/google/open-location-code.git
README

Open Location Code

Build Status CDNJS

Open Location Code is a technology that gives a way of encoding location into a form that is easier to use than latitude and longitude. The codes generated are called Plus Codes, as their distinguishing attribute is that they include a "+" character.

The technology is designed to produce codes that can be used as a replacement for street addresses, especially in places where buildings aren't numbered or streets aren't named.

Plus Codes represent an area, not a point. As digits are added to a code, the area shrinks, so a long code is more precise than a short code.

Codes that are similar are located closer together than codes that are different.

A 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.

Codes 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.

Algorithms to

  • encode and decode full codes,
  • shorten them relative to a reference location, and
  • recover a location from a short code and a reference location given as latitude/longitude pair

are publicly available and can be used without restriction. Geocoding services are not a part of the Open Location Code technology.

Description

Codes are made up of a sequence of digits chosen from a set of 20. The digits in the code alternate between latitude and longitude. The first four digits describe a one degree latitude by one degree longitude area, aligned on degrees. Adding two further digits to the code, reduces the area to 1/20th of a degree by 1/20th of a degree within the previous area. And so on - each pair of digits reduces the area to 1/400th of the previous area.

As an example, the Parliament Buildings in Nairobi, Kenya are located at 6GCRPR6C+24. 6GCR is the area from 2°S 36°E to 1°S 37°E. PR6C+24 is a 14 by 14 meter wide area within 6GCR.

A "+" character is used after eight digits, to break the code up into two parts and to distinguish codes from postal codes.

There will be locations where a 10-digit code is not sufficiently precise, but refining it by a factor of 20 is i) unnecessarily precise and ii) requires extending the code by two digits. Instead, after 10 digits, the area is divided into a 4x5 grid and a single digit used to identify the grid square. A single grid refinement step reduces the area to approximately 3.5x2.8 meters.

Codes can be shortened relative to a location. This reduces the number of digits that must be remembered, by using a location to identify an approximate area, and then generating the nearest matching code. Shortening a code, if possible, will drop four or more digits from the start of the code. The degree to which a code can be shortened depends on the proximity of the reference location.

If the reference location is derived from a town or city name, it is dependent on the accuracy of the geocoding service. Although one service may place "Zurich" close to the Google office, another may move it by a hundred meters or more, and this could be enough to prevent the original code being recovered. Rather than a large city size feature to generate the reference location, it is better to use smaller, neighbourhood features, that will not have as much variation in their geocode results.

Guidelines for shortening codes are in the wiki.

Recovering shortened codes works by providing the short code and a reference location. This does not need to be the same as the location used to shorten the code, but it does need to be nearby. Shortened codes always include the "+" character so it is simple to compute the missing component.

  • 8F+GG is missing six leading characters
  • 6C8F+GG is missing four leading characters

Example Code

The subdirectories contain sample implementations and tests for different languages. Each implementation provides the following functions:

  • Test a code to see if it is a valid sequence
  • Test a code to see if it is a valid full code (not all valid sequences are valid full codes)
  • Encode a latitude and longitude to a standard accuracy (14 meter by 14 meter) code
  • Encode a latitude and longitude to a code of any length
  • Decode a code to its coordinates: low, high and center
  • Shorten a full code relative to a location
  • Extend a short code relative to a location
関連リポジトリ
tidwall/tile38

Real-time Geospatial and Geofencing

GoGo ModulesMIT Licensegeospatialdatabase
tile38.com
9.7k619
sshuair/awesome-gis

😎Awesome GIS is a collection of geospatial related sources, including cartographic tools, geoanalysis tools, developer tools, data, conference & communities, news, massive open online course, some amazing map sites, and more.

MIT Licensegisawesome
5.4k831
algolia/places

:globe_with_meridians: Turn any <input> into an address autocomplete

JavaScriptnpmMIT Licensealgoliaplaces
community.algolia.com/places/
5.3k223
snooppr/snoop

Snoop — инструмент разведки на основе открытых данных (OSINT world)

PythonPyPIOtherosinttermux
github.com/snooppr/snoop/releases
4k453
nowork-studio/NotFair

Goal-driven, loop-powered marketing agents that crush your business goals 24/7

TypeScriptnpmMIT Licenseclaude-code-pluginclaude-skills
notfair.co
3.2k390
yaojingang/GEOFlow

Open-source GEO content engineering and multi-site distribution system with AI tasks, RAG/semantic chunking, analytics, GEOFlow Agent and WordPress target publishing.

PHPPackagistApache License 2.0aicms
3k696
yaojingang/yao-open-prompts

Yao Open Prompts: A Chinese-language AI prompt library for work, learning, content, marketing, and everyday life.

PythonPyPIOtheraichinese-prompts
yaojingang.github.io/yao-open-prompts/
2.6k431
maplibre/maputnik

An open source visual editor for the 'MapLibre Style Specification'

TypeScriptnpmMIT Licensemapscartography
maplibre.org/maputnik
2.6k464
aaron-he-zhu/aaron-marketing-skills

120 marketing skills + 8 commands for Claude Code & AI agents across 7 disciplines — SEO/GEO, influencer, paid ads, email, product launch, organic social & brand narrative — on one shared contract, with 8 auditor gates: CORE-EEAT · CITE · STAR · ROAS · SEND · RAMP · ECHO · TALE.

PythonPyPIApache License 2.0claude-skillsgeo
skills.sh/aaron-he-zhu/aaron-marketing-skills
2.4k333
geocompx/geocompr

Geocomputation with R: an open source book

ROtherrspatial
r.geocompx.org
1.8k617
Mapsui/Mapsui

Mapsui is a .NET Map component for: MAUI, Avalonia, Uno Platform, Blazor, WPF, WinUI, Windows Forms, Eto Forms, .NET for Android and .NET for iOS

C#MIT Licensemapgis
mapsui.com
1.6k356
GEOSwift/GEOSwift

The Swift Geometry Engine.

SwiftMIT Licensegeojsoncartography
1.5k184