def geo2pix(geo_transform, xcoord, ycoord):
    """
    Computes the indexes of the pixel in the image array corresponding to a point with given coordinates in the
    spatial reference system.
    """

    xpix = int((xcoord-geo_transform[0])/geo_transform[1])
    ypix = int((ycoord - geo_transform[3]) / geo_transform[5])

    return xpix, ypix