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 numerical representation of geographic coordinates
consists of angular latitude and longitude (φ and λ, 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 representation 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 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
applications that insist on conventional ellipsoidal φ 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, multi‑point data objects
(point sets, lines, surface areas) and of their application‑specific
spatial sorting and searching.
This web‑page 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 on‑line. Abundant comments and many
illustrations accompany the C language Library source code.
The use of the Nemo Library is governed by a
[BSD‑style license],
the text of which is also included in the distribution archive.
The Library is distributed as a compresed .tar archive. There are no
"library versions" and thus there is no "version control"; there is however
a 4+3‑digit (YYYY.DDD) numeric string Library edition publication date,
which is included in the distribution file name, the reference manual and
the API header (nemo.h) file.
Download the Library 2023.215 release archive (1.5 MB):
[nemoLibrary2023.215.tar.gz]
Library distribution archives are
time‑stamped by
TrueTimeStamp.org. In addition to time‑stamping, this makes possible the
verification of downloaded file using its SHA‑2
fingerprint (bfa3d6c72f6d6b51d4f9aff3229a03c203a4836230c1d965d1c953b267b72feb)
and TrueTimeStamp.org's signing key. (Consult their website and/or
the cerificate for details).
Contact the author: [Hrvoje Lukatela]