This is a lightweight implementation of the Open Location Code (aka
Google Plus-Code) which gives location information to places that may
not have street names or addresses. Like Nepal, for example.
These links give background information about the motivation and the
design of the Open Location Code
Latitude Distance from the Equator
90 N == 90 North Pole
90 S == -90 South Pole
Longitude Distance from Prime Meridian (Greenwich)
180 W == -180
180 E == 180
180º from Greenwich in either direction is "antimeridian"
The OLC is computed from the south pole (latitude -90) and the
antimeridian (longitude -180).
Its computation requires positive values so we add 90 and 180 to the
latitude and longitude, respectively. The resulting values are
expressed in base-20 notation using a character set that is designed
to produce no words.
The Class provides two static methods.
geocode_to_olc() takes a lat,lng pair and returns a Plus Code
olc_to_geocode() takes a full Plus Code and returns the lat,lng pair
A Plus Code generated by the Class provides "roof-top accuracy." It
is possible to get greater accuracy by adding an eleventh character
to the Plus Code, but that is not implemented in this lightweight