Angle_To_Bearing

Posted by Philip Leitch Monday, March 8, 2010 10:18:51 PM Categories: Geometry Geospatial Scalar Function
CREATE function [dbo].[Angle_To_Bearing]( @North as float, @East as float)
/*
www.prlsoftware.com
Author: Philip Leitch
Date: 2010
Purpose: This function converts a North and East distance to a bearing.
Copyright: Philip Leitch 2010
Licensing: This code may be used or modified but if the code is included in a software package attribution to me must be made.
Liability: The developer assumes all liability when using this code.
Notes:
*/
returns float
as
begin
    return case when @east <= 90 then @North else 360 - @North end
End
Copyright 2009 Philip Leitch

Comments

You must sign in to this site to post comments.
Already Registered?
Sign In
Not Yet Registered?