'Represent a coordinate (latitude or longitude) according to a
format provided from deployment_settings.'

@staticmethod
def lat_lon_format(coord):

    degrees = abs(coord)
    minutes = ((degrees - int(degrees)) * 60)
    seconds = ((minutes - int(minutes)) * 60)
    (degrees, minutes) = (int(coord), int(minutes))
    format = current.deployment_settings.get_L10n_lat_lon_format()
    formatted = format.replace('%d', ('%d' % degrees)).replace('%m', ('%d' % minutes)).replace('%s', ('%lf' % seconds)).replace('%f', ('%lf' % coord))
    return formatted
