Eratosthenes knew that the distance between Alexandria and Syene was approximately 800 kilometers, because he hired a man to pace it out. Eight hundred kilometers times 50 is 40,000 kilometers: so that must be the circumference of the Earth.
It was known that earth is not flat, even from 2000 years ago. this script from Carl Sagan are amazing. and specially this narration from him.