Here is code that constructs a line that is the “mean”, or “average”, of two similar lines. A typical use case is creating an average trail alignment from two GPS tracks of the same trail.
Tool inputs are two feature classes that each contain a single polyline that is similar to the polyline in the companion feature class. For example, one feature class might contain the north-bound GPS track of a trail, while the second feature class contains the south-bound GPS track of the same trail.
The feature classes can be of either .SHP or .GDB format, braided or unbraided, and with either a projected or GCS spatial reference. The finished mean line will be written into the first input’s workspace, and will have the first input’s spatial reference.
See the illustrations below for examples of the result. The code (as a txt file) is also attached, and could be adapted to batch processing.