No railroad hereafter constructed in this State, shall pass within three miles of any county seat without passing through the same, and establishing and maintaining a depot therein, unless prevented by natural obstacles; provided, such town or citizens shall grant the right-of-way through its limits, and sufficient ground for ordinary depot purposes.