SE_stable_search |
Searches a shape (s) table using a set of spatial filters
LONG SE_stable_search (SE_STABLE stable, SHORT num_filters,
const SE_FILTER *filters,
BOOL (*func)
(void *argument, SE_SHAPE shape, const LONG user_id, const void *associated,
SHORT num_filters, ULONG *search_masks), void *argument);
stable | The s table handle |
num_filters | The number of filters to apply to the search |
filters | An array of pointers to SE_FILTER structures |
func | A user-defined function called for each shape that satisfies the search |
User function parameters
argument | The user supplied argument |
shape | A pointer to a shape that satisfies the search |
user_id | The user-defined ID of the shape |
associated | A pointer to additional data associated with the shape |
num_filters | The number of filters satisfied by the search |
search_masks | The search mask for each filter's comparison against the found shape |
argument | Argument to be passed to the user-supplied function |
SE_stable_search searches an s table with a set of spatial filters. The spatial filters determine the type and order of search operations to apply to the shape table. Search constraints are supplied to the SE_stable_search function as an array of pointers to SE_FILTER structures.
For each shape that passes all the tests, a pointer is passed to a user-supplied function along with its associated data pointer, a user-supplied argument, and a vector of search masks. The search continues until all shapes meeting the criteria are found or the user function returns FALSE. If you specify no filters, all shapes in the s-table are returned.
Structure definitions
typedef struct {
CHAR table[SE_QUALIFIED_TABLE_NAME];
/* The spatial table name */
CHAR column[SE_MAX_COLUMN_LEN];
/* The spatial column name */
LONG filter_type;
/* The type of spatial filter */
union {
SE_SHAPE shape;
/*
A shape object */
struct {
LONG id;
/* An id for a filter feature */
CHAR table[SE_QUALIFIED_TABLE_NAME]; /*
The feature's spatial table */
} id;
} filter;
LONG method;
/* The search method to satisfy */
CHAR *cbm_source;
/* Set only if the method is SM_CBM */
UCHAR *cbm_object_code;
/* Internal system use only */
BOOL truth;
/* TRUE to pass method, FALSE if it must NOT pass */
} SE_FILTER;
filter_type:
SE_SHAPE_FILTER
SE_ID_FILTER
Search method:
SM_ENVP
/* Envelopes overlap */
SM_ENVP_BY_GRID /* Envelopes overlap */
SM_CP
/* Common point */
SM_LCROSS /* Line
cross */
SM_COMMON /* Common
edge/line */
SM_CP_OR_LCROSS /* Common point or line cross */
SM_LCROSS_OR_CP /* Common point or line cross */
SM_ET_OR_AI /* Edge touch or
area intersect */
SM_AI_OR_ET /* Edge touch or
area intersect */
SM_AI
/* Area intersect */
SM_AI_NO_ET /* Area intersect
and no edge touch */
SM_PC
/* Primary contained in secondary */
SM_SC
/* Secondary contained in primary */
SM_PC_NO_ET /* Primary contained
and no edge touch */
SM_SC_NO_ET /* Secondary contained
and no edge touch */
SM_PIP
/* First point in primary in sec */
SM_IDENTICAL /* Identical */
The returned shapes are read-only and cannot be used for certain arguments of thirty-four shape functions. See Application Development Support for the complete list.
SE_SUCCESS
SE_INVALID_ENVELOPE
SE_INVALID_FILTER_TYPE
SE_INVALID_PARAM_VALUE
SE_INVALID_POINTER
SE_INVALID_SEARCH_METHOD
SE_INVALID_SHAPE