Nemo Library  introduction and purpose
The natural domain of all geographical data is isometric, finite and
boundless spheroidal surface of the planet Earth. This is why it is frequently
both easier and more useful to build a digital globe, then it is to build a
digital map:
The traditional method of geographic coordinate numerical recording
consists of angular φ and λ (latitude and longitude, respectively).
This coordinate form is illsuited for processing on a digital computer.
Specifically, the implementer of any application that handles large volumes
of wide area geographic data must find a solution to three fundamental
software engineering problems:

Geographic coordinates, φ and λ, are numerical representations of
location on a surface on an ellipsoid of rotation. Formulae that describe
its surface geometry relationships are typically derived from differential
equations by their polynomial expansion. These tend to be very costly to
evaluate on a computer.

Geographic coordinates on spheroidal (i.e., a "spherelike" body  whether
an ellipsoid or a sphere) surface are traditionally recorded as angular
values. Numerical operations on angles require frequent evaluation of
trigonometric functions (sine, cosine...), also a costly operation when
compared to four algebraic operations (addition, subtraction, multiplication
and division).

If either angular (2 elements) or vector (3 elements) coordinates of a point
on the spheroidal surface are recorded as an 8byte "floating point" number
each, the volume of coordinate data can become quite high, yet the granularity
of location recorded in such manner exceeds by orders of magnitude the spatial
resolution of any common geographical data, as well as the precision
requirements of any application. In addition, such artificially high
resolution forces the developer to burden the application with some form
of "epsilon control mechanism", i.e., a test that determines when two points
are coincident despite the fact their numerical coordinates are not identical.
Nemo Library is a collection of open source Clanguage functions, that
provides a path to the solution of those problems. It may work effectively
for a large number of wide area or global geographical applications that are
built using the following design strategy:

Spatial relationships are initially evaluated on an ellipsoidspecific
nearconformal sphere, and the refinement that brings the solution to
ellipsoid geometry precision level can be performed only when and if
necessary.

Once data is ingested from conventional geographic coordinates (ellipsoid
φ and λ), it is transformed to a nearconformal spherical domain, and
internally recorded not as two angles, but as three direction cosines.
This restricts the evaluation of trigonometric functions to only those
segments of the application code that exchanges data with humans or other
systems that insist on angular φ and λ coordinates.

Highvolume coordinate data is transformed into a concise vector ("concise
direction cosine", CDC) form, which encodes a position on the spheroidal
surface as an 8byte integer. The resolution of this planetwide CDC integer
"grid", on the surface of a spheroid the size of Earth is 21 mm maximum, and
6 mm average. Since the point coordinates are encoded as integers, in many
application contexts points can be simply considered coincident when their
CDC coordinates are equal.
The approach to geographic data representation outlined above provides
a sound foundation for construction of complex, multipoint data objects
(point sets, lines, surface areas) and of their applicationspecific
spatial sorting and searching.
This webpage is only a brief outline; there is a
[Library Reference Manual]
and a discussion of the above mentioned
[Nemo Library Coordinate Systems]; both documents are included
in the distribution and are viewable online. Abundant comments accompany
the C language Library source code.
The use of the Nemo Library is governed by a
[BSDstyle license],
the text of which is included in the distribution archive.
The library is distributed as a .tar archive. There is no "version control"
other than a 6digit (YYMMDD) publication date numeric string included in the
distribution file name.
Download the Library archive (605 kB):
[nemoLibrary230304.tar.gz].
Contact the author: [Hrvoje Lukatela]