def geo2xy(ds, x, y):
    """
    transforms geographic coordinate to x/y pixel values

    :param ds: GDAL dataset object
    :param x: x coordinate
    :param y: y coordinate

    :returns: list of x/y pixel values
    """
    geotransform = ds.GetGeoTransform()
    origin_x = geotransform[0]
    origin_y = geotransform[3]
    width = geotransform[1]
    height = geotransform[5]
    _x = int((x * width) + origin_x)
    _y = int((y * height) + origin_y)

    return [_x, _y]