Elizabeth,
You could try this in the SQL Select statement area:
Select distance(x1,y1, x2, y2, "m")"Length"
Table test2
Where x1 y1 are the coordinates of the first point and x2 y2 the coordinates
of the end of line and "m" is the units, in metres in this case.
The "Length" bit just names the new calculated column.
You may have to experiment with this as it will only work if the MapBasic
window is set to the coordinate system of your table.
Go to Options, Show Mapbasic Window then type the Set CoordSys statement for
your system eg: ours is
set CoordSys Earth Projection 8, 116, "m", 141, 0, 0.9996,
500000, 10000000
(Australia AGD66 UTM Zone 54)
consult your documentation for help on this.
Or you could try the old mathmatics solution:
Select ((x2-x1)^2+(y2-y1)^2)^0.5"Length"
Table test2
Hope this helps
Cheers
Geoff
-----Original Message-----
From: Elizabeth Caponi [mailto:[EMAIL PROTECTED]
Sent: Saturday, 30 April 2005 2:02 AM
To: [email protected]
Subject: MI-L Line Length , or distance between points
I have one table with four columns of data representing start and end points
of lines: x1, y1, x2, y2.
How do I determine the distances between the points (or line length)? I
searched the archives and couldn't find an answer (unless I'm just not
looking in the right place). Can anyone help? (I don't have MapBasic)
Thanks.
Elizabeth Caponi