3 Replies Latest reply on Apr 3, 2013 1:54 PM by navaneet

# Find nearest parallel line and ignore perpendicular line

Hi,

We have two sets of linear facilities. We like to find nearest line from the other set of geometry but preference should be given more to lines which are parallel than the perpendicular ones.

I intended to use following answer I see in this forum.

Is any other methods?

Thanks
Navaneet
• ###### 1. Re: Find nearest parallel line and ignore perpendicular line
If you expect the parallel line to be reasonably close to your feature, then you could try buffering your feature and then look for other features which have a long (i.e. much more than twice your buffer) intersection with your buffer polygon. If so, then they might be approximately parallel.

John
• ###### 2. Re: Find nearest parallel line and ignore perpendicular line
Navaneet,

It really depends on what you're trying to determine using your data. I noticed you included "street" in your tags. Are you trying to relate street-centerlines to frontages, utilities, or parcels?

If you use buffering as John suggested, get a count for how many target features your buffer interacts with. In some cases (say street intersections) where you'll get multiple hits, you could compare angles/slopes to identify the more parallel one.

Note that buffering a line will produce a Cheeto (eh, rectangle with well rounded corners). The Cheeto may interact with more than 1 target feature if your buffer is too large and the target features are connected tip-to-tail -- and each of these targets may be parallel with your line. If that's a problem, you could compute distances to your targets and pick the closest one. You'll probably still have to compare slopes to weed out false-positives at intersections.

To support geocoding, I once related parcels to adjacent streets and tried the above approaches and found they didn't have sufficient accuracy at cul-de-sac bulbs or corner-bulbs. Instead I used the rotation value of parcel-labels (always placed perpendicular to the street) to generate search features to intersect adjacent streets. These search features had variable length depending on the street-type. There were still some false-positives due to data errors (e.g., streets incorrect typed, label misplacement, etc.), but few enough to throw a body at.

Regards,
Noel
• ###### 3. Re: Find nearest parallel line and ignore perpendicular line
Noel, John,

Beautiful. Thanks. Though John solution is good enough at this time, I will also combine Noel's street/intersections experience and additional slope/angle.

Thanks to both of you.
Navaneet