SQL Query is a great feature for MapInfo Pro users. We can use it to do many things or tasks such as calculate areas, line length and many more. In this article, I am going to show you some example on how to calculate line length in MapInfo Professional using SQL Query.
In the following example, I have a contour layer with many lines/polylines. I will demonstrate how to calculate the length of each contour lines using SQL Query in MapInfo Professional. In order to calculate length, it is highly recommended to have a projected coordinate system. For example UTM. Avoid using the geographical coordinate systems (Longitude, Latitude). If your table is in the geographical coordinate system, you can save as to a new file and choose a new projected coordinate system.
Next, we are going to create a new field or column to store the object length. Go to Table >> Maintenance >> Table Structure. Add a new float or decimal field.
Hit OK and next we are going to update our table with the length of each object. Go to Table >> Column Update.
Select the table to update and then select the column we created earlier.
On the value, you can use the Assist button and then select CartesianOjectLen from the function menu.
You may change the unit such as meter (m), kilometer (km), etc. The following video will show you how to do all the steps.
That’s it. Thank you for reading this article and I hope you enjoy it. See you next.