def _coords_to_pixel(y, x, transform):
    """Returns raster coordinate pair (col, row) for the given lon, lat, and geotransform."""

    col = int((y - transform[0]) / transform[1])
    row = int((x - transform[3]) / transform[5])

    return col, row