In MapInfo Pro it is possible to calculate the distance from one point to another. This example shows how to calculate the distance from a fixed point to every point in a geocoded table and store the result in another table.
- Determine the location of the fixed point. To find the position of a symbol on the map, double-click the symbol with the Select command. In this example, the X value is -101.697209 and the Y value is 35.550036.
- On the TABLE tab, click SQL Select and fill in the SQL Select dialog box, substituting your X and Y values for the values mentioned above
As in the previous SQL query, replace EMPLOYEE with the name of your table, and LName and FName with the name of the relevant column from your table.
- Select Columns:
LName, FName, Distance(-101.679209, 35.550036, CentroidX(obj), CentroidY(obj), "mi") "Dist"
- from Tables: EMPLOYEE
- into Table Named: CUSTDIST
- Select Columns:
- Click OK. The resulting query table contains last names and first names plus a new column called DISTANCE which records the distance between the fixed location (-101.697209, 36.550036) and the point associated with each row of the table.
- To save the results in a permanent table, on the HOME tab, click Save Copy As, and save the CUSTDIST table.