# Input data

## Names to coordinates <a href="#names-to-coordinates" id="names-to-coordinates"></a>

Geocoding is the process of [transforming a physical address description to a coordinate](https://en.wikipedia.org/wiki/Geocoding). Every of your input such as postal address, city or postal code is transformed into a latitude and a longitude representing the location on the earth's surface.

### Accuracy <a href="#accuracy" id="accuracy"></a>

Based on your input type there are different level of accuracies. Country, city or regions are represented as a [geographical center](https://en.wikipedia.org/wiki/Geographical_centre) of that area. Postal addresses are often represented as the coordinate of the point of the entry, as roof top coordinates or as street coordinates.

## Sources and Input <a href="#sources-and-input" id="sources-and-input"></a>

The following input data can be used to calculate distances and of course each input type can be combined with any other source, input or type.

### Country, City or Regions <a href="#country-city-or-regions" id="country-city-or-regions"></a>

Due to availability of multiple results for the same input (such as Venice, Italy or Venice, Los Angeles) it is **highly recommended to specify country and region of your input** if available. All country, city or regions data is geocoded with the [geonames.org](http://geonames.org/) database or OpenStreetMap data.

### Postal codes or Zip codes

If you want to calculate distances between postal or zip codes you need to specify  the country code with its [iso-3166-1 alpha-3 code](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-3) and the geographical centroid of the postal code is used. Postal codes are geocoded with the data from [geonames.org](http://geonames.org) database and [OpenStreetMap](https://osm.org).&#x20;

| Origin   | Destination |
| -------- | ----------- |
| Munich   | 10999,DEU   |
| 2000,AUS | Adelaide    |

### Postal addresses <a href="#postal-addresses" id="postal-addresses"></a>

Postal addresses serve as structured locational identifiers, facilitating the delivery of mail and parcels. Typically consisting of recipient names, street addresses, city or locality names, postal or ZIP codes, and often additional elements like country names, postal addresses provide a standardized format for efficient mail routing. Postal address are geocoded with the awesome [Opencage](https://opencagedata.com/) geocoder.

### Airports and IATA codes <a href="#airports-and-iata-codes" id="airports-and-iata-codes"></a>

The International Air Transport Association (IATA) assigns three-letter codes to airports worldwide. These codes are widely used in the airline industry for ticketing, baggage handling, and flight operations, among other purposes. Each code is unique to a specific airport and helps streamline communication and logistics within the aviation sector. Iata codes and airports are geocoded with the [openflights.org](http://openflights.org/) database.

### Coordinates <a href="#coordinates" id="coordinates"></a>

To calculate distances between coordinates use latitude and longitude to define coordinates on the earth's surface. The format should be `latitude,longitude`.

Please make sure that there is no space between the values: ~~`latitude, longitude`~~ and that the correct order is kept ~~`longitude,latitude`~~.

| Origin | Destination          |
| ------ | -------------------- |
| 52,13  | Bali,IND             |
| Berlin | 48.8583701,2.2922926 |

#### what3words <a href="#what3words" id="what3words"></a>

What3Words addresses are geocoded with the [what3words](http://what3words.com/) API.
