Return the 2 matrix with lat and lon of each pixel.

    Keyword arguments:
    lat -- A latitude matrix
    lon -- A longitude matrix
    max_y -- The max vertical pixels amount of an orthorectified image.
    max_x -- The max horizontal pixels amount of an orthorectified image.

def pixels_from_coordinates(lat, lon, max_y, max_x):
    """
    Return the 2 matrix with lat and lon of each pixel.

    Keyword arguments:
    lat -- A latitude matrix
    lon -- A longitude matrix
    max_y -- The max vertical pixels amount of an orthorectified image.
    max_x -- The max horizontal pixels amount of an orthorectified image.
    """
    # The degrees by pixel of the orthorectified image.
    x_ratio, y_ratio = max_x/360., max_y/180.
    x, y = np.zeros(lon.shape), np.zeros(lat.shape)
    x = (lon + 180.) * x_ratio
    y = (lat + 90.) * y_ratio
    return x, y