Formatting and input

Last updated last month

Spreadsheet

You can use your favorite spreadsheet software like Google Docs, Microsoft Excel or Openoffice Calc to generate a spreadsheet routes you want to calculate. The spreadsheet should have the following format

Origin

Destination

your first origin

your first destination

your second origin

your second destination

...

...

your nth origin

your nth destination

The first row should be the header. If the header is missing, the calculation will fail or the first row will be lost in the result.

Every origin or every destination can be the same in every row. If you want to calculate distances between a single origin to different destinations (or vice versa) you should copy&paste that value to every field in a row.

Google Docs Spreadsheet

If you're using Google Docs as your preferred spreadsheet tool you can see a Google Docs template here or Excel template to import here. Instead of exporting your Google Docs spreadsheet to XLSX and uploading it you can use the Google Docs ID to import your data directly:

You need to share your file (readonly) with batch-849@distancebatch.iam.gserviceaccount.com and copy the Google Docs ID (Where can I find it?) for direct import.

Microsoft Excel

If Excel from Microsoft Office suite is your preferred spreadsheet software you can see a Microsoft Excel template here.

Openoffice.org Calc

If Calc from Openoffice.org suite is your preferred spreadsheet application you can see a Openoffice.org template here.

Input data

Origin and Destination can contain the following data

  1. Country, city or region

  2. Postal addresse

  3. Coordinates (latitude,longitude)

  4. IATA airport codes

  5. what3words

To calculate the distance between your inputs we need to translate names into coordinates. This process is called geocoding. Read more about geocoding here:

Country, city or region

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. Otherwise it is not guaranteed that the process hits the correct value.

Postal 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.

Origin

Destination

Munich

10999,DEU

2000,AUS

Adelaide

Coordinates

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

Export your data

If you're done with the data generation you need to export your spreadsheet to the XLSX or CSV format.

It is highly recommended to use XLSX format to export your data from spreadsheets.

Export to XLSX (Excel)

You should easily export or save your spreadsheet to the XLSX format. This format is supported from all major spreadsheet vendors.

Export to CSV

If you're done with the data generation you need to export your spreadsheet to the CSV format. You can see an example CSV file here.

You should use "," (comma) as the seperator and cast your fields with "

You should use utf-8 encoding otherwise a correct import of your data cannot be guaranteed.

If you're unsure if the final export is correct or you get errors while the analyzation process, please email the csv file to info@distance.to and I will review the input. That's free of charge 😀