FUNCTION  fHtmXyz

Returns htmid given x,y,z in cartesian coordinates in J2000

Returns the Hierarchical Triangular Mesh (HTM) ID of a given point, given x,y,z in cartesian (J2000) reference frame. The vector (x,y,z) will be normalized to unit vector if non-zero and set to (1,0,0) if zero. Returns the 21-deep htmid of this object.
Parameters:
  • @x float, unit vector for ra+dec
  • @y float, unit vector for ra+dec
  • @z float, unit vector for ra+dec
  • returns htmID bigint
    select dbo.fHtmXyz(1,0,0)
    gives 17042430230528
    see also fHtmEq
  • Input and output parameters

    nametypelengthinoutpnum
    @xfloat8input1
    @yfloat8input2
    @zfloat8input3
     bigint8input0