def parseCoords(coordList):
	"""
	  Pass in a list of values from <coordinate> elements
	  Return a list of (longitude, latitude, altitude) tuples
	  forming the road geometry
	"""
	def parseCoordGroup(coordGroupStr):
		"""
		  This looks for <coordinates> that form the road geometry, and
	  	  then parses them into (longitude, latitude, altitude). Altitude
	  	  is always 0.
	  	  If the coordinate string is just the coordinates of a place, then
	  	  return the empty list 
		"""
		#print "coordGroupStr:", coordGroupStr
		coords = coordGroupStr.strip().split(" ")
		if len(coords) > 3:
			coords = map(lambda x: x.split(","), coords)
			coords = map(lambda x: tuple(map(float, x)), coords)
			coords = map(lambda x: (x[1], x[0]), coords)
			
			#print 'returning:', coords
			return coords
		else:
			return []
	
	ret = []
	#print "coordList:", coordList
	for coordGroup in coordList:
		ret += parseCoordGroup(coordGroup)
	return ret