North_Distance

Posted by Philip Leitch Monday, March 8, 2010 10:16:31 PM Categories: Geometry Scalar Function
CREATE Function [dbo].[North_Distance] (@Bearing as float)
/*
www.prlsoftware.com
Author: Philip Leitch
Date: 2010
Purpose: This function measures the angular distance from due North to the vector 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 (@Bearing > 180) then (360 - @Bearing) else @Bearing end)
end
Copyright 2009 Philip Leitch

Comments

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