Ghetto distance calculation with epoly