#

## Manuals

### ll2dst

#### Description

derive a distance matrix for a set of locations given their longitude and latitude coordinates

#### Synopsis

ll2dst [-a float] [-l filename] [-o filename] location-file

#### Options

-a float
  switch to XY modus, using aspect ratio (>= 1.0)
-l filename
  file with numbered labels
-o filename
  output file

#### Purpose

This program calculates the distance matrix of a set of locations, given their coordinates, which must be defined in longitude and latitude (unless the option -a is used). Resulting distances are in kilometres. The results are not entirely accurate due to two assumptions which are neither entirely accurate:

- earth is a perfect sphere;
- earth has a circumference of 40000km.

#### File with locations

The file with locations is a coordinate file with coordinates defined as longitude and latitude.

#### XY modus

With the option -a, the program switches to XY modus. The coordinates are not in longitude and latitude, but are ordinary X and Y coordinates in a rectangular grid. The resulting distances are not in kilometres, but in whatever unit the grid uses.

The value to option -a is the aspect ratio between distances along the X axis and the Y axis. It is a value equal to or greater than 1. Distances along the X axis are reduced by dividing them with this value.

#### File with numbered labels

If the option -l is used to specify a label file, the difference matrix for that set of labels is created.

If no label file is specified, a difference matrix for all locations is created, using the locations in the order they are given in the file with locations.

#### Output file

The output file is a difference matrix file with distances defined in kilometres.