Paper

IEEE Conference Paper Format

A method of encoding geographic latitude and longitude into sequence of words

Ujjwal Singh
wolo.codes
Bangalore, India
[email protected]
Download PDF doc v1.2.0

Abstract—Geographic coordinates are long complex set of numbers and symbols that are difficult to communicate e.g. 27.9881 N, 86.9250 E. The solution presented here transforms geo coordinates into a sequence of three words preceded with the name of the locality it belongs to, which is generally a city (e.g. Bangalore cat apple tomato) or a region with an anchor index for rural and global coverage (e.g. Nepal 1112 candle kiwi mango). The size of the dictionary of the words used is only 1024 words. Thereby allowing the most simple words to be chosen that are unambiguous and easy to communicate.

Keywords: Geographic latitude longitude, word encoding

I.Introduction

It is generally difficult to communicate coordinates, and to manually input them into a computer system. On the other hand words are easy – both to communicate and input; and also to remember. Thus transforming the geographic co-ordinates into words, from which the original data can be retrieved – makes it easy to handle. Of the output code – the name of the locality in the beginning (a city name, or a region name followed by a local anchor index) specifies the central reference point and the next three words specify the exact point relative to it. Additionally if the locality is implicit, the three words alone suffice.

II.Theory

Let there be a square grid G of N units.

where,

N = 2L
(1)

and, L is Length in bits available for addressing one axis index of the two axes with any 3 of the 1024 words.

Since,

210 = 1024
(2)
L = 3 × 10 2 = 15
(3)

thus, from (1):

N = 215 = 32,768
(4)

Let there be a city whose boundary is represented by circle S, within which the point P with global co-ordinates (φ, λ) lies. Let the center of grid G coincide with the center C of the circle S, such that the grid encompasses the circle completely.

Grid G with city boundary circle S and point P
Fig. 1. Grid G

A.Process

Following is the procedure flow:

Procedure flowchart: Input coordinates to Word code and reverse
Fig. 2. Procedure

B.Relative position

First we find the relative position of the given point P(φ, λ) on the grid G, as P'(x, y).

Let Δ be the minimum distance in meters we want to resolve.
Δ is thus the distance between two consecutive integral points of the grid on any given axis.

Then the total distance spanned by each side of the grid is:

D = N × Δ
(5)

Let Θ be the angle that spans that total distance D.

Similarly, θ is the angle that spans that distance Δ.

The grid G's origin C' has global co-ordinates:

C'(lat, lng) = &Bigl( Clat − Θ 2 ,   Clng − Θ 2 &Bigr)
(6)

As we address only the integral points on the grid G, let P' be the integral point closest to the given point P on the Grid.
All points within the square range R are rounded off to this same intersecting point P'.
The indices P'x, P'y of P' will be based on the city it belongs to; i.e. the city-center C of the closest city within whose range it falls.

Thus,

P'x = round&Biggl( Plat − C'lat θ &Biggr)
(7)

and

P'y = round&Biggl( Plng − C'lng θ &Biggr)
(8)

These indices must lie within range [0, N)

C.Packing

P'x and P'y are 15 bit numbers.
Thus totally they require 30 bits; and therefor: 3 – base-1024 numbers, to be packed into.
The relative latitude's (P'x) first 10 bits go into the first number of the output code W as W1. The relative longitude's (P'y) first 10 bits go into the second number W2. The remaining 5 bits of the relative latitude go into the first 5 bits of the third number W3 and finally the longitude's last 5 bits go into its last 5 bits.

Bit packing diagram of P_prime and W variables
Fig. 3. Bits of P' and W variables

D.Mapping

A number system is based on the progressive series of weighted symbols.
In wcode we use 1024 symbols.

The 3 10-bit numbers of the output code are mapped to words from a dictionary of 210 = 1024 weighted words.

Table I: WCode Word Table
SerialDecimalBinaryWord
1000000 00000apple
2100000 00001mango
3200000 00010tomato
…………
1024102311111 11111zebra

Only the simplest words that have easy pronunciation and spellings, and are distinct are used.

The three numbers of output code W are mapped to the corresponding words from this table as W1 to W'1 and so on as W'.

