And if your angle is in degree you can multiply the angle with 0.01745329252
to get the value as radian:
4.. Update myTable Set OBJ = CreateLine(myXCol, myYCol,
myXCol + Cos(myAngleCol *
0.01745329252) * desiredLength,
myYCol + Sin(myAngleCol *
0.01745329252) * desiredLength)
But of course this also raises the question of how your angle is calculated
?
1. Closewise from west ?
2. Counter clockwise from east ?
3. Counter clockwise from north ?
4. Clockwise from north ?
5. Is there more obvious ?
As I remember the formula mentioned above only works on the second.
Peter Horsb�ll M�ller
GIS Developer
Geographical Information & IT
COWI A/S
Rug�rdsvej 55
DK-5000 Odense
Denmark
Tel +45 6313 5013
Direct +45 6313 5008
Mob +45 5156 1045
Fax +45 6313 5090
E-mail [EMAIL PROTECTED]
http://www.cowi.dk
COWI GIS konference afvikles i dagene d. 2.-3. september.
Se yderligere oplysninger p� www.cowi.dk/Div04/Profiles/nyheder.asp
> -----Original Message-----
> From: Lars V. Nielsen [mailto:[EMAIL PROTECTED]
> Sent: Wednesday, July 02, 2003 10:45 AM
> To: Marius van Wyk
> Cc: [EMAIL PROTECTED]
> Subject: Re: MI-L Creation of lines from table with points
> and angles/bearing
>
>
> Hi Marius,
> 1.. Make a copy of the table (myTable)
> 2.. Open the MapBasic window and enter
> 3.. Set CoordSys Table myTable
> 4.. Update myTable Set OBJ = CreateLine(myXCol, myYCol,
> myXCol + Cos(myAngleCol) * desiredLength, myYCol +
> Sin(myAngleCol) * desiredLength)
> 5.. Hit return after each command (3 and 4)
> Angle values need to be in radian, and desiredLength in the
> same unit as the coordinate units are in.
>
> Best regards / Med venlig hilsen
> Lars V. Nielsen
> --------------------------------------------------------
> Hvenegaard & Meklenborg
> Rugaardsvej 55, DK-5000 Odense C
> Denmark
> http://www.hvm.dk
> ----- Original Message -----
> From: "Marius van Wyk" <[EMAIL PROTECTED]>
> To: <[EMAIL PROTECTED]>
> Sent: Tuesday, July 01, 2003 6:56 PM
> Subject: MI-L Creation of lines from table with points and
> angles/bearing
>
>
> > Hi,
> >
> > I have a table which contains coordinates and a bearing at each of
> > these coordinates. I need to show on a map, these points,
> with a line
> > then pointing in the direction of the bearing in the table. Could
> > anyone please give me a few pointers/help how to do this?
> >
> > Best regards
> > Marius van Wyk
> >
> >
> >
> >
> ______________________________________________________________________
> > __
> >
> > This e-mail message (including any attachment) is intended only for
> > the personal
> > use of the recipient(s) named above. This message is
> confidential and may be
> > legally privileged. If you are not an intended recipient,
> you may not review, copy or
> > distribute this message. If you have received this
> communication in error, please notify
> > us immediately by e-mail and delete the original message.
> >
> > Any views or opinions expressed in this message are those of the
> > author only.
> > Furthermore, this message (including any attachment) does
> not create any legally
> > binding rights or obligations whatsoever, which may only be
> created by the exchange
> > of hard copy documents signed by a duly authorised
> representative of Hutchison
> > 3G UK Limited.
> >
> ______________________________________________________________
> __________
> >
> >
>
---------------------------------------------------------------------
List hosting provided by Directions Magazine | www.directionsmag.com |
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
Message number: 7457