# Coord

This modules aims to be a port of portions of the library
Right now it provides structs to represent locations with points in UTM and
LatLng format, and functions to convert between the two formats.

The module has been tested by comparing the results of converting hundreds of
thousands of points against the reference implementation
[GeoConvert]( The
conversion functions in GeoConvert were initially written by the author of the
paper which introduced the algorithms used by this module and Geodesy to convert
points between latitude/longitude and UTM. Many thanks to the authors of
[PropCheck]( and
[PropEr]( for making this automated testing

## Converting from latitude and longitude to UTM

iex> use Coord
iex>, -1.826412) |> UTM.from()
  datum: %Coord.Datum{
    ellipsoid: %Coord.Datum.Ellipsoid{
      a: 6378137,
      b: 6356752.314245,
      f: 0.0033528106647474805
  e: 582031.9577723305,
  hemi: :n,
  n: 5670369.804561083,
  zone: 30

## Converting from UTM to latitude and longitude

iex> use Coord
iex>, :n, 582031.96, 5670369.80) |> LatLng.from()
  lat: 51.17886095867467,
  lng: -1.8264119691783214

## Datum

The default datum is WGS84, but you can specify a different datum if it can be
represented by a surface defined using the same parameters as WGS84. See `Coord.Datum` and

## Documentation

Published to [](

## Testing
The LatLng -> UTM and UTM -> LatLng conversions in this library are tested
against the reference implementation GeographicLib, which Geodesy is also based
on. This means that to run some of the tests you will need to install the
command line utility
[GeoConvert]( On
Ubuntu you may be able to do this via `apt install geographiclib-tools`. 

## Installation

The package can be installed by adding `coord` to your list of dependencies in

def deps do
    {:coord, "~> 0.1.0"}