SpatialCircleFilter Command

Use the SpatialCircleFilter command in a Logic Template to filter out records that lie on, within or outside the perimeter of a circle.

When dealing with large amounts of data it is often more efficient to use a spatial index to narrow the search. The SpatialCircleFilter command can then be used to fine tune the result set.

To execute a Spatial Circle Filter request, use the SpatialCircleFilter command with five or six arguments:

SpatialCircleFilter( bd, dx, dy, cntr, rad ); or SpatialCircleFilter( bd, dx, dy, cntr, rad, flag );

SpatialCircleFilter Arguments

Argument

Description

bd

Indicates how the boundary of the circle are handled.

dx

The name of the data field containing the X coordinate to be tested.

dy

The name of the data field containing the Y coordinate to be tested.

cntr

The name of the HTML variable containing the center point coordinate pair.

rad

The name of the HTML variable containing the radius beyond which values are discarded.

flag

Indicate ( drop or keep ) special processing for records with a value of zero for both dx and dy.

Access the SpatialCircleFilter Dialog Box by selecting Spatial->Circle menu item under the Filtering category of the Logic Template editor command menu.

Examples

Command

Description

Center = { CenterX, CenterY };

SpatialCircleFilter( CIRC_AND_EXT, PointX, PointY, Center, Radius);

Pass records containing, in the fields named "PointX" and "PointY", coordinates that lie on or outside the circle with its center at the coordinates stored in the HTML variables "CenterX" and "CenterY" and radius equal to the value stored in the HTML variable "Radius".

Center = { CenterX, CenterY };

SpatialCircleFilter( CIRC_AND_EXT, PointX, PointY, Center, Radius, keep);

Pass records containing, in the fields named "PointX" and "PointY", either a pair of zeros or coordinates that lie on or outside the circle with its center at the coordinates stored in the HTML variables "CenterX" and "CenterY" and radius equal to the value stored in the HTML variable "Radius".

Center = { CenterX, CenterY };

SpatialCircleFilter( EXTERIOR, PointX, PointY, Center, Radius);

Pass records containing, in the fields named "PointX" and "PointY", coordinates that lie outside the circle with its center at the coordinates stored in the HTML variables "CenterX" and "CenterY" and radius equal to the value stored in the HTML variable "Radius".

Center = { CenterX, CenterY };

SpatialCircleFilter( INTERIOR, PointX, PointY, Center, Radius, keep);

Pass records containing, in the fields named "PointX" and "PointY", either a pair of zeros or coordinates that lie within the circle with its center at the coordinates stored in the HTML variables "CenterX" and "CenterY" and radius equal to the value stored in the HTML variable "Radius".