FUNCTION  fRegionOverlap

Returns regions of a given type overlapping a regionString

The parameters
  • @regionString is the HTM region of interest
  • @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.
  • @buffer is the amount the regionString is grownin arcmins.

  • Returns a table with the columns
    Returns empty table if input params are bad.
    regionid bigint NOT NULL PRIMARY KEY
    type varchar(16) NOT NULL -- the type SEGMENT STRIPE TIGEOM PLATE CAMCOL RUN STAVE CHUNK TILE
    regionString varchar(7500) NOT NULL -- the string defining the intersection SELECT * from fRegionOverlap('CIRCLE J2000 195 2.5 100','STAVE',1)

    Input and output parameters

    nametypelengthinoutpnum
    @regionStringvarchar8000input1
    @typesvarchar1000input2
    @bufferfloat8input3
    regionIDbigint8output1
    typevarchar16output2
    regionStringvarchar7500output3