FUNCTION  fGetNearestObjEq

Returns table holding a record describing the closest object within @r arcminutes of (@ra,@dec).

returned table:

  • objID bigint PRIMARY KEY, -- Photo object identifier
  • cx float NOT NULL, -- x,y,z of unit vector to this object
  • cy float NOT NULL,
  • cz float NOT NULL,
  • htmID bigint, -- Hierarchical Trangular Mesh id of this object
  • distance float -- distance in arc minutes to this object from the ra,dec.

    Sample call to find the table 1 object within 2 arcminutes of ra,dec 185

    SELECT N.*
    FROM dbo.fGetNearestObjEq(185,0,2,1)

    (see also fGetNearbyObjEq, fGetNearbyObjXYZ, fGetNearestObjXYZ)
  • NameTypeLengthinoutpnum
    @rafloat8input1
    @decfloat8input2
    @rfloat8input3
    @tabletinyint1input4
    objIDbigint8output1
    cxfloat8output2
    cyfloat8output3
    czfloat8output4
    htmIDbigint8output5
    distancefloat8output6