def _transformPixelsToCoordinates(hDataset, hTransform, adfGeoTransform, x, y):
    """ Adapted from http://svn.osgeo.org/gdal/trunk/gdal/swig/python/samples/gdalinfo.py
    
        @param hDataset A GDAL raster dataset object
        @param hTransform A GDAL transform object
        @param adfGeoTransform A GDAL geographic transform object
        @param x The X coordinate
        @param y The Y coordinate
        @return Tuple of floats representing longitude and latitude coordiates.
    """
    # Transform point into georeferenced coordiates
    dfGeoX = adfGeoTransform[0] + adfGeoTransform[1] * x \
            + adfGeoTransform[2] * y
    dfGeoY = adfGeoTransform[3] + adfGeoTransform[4] * x \
            + adfGeoTransform[5] * y
    # Transform georeferenced coordinates into lat/long
    coords = hTransform.TransformPoint(dfGeoX, dfGeoY, 0)
    return (coords[0], coords[1])