'get extreme values.
x1, y1, x2, y2 in image coordinates (0-based)
nx, ny : number of division in each axis'

def __call__(self, transform_xy, x1, y1, x2, y2):

    (x_, y_) = (np.linspace(x1, x2, self.nx), np.linspace(y1, y2, self.ny))
    (x, y) = np.meshgrid(x_, y_)
    (lon, lat) = transform_xy(np.ravel(x), np.ravel(y))
    (lon_min, lon_max) = (lon.min(), lon.max())
    (lat_min, lat_max) = (lat.min(), lat.max())
    return self._add_pad(lon_min, lon_max, lat_min, lat_max)
