Average Distance between two polyline feature classes

3596
3
04-23-2013 05:47 AM
MichaelGlassman2
New Contributor III
I have two polyline feature classes and I would like to determine how far away Polyline B is from Polyline A on average for each line in the file. Is there a tool that allows me to do this? I have already tried using the Near tool but this does not give me the output I am looking for because it outputs the minimum distance and if the two polyline feature classes intersect it gives me an output of 0. I am using 10.1 at the ArcInfo level. Thanks.
0 Kudos
3 Replies
DanLee
by Esri Regular Contributor
Esri Regular Contributor
You can try the following:
1. Run Featuer Vertices To Points tool with the ALL option on line B to get all vertices of line B. The vertices carry the line ID.
2. Run Near tool from the points to line A.
3. Run Summary Statistics tool on the points to get MEAN for NEAR_DIST using the line ID as Case Field.
4. Run Join Field tool to transfer the MEAN_NEAR_DIST field to line B via the line ID.

I might have left out some details; hope it just works.
0 Kudos
MichaelGlassman2
New Contributor III
I followed these procedures and I ran into a problem because I am working with many lines the distances created apply include point to line distances that should not be included. I tried using a maximum search radius and all of my points had an output NEAR_FID of "-1" and and output NEAR_Dist of "-1".  I am not sure what is causing that problem.

What I am trying to do is to add a width to a sidewalk centerline feature class. I am trying to find a way to determine the distance from each centerline to another feature class I have that is the sidewalks outline. I am hoping there is a tool that could do this to save me the time from using the Measure tool for each sidewalk individually. Thanks.
0 Kudos
DanLee
by Esri Regular Contributor
Esri Regular Contributor
Instead of getting all vertices, you can try the MID option for midpoints of the centerlines.
Then use Generate Near Table tool, which allows you to specify a search distance and a maximum count. So if you specify 2, the tool will find the two closest features within the search distance for each midpoint. Hopefully each midpoint of the centerline will find two distances - one to each sidewalk. The sum of the two distances would be the width at the midpoint of a centerline.
0 Kudos