FUNCTION  fGetObjFromRect

Returns table of objects inside a rectangle defined by two ra,dec pairs.
Note the order of the parameters: @ra1, @ra2, @dec1, @dec2


Assumes dec1Uses level 20 HTM.
returned fields:
  • objID bigint, -- id of the object
  • run int NOT NULL, -- run that observed the object
  • camcol int NOT NULL, -- camera column in run
  • field int NOT NULL, -- field in run
  • rerun int NOT NULL, -- software rerun that saw the object
  • type int NOT NULL, -- type of object (see DataConstants PhotoType)
  • cx float NOT NULL, -- xyz of object
  • cy float NOT NULL,
  • cz float NOT NULL,
  • htmID bigint -- hierarchical triangular mesh ID of object
    sample call
    select * from dbo.fGetObjFromRect(185,185.1,0,.1)
  • Input and output parameters

    nametypelengthinoutpnum
    @ra1float8input1
    @ra2float8input2
    @dec1float8input3
    @dec2float8input4
    objIDbigint8output1
    runint4output2
    camcolint4output3
    fieldint4output4
    rerunint4output5
    typeint4output6
    cxfloat8output7
    cyfloat8output8
    czfloat8output9
    htmIDbigint8output10