AgencyBean agencyBean = _agencyBeanService.getAgencyForId(agencyId);
if (agencyBean == null)
throw new ServiceException("agency not found: " + agencyId);
AgencyWithCoverageBean bean = new AgencyWithCoverageBean();
bean.setAgency(agencyBean);
bean.setLat((bounds.getMaxLat() + bounds.getMinLat()) / 2);
bean.setLon((bounds.getMaxLon() + bounds.getMinLon()) / 2);
bean.setLatSpan(bounds.getMaxLat() - bounds.getMinLat());
bean.setLonSpan(bounds.getMaxLon() - bounds.getMinLon());
beans.add(bean);
}
return beans;
}