FUNCTION  fGetNearestObjAllEq

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


ra, dec are in degrees, r is in arc minutes.

returned table:

  • objID bigint, -- Photo primary object identifier
  • run int NOT NULL, -- run that observed this object
  • camcol int NOT NULL, -- camera column that observed the object
  • field int NOT NULL, -- field that had the object
  • rerun int NOT NULL, -- computer processing run that discovered the object
  • type int NOT NULL, -- type of the object (3=Galaxy, 6= star, see PhotoType in DBconstants)
  • 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.

    select *
    from dbo.fGetNearestObjAllEq(185,0,1)

    see also fGetNearbyObjAllEq, fGetNearbyObjAllXYZ
  • Input and output parameters

    nametypelengthinoutpnum
    @rafloat8input1
    @decfloat8input2
    @rfloat8input3
    runint4output2
    camcolint4output3
    fieldint4output4
    rerunint4output5
    typeint4output6
    modeint4output7
    cxfloat8output8
    cyfloat8output9
    czfloat8output10
    distancefloat8output12
    objIDbigint8output1
    htmIDbigint8output11