FUNCTION  fRegionsContainingPointXYZ

Returns regions containing a given point

The parameters
  • @x, @y, @z are unit vector of the point on the J2000 celestial sphere.
  • @types is a varchar(1000) space-separated string of the desired region types.
    Possible types are: SEGMENT STRIPE TIGEOM PLATE CAMCOL RUN STAVE CHUNK TILE TILEBOX SECTOR SECTORLET SKYBOX WEDGE.
  • @buffer is the 'fuzz' in arcmins around that poiont.

  • Returns a table with the coulums
    Returns empty table if input params are bad.
    RegionID BIGINT NOT NULL PRIMARY KEY
    Type VARCHAR(16) NOT NULL SELECT * from fGetRegionsContainingPointXYZ(0,0,0,'STAVE',0)

    Input and output parameters

    nametypelengthinoutpnum
    @xfloat8input1
    @yfloat8input2
    @zfloat8input3
    @bufferfloat8input5
    @typesvarchar1000input4
    regionidbigint8output1
    typevarchar16output2