All Projects → google → Open Location Code

google / Open Location Code

Licence: apache-2.0
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.

Programming Languages

javascript
184084 projects - #8 most used programming language
java
68154 projects - #9 most used programming language
c
50402 projects - #5 most used programming language
dart
5743 projects
go
31211 projects - #10 most used programming language
C++
36643 projects - #6 most used programming language

Projects that are alternatives of or similar to Open Location Code

beihu-geo
地理位置解析服务,可供爬虫使用!供参考学习!
Stars: ✭ 16 (-99.55%)
Mutual labels:  geo, latitude, longitude
PHPCoord
PHPCoord is a PHP library to aid in handling coordinates. It can convert coordinates for a point from one system to another and also calculate distance between points
Stars: ✭ 78 (-97.81%)
Mutual labels:  geo, latitude, longitude
Atlas
🌎 Atlas is a set of APIs for looking up information about locations
Stars: ✭ 21 (-99.41%)
Mutual labels:  gps, geo
orange3-geo
🍊 🌍 Orange add-on for dealing with geography and geo-location
Stars: ✭ 22 (-99.38%)
Mutual labels:  gps, latitude
Trilateration
Trilateration system using 3 latitude and longitude points, and 3 radius distances in PHP, C#, Java and Javascript
Stars: ✭ 22 (-99.38%)
Mutual labels:  latitude, longitude
Solar-Calculator
Calculates the sunrise and sunset for a given date and location (using GEO coordinates). This library uses the method outlined NOAA Solar Calculations Day spreadsheet found at http://www.esrl.noaa.gov/gmd/grad/solcalc/calcdetails.html.
Stars: ✭ 36 (-98.99%)
Mutual labels:  latitude, longitude
geodesy-php
Geodesy PHP - Port of some known geodesic/math functions for getting distance from a known point A to a known point B given their coordinates. It also supports conversion between units of length, Polar position to Cartesian coordinates, and different Reference Datums.
Stars: ✭ 26 (-99.27%)
Mutual labels:  latitude, longitude
llttz
The easy way to get java TimeZone from latitude/longitude
Stars: ✭ 27 (-99.24%)
Mutual labels:  latitude, longitude
Positional
An elegant and colorful location information app for Android with Compass, Clock, Level, Sun, Moon, Trail Marker and many other features.
Stars: ✭ 72 (-97.98%)
Mutual labels:  latitude, longitude
react-cartographer
Generic component for displaying Yahoo / Google / Bing maps.
Stars: ✭ 82 (-97.7%)
Mutual labels:  latitude, longitude
pikaz-location
定位插件(限中国)
Stars: ✭ 78 (-97.81%)
Mutual labels:  latitude, longitude
geolocation-php-api
This Geolocation PHP class connects to Google Maps API to find latitude/longitude or the address.
Stars: ✭ 71 (-98.01%)
Mutual labels:  latitude, longitude
ctt
ctt postal codes into MySQL with latitude and longitude from google
Stars: ✭ 33 (-99.07%)
Mutual labels:  latitude, longitude
addressr
Free Australian Address Validation, Search and Autocomplete
Stars: ✭ 46 (-98.71%)
Mutual labels:  geo, street-address
php-haversine-formula
Calculates de distance between two geocode points 📌🗺
Stars: ✭ 44 (-98.77%)
Mutual labels:  latitude, longitude
Seeker
Accurately Locate Smartphones using Social Engineering
Stars: ✭ 2,772 (-22.29%)
Mutual labels:  latitude, longitude
haversine-js
JavaScript implementation of the Haversine formula
Stars: ✭ 12 (-99.66%)
Mutual labels:  latitude, longitude
laravel-geoly
Perform fast and efficient radius searches on your Laravel Eloquent models.
Stars: ✭ 25 (-99.3%)
Mutual labels:  latitude, longitude
Vincenty-Excel
Thaddeus Vincenty's Direct and Inverse formulae for geodesic calculations in Excel (distance, azimuth, latitude, longitude).
Stars: ✭ 29 (-99.19%)
Mutual labels:  latitude, longitude
Election Geodata
Precinct shapes (and vote results) for US elections past, present, and future
Stars: ✭ 289 (-91.9%)
Mutual labels:  geo

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 a code can be converted back to a location completely offline.

There are no data tables to lookup or online services required. The algorithm is publicly available and can be used without restriction.

Links

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 2S 36E to 1S 37E. PR6C+24 is a 14 meter wide by 14 meter high 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
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].