def get_distance(coordinates_str):
	"""gets distance of one path from coordinates string in form of:
	14.81363432237944,53.57016581501523,0 14.81411766813742,53.56923005549378,0 14.81880340335202,53.56879451890311 ...
	look at:
		http://code.google.com/intl/pl-PL/apis/kml/documentation/kmlreference.html#coordinates
	"""
	sum_distance = 0.0
	arr = []
	coordinates = []
	if ' ' in coordinates_str:
		arr = coordinates_str.split(' ')
	if len(arr) > 1:
		for s in arr:
			if ',' in s:
				pt = s.split(',')
				pos_latt = (float(pt[0].strip()), 0, 0)
				pos_long = (float(pt[1].strip()), 0, 0)
				position = (pos_latt, pos_long)
				coordinates.append(position)
	if coordinates:
		for i in range(len(coordinates) - 1):
			start = coordinates[i]
			stop = coordinates[i + 1]
			sum_distance += distance.points2distance(start, stop)
	return sum_distance
gets distance of one path from coordinates string in form of:
	14.81363432237944,53.57016581501523,0 14.81411766813742,53.56923005549378,0 14.81880340335202,53.56879451890311 ...
	look at:
		http://code.google.com/intl/pl-PL/apis/kml/documentation/kmlreference.html#coordinates
	
recipes/Python/576782_Calculate_distance_kmz/recipe-576782.py