Tip:
Highlight text to annotate it
X
Welcome to the web tutorial about calculating distances between points in two different
tables.
There is a tool within MapInfo Professional that will allow you to calculate the distance
between points in two different tables.
For example, you might have a table of all of your customers and another table with all of
your stores and you wish to find the store that each customer is closest to.
The distance calculator tool will perform this analysis and return a list of the customers
and the stores.
First, you need to have two point tables open. The two tables that we will use here are
fictional students and schools. The end result will be a browser with the student and the school
that they are closest to.
Load the Distance Calculator tool through the Tool Manager and then start it from the Tools
menu.
In the top right hand corner of the distance calculator, specify what table should be the Origin
of the measurement. In this case, it will be the students.
You will also need to specify a column to identify each student. We will use the unique ID.
The Destination table must also be chosen. In this case it will be the school, so no change is
necessary. But you will need to specify a column to identify each school so the school name
will be fine.
In the bottom right hand corner you can set some of the criteria for this calculation. We will
focus on three of these for now.
First specify whether you wish to find the closest or farthest distance. We will leave it as
closest since we want to find the closest school. Second, how many distances do you wish to
find. One is the default but keep in mind that this will find the one closest school for each
student. And third, choose your unit of measurement. This is a straight line distance
measurement and does not take into account road networks. Click Calculate Distance to run
the analysis. The results appear in the bottom left-hand corner of the tool in a Browser
window.
You can see that every student is listed by their unique ID, as well as the school to which they
are closest and the distance. If you wish to save this browser as a new table, click Save
Results.
We are going to clear this and run another calculation. This time everything will remain the
same except we will add one condition that will limit the calculation to one single
school. The result will be the distance of all of the students to that particular school.
Check Use the Following Criteria and add in the school name and then click Calculate Distance.
The browser looks similar but this time every student’s distance is measured to one
single school.
Let’s try one more calculation.
This time you will find the furthest student from three of the schools. A few things need
to change.
First, clear the results. Second, select three of the schools using the select button
in the tool and the Shift key on your keyboard. All of these buttons in the tool work the
same as the select tools in MapInfo Professional that you may already be used to.
And then you are going to change the Origin table to the Selection and the Destination
table to the Students. And finally, choose Farthest Distance. Then click Calculate
Distance. The browser now only contains three records because you chose three schools and
found the one student that was furthest from each.