Hi there, I'm a fairly new user here from the horticultural field. I'm (attempting to) mapping a small trail system in a wooded park using ArcGIS Pro. Via the desktop application I created a dataset with a Polyline and using the Collector app I streamed and saved four lines of the same trail. The Polyines are all within a few meters of each other but I'd like to create a new Polyline as a mean of the originals. As I mentioned I'm a beginning user. How can I complete this?
Thanks for any direction!
-John
John,
There was another discussion about this a few years back that has some good info, including a recipe that worked for one user (although no code was given):
Anyone seen a recent approach to doing this in batch?
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.
I have published a new Geoprocessing Sample tool for averaging lines. You can download it and see if it works for your use case.
https://www.arcgis.com/home/item.html?id=e47c400683ad443781660cef529a7637