# Compute for shortest/perpendicular distance between track point and centerline

I am working on a python school project that uses gpx tracks from different devices. Latitude, Longitude, Elevation and Timestamp are the only information that are constantly available. HDOP, Speed, etc. information may or may not exist. Projection used by the devices: WGS84. The ultimate purpose of the program is the computation of travel time given a specific route.

CURRENT NEED: Snap gps track points to the nearest centerline.

CURRENT TO DO: Compute for shortest/perpendicular distance, value of which will be used in deciding which line the point snaps to.

QUESTION 1: What would be more accurate to do/use?

QUESTION 2: What would be faster computationally?

OPTION 1: Convert to UTM first.

OPTION 2: Use Haversine's Formula.

OPTION 3: Use Vincenty's Formula.

1. Calculate distance, bearing and more between Latitude/Longitude points: http://www.movable-type.co.uk/scripts/latlong.html

3. Vincenty vs Haversine Distance Calculations? http://www.researchgate.net/post/Vincenty_vs_Haversine_Distance_Calculations

4. Geographic Information Technologies for analysing the digital footprint of tourists: [http://www.agile-online.org/Conference_Paper/cds/agile_2014/agile2014_91.pdf4