def build_parameters(request_args, origin_latitude=None, origin_longitude=None, 
                     radius=None, start_latitude=None, start_longitude=None,
                     end_latitude=None, end_longitude=None,
                     start_year=None, end_year=None, threshold=None,
                     cq=True):
  """Build a dictionary of event counter parameters.

  Use provided defaults, overridden by any arguments present in the request.
  """
  return {
    'origin_latitude': request_args.get('olat', origin_latitude),
    'origin_longitude': request_args.get('olon', origin_longitude),
    'start_latitude': request_args.get('slat', start_latitude),
    'start_longitude': request_args.get('slon', start_longitude),
    'end_latitude': request_args.get('elat', end_latitude),
    'end_longitude': request_args.get('elon', end_longitude),
    'radius': request_args.get('r', radius),
    'start_year': request_args.get('s', start_year),
    'end_year': request_args.get('e', end_year),
    'threshold': request_args.get('m', threshold),
    'cq': request_args.get('cq', cq),
  }