Thanks to everyone who responded. I used the method described by Geoff
below, and it works beautifully.

Eliz.

-----Original Message-----
From: Geoff Pearce [mailto:[EMAIL PROTECTED] 
Sent: Sunday, May 01, 2005 7:58 PM
To: [email protected]
Subject: RE: MI-L Line Length , or distance between points

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          

 



---------------------------------------------------------------------
List hosting provided by Directions Magazine | www.directionsmag.com |
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
Message number: 16330

Reply via email to