FUNCTION  fGetNearbyObjEq

Returns table of objects from @table within @r arcmins of an Equatorial point (@ra,@dec).

There is no limit on the number of objects returned, but there are about 40 per sq arcmin.

returned table:

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


    Sample call to find all the Galaxies within 5 arcminutes of ra,dec 185,0

    SELECT *
    FROM Galaxy AS G,
    dbo.fGetNearbyObjEq(185,0,5,1) AS N
    WHERE G.objID = N.objID

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