E.City and Regional Locality Variants

The output word code W' specifies a point relative to a geographic reference origin. Two locality addressing formats are supported:

1. City Variant

For locations within a registered city boundary, the name of the city precedes the three words of output code W':

<city> <word1> <word2> <word3>

E.g. Bangalore cat apple tomato

2. Region Variant (Global & Rural Coverage)

For locations outside registered cities – in rural, wilderness, maritime, or unmapped global areas – the system provides a named regional anchor reference.

The globe is partitioned into a fixed grid of half-degree anchor tiles (360 rows × 720 columns, each tile spanning 0.5° × 0.5°). Each named geographic region or administrative territory (countries, states, physical features) maintains a deterministic, frozen index of its intersecting global anchor tiles.

<region> <index> <word1> <word2> <word3>

E.g. Nepal 1112 candle kiwi mango  (or India 1112 candle kiwi mango)

Here, the numeric <index> identifies the 1-based local anchor tile within that region's namespace, establishing the local grid origin C'. The subsequent three words specify the exact relative point within that tile at the standard 2 m resolution using the identical 30-bit word encoding algorithm and 1024-word dictionary.

F.Reversal

The above process is reversed to obtain the original co-ordinates of the point P' from the output code W by:

P'lat = C'lat + P'x × θ
(9)

and

P'lng = C'lng + P'y × θ
(10)

G.Total unique addresses

From eq (4) the total addressable points T on the grid G become:

T = N × N = 1,073,741,824
(11)

H.Resolution

Targeting a resolution of 2 m, we set:

Δ = 2 m
(12)

Thus effectively the resolution on either side is only 1 m.
And,

D = 65.534 km
(13)

I.Approximation

Lateral projection of spheroid representing Earth
Fig. 4. Lateral projection of spheroid representing Earth

Since the surface of Earth is not a perfect sphere as it is compressed from top and bottom, it is best represented by a spheroid.
The maths used below assumes this approximation and conforms to World Geodetic System – WGS84 [1].
The values of the axes of the WGS84 ellipsoid is as given below:

Table II: WGS84 Axes Table
Semi-major axis : aSemi-minor axis : b
6 378 137 . 0 m6 356 752 . 314 140 m

Let e be the eccentricity of the ellipsoid, related to its major and minor axes by:

e2 = a2 − b2 a2
(14)

J.Latitude adjustment

The span angle Θ for latitude is independent of longitude but has to be adjusted based on latitude.
Since, the length of a degree of latitude is given by the following equation [2]:

Δ1lat = π · a · (1 − e2) 180° (1 − e2 sin2φ)3/2
(15)

Then the latitude angle θlat spanning distance Δ with a resolution of 2 m, is given by:

θlat = 2 · 1 Δ1lat
(16)

and, the total span angle Θlat becomes:

Θlat = 2 · N Δ1lat
(17)

K.Longitude adjustment

As the lines of longitude converge at the poles, the distance spanned by them changes based on the latitude. It depends only on the radius of a circle of latitude. The length of a degree of longitude is given by the following equation [3]:

Δ1lng = π · a · cos φ 180° √1 − e2 sin2φ
(18)

Then the longitude angle θlng spanning distance Δ with a resolution of 2 m, is given by:

θlng = 2 · 1 Δ1lng
(19)

and, the total span angle Θlng becomes:

Θlng = 2 · N Δ1lng
(20)

III.References

  1. [1] World Geodetic System – 1984 (WGS84) Manual.
    https://gis.icao.int/eganp/webpdf/REF08-Doc9674.pdf
  2. [2] Osborne, Peter (2013). “Chapters 5, 6”. The Mercator Projections. doi:10.5281/zenodo.35392. for LaTeX code and figures.
    https://doi.org/10.5281/zenodo.35392
  3. [3] Rapp, Richard H. (1991). “Chapter 3”. Geometric Geodesy, Part I. Columbus, OH: Dept. of Geodetic Science and Surveying, Ohio State Univ.
    http://hdl.handle.net/1811/24333
Original Paper: A method of encoding geographic latitude and longitude into sequence of words
doc v1.2.0