Select to view content in your preferred language

Locating closest points

1860
10
05-22-2014 03:59 AM
HaiderAli
Deactivated User
I have a point on line let say x,y and a list of points i want to find out the points closest to the point x,y at both ends for example




------------------------------ x1,y1
p1------------------------------|----------------------------------p2

and a list of point(p2,p3,p4,p5.......) now i want to find the closest two points


------------------------- p5-----x1,y1----p6
p1-----------------------|-------|---------|----------------------------------p2


is there any functioality available in arcobject that can perform this operation?
0 Kudos
10 Replies
RichardFairhurst
MVP Alum
IS is pooible that M values can be negative?


If this question is about distances along a line, then relative to a given point offset distances along a line will be positive or negative (even if all the M values on the line are positive).  Say the two ends of a line are your home and your work.  As you go along the line away from home the measured distance you have traveled is positive relative to home, because the distance is increasing.  At the same time, as measured from your work the distance you have traveled is negative, because the distance to work is decreasing.  The measure could have just as easily made work the origin and home the destination, but rather than forcing you to create two routes to do both directions of travel, LR makes you choose the orientation of the line and then just sets distances traveled along the line always from the perspective of the origin when measures always increase.

From the perspective of the traveler, the distance traveled is always positive, regardless of the origin or destination.  When comparing distances on either side of a point along a line the absolute value of the distance should be compared, because the real question is being asked from the perspective of the traveler who began at a given point and was not restricted in what direction he could choose to travel, not from the perspective of the line origin or destination.  All of these perspectives are equally valid and occurring at the same time, so to solve any problem you have to consider the perspective that defines the answer.
0 Kudos