fHtm(lat,lon) returns the 20-deep HtmID of the given location. There are no error cases. all RA, folded to [0..360] and dec to [0...90]

Namespace: Spherical.Htm
Assembly: SphericalHtm (in SphericalHtm.dll) Version: 1.0.0.0

Syntax

C#
public static long fHtmLatLon(
	double lat,
	double lon
)
Visual C++
public:
static long long fHtmLatLon(
	double lat, 
	double lon
)
F#
static member fHtmLatLon : 
        lat:float * 
        lon:float -> int64 

Parameters

lat
Type: System..::..Double
double, latitude coordinate (degrees)
lon
Type: System..::..Double
double, longitude coordinate (degrees)

Return Value

HtmID: Int64 20-deep HTM id of the point

Examples

CopyC#
create function fHtmLatLon(@lat float, @lon float ) 
        returns bigint 
        as external name HTM.Sql.fHtmLatLon
declare @HtmID bigint
select @HtmID = dbo.fHtmLatLon(5, 195) -- output defaults to ''

See Also

uses cartesian.
uses J2000 (ra/dec).