My understanding of this thread is finding the longest section of level track - not flat
It's in the title
So all those straight bits at a constant level following some kind of partial grand circle around the earth all count. So do bits that curve, as long as they stay the same height above mean sea level
Otherwise, it's going to get messy trying to work out which bits are flat but on a gradient, or are level but not flat because of infinitesimally small deviations
Richard