I got 2 layers, each layer containing 1 polygon.
When I use the "Distance Calculator" tool set to find closest point, OR Find farthest point, the result is always the same.
What I want to know is why? How does the tool calculate the "furthest distance"?
If you look at the image here, to me the furhest distance should be calculated between A and B.
Best Answer
In the MapBasic Reference Guide, the
Farthest
statement's (which I'm going to assume is what the Distance Calculator uses) purpose is defined as:So, the title is a little bit misleading, but it is actually finding the furthest object, not the furthest point within the object. This is then corroborated further down in the Description section:
Note the part stating the minimum distance between region objects is found.
If you want to find the furthest point within each object, then I think you are going to need to use some code to compare each node in one object against every other node in the other object and then return the distance for the pair of nodes which are furthest apart. It should be fairly simple to implement if you know a bit of MapBasic but otherwise I'm not sure how you'd go about it!
** update ** I've just checked the source code for the Distance Calculator tool and it does indeed use the
Farthest
statement to do the distance calculation.