def find_origin_coordinate(sites):
    """ Find the coordinates of each site within the tile, and then subtract the
      smallest coordinate to re-origin them all to be relative to the tile.
  """

    if len(sites) == 0:
        return 0, 0

    def inner_():
        for site in sites:
            coordinate = SITE_COORDINATE_PATTERN.match(site['name'])
            assert coordinate is not None, site

            x_coord = int(coordinate.group(2))
            y_coord = int(coordinate.group(3))
            yield x_coord, y_coord

    x_coords, y_coords = zip(*inner_())
    min_x_coord = min(x_coords)
    min_y_coord = min(y_coords)

    return min_x_coord, min_y_coord