/*****************************************************************************
**
** Function name:
**
** MyShapeSFCbits
**
** Description:
**
** This is an R-Tree support function which enables the
** server to use a fast method of building an R-Tree index.
**
** Special Comments:
**
** The SQL function signature for this function is
** "SFCbits (UDT, pointer)". This requires an explanation:
**
** The purpose of the first argument is to provide function signature
** uniqueness, since you must declare a separate SFCbits function for
** each subtype in that can participate in the opclass.
**
** The second argument is declared to be an SQL pointer (i.e. void *);
** in reality it is a pointer to an integer. You must not allocate
** space for this returned value; the server will allocate it for you.
**
** Parameters:
**
** mi_lvarchar *udt UDT instance
** mi_integer *bits Returned value, size of spatial key.
** MI_FPARAM *fp UDR function parameter & state info.
**
** Return value:
**
** mi_integer MI_OK if success, MI_ERROR if problems.
**
*****************************************************************************/
UDREXPORT mi_integer
MyShapeSFCbits (mi_lvarchar *shape,
mi_integer *bits,
MI_FPARAM *fp)
{
SHAPE_TRACE_ENTER (MyShapeSFCbits);
*bits = SPATIAL_KEY_BITS;
SHAPE_TRACE_EXIT (MyShapeSFCbits);
return MI_OK;
}