Although odometers, such as the "Thompson Odometer" were available during the Civil War, the more commonly utilized method of distance measurement during this period was a chain such as the "Gunter Chain" that was in heavy usage for surveying from the early 1600's through the 1800's..
As an aside, early in the war Union troops from states such as Illinois and Indiana where the terrain was relatively flat frequently mentioned in diaries and letters home of walking "Virginia" miles instead of regular miles because of the region's rough topography.
There is also this:
U.S. Coast Survey’s surveyors were pivotal in the Civil War Battle for New Orleans
March 27, 2012
"“U.S. Coast Survey teams mapped the terrain and charted rivers and coastlines for military action during the Civil War,”
" To be successful, Gerdes’ team had to measure a series of small triangles based on two established locations on both sides of the river. They took their measurements while the gunboats fired on the forts, to distract the Confederates from the surveying operations."
And here is a free link to a great early work on the subject: The Great Reconnaissance: Soldiers, Artists, and Scientists on the Frontier, 1848-1861 by Edward S. Wallace, 1955 | Onli…