PrimarySpatialRadialSearch Command |
|
Use the PrimarySpatialRadialSearch command in a Logic Template to search a primary spatial index for records containing coordinates that lie within any of the spatial grid rectangles that are touched by the circular area being searched. To obtain exact results, the records returned by the search request should then be filtered by the SpatialCircleFilter command.
Only the PrimarySpatialRadialSearch or the PrimarySpatialRectSearch commands can be used to search a primary spatial index. And, only a primary spatial index should be searched using the PrimarySpatialRadialSearch or the PrimarySpatialRectSearch command.
The results from the search of all primary indexes within a single pass are ORed together, then used to restrict the overall search results from that pass in a highly optimized manner. The restricted results from the current pass are then ORed to the results from all other passes.
To execute a Search Primary Spatial Index Radial request, use the PrimarySpatialRadialSearch command with four arguments:
PrimarySpatialRadialSearch( idx, cntr, rad, pas );
PrimarySpatialRadialSearch Arguments
Argument |
Description |
idx |
The primary spatial index to be searched. |
cntr |
The name of the HTML variable containing the coordinates of the center of the circle. |
rad |
The name of the HTML variable containing the radius of the circle. |
pas |
The pass during which the search is to be executed. |
Access the PrimarySpatialRadialSearch Dialog Box by selecting the Spatial Index->Primary Radial menu item under the Searching category of the Logic Template editor command menu.
Examples
Command |
Description |
PrimarySpatialRadialSearch( AreaIndex, Center, Radius, 1 ); |
Search primary spatial index named "AreaIndex" during pass 1. Use the coordinates stored in the HTML variable "Center" as the center and the value stored in HTML variable "Radius" as the radius and OR the results with other indexes. |
Center = { 122, 136 }; Radius = 25; PrimarySpatialRadialSearch( AreaIndex, Center, Radius, 3 ); |
Search primary spatial index named "AreaIndex" during pass 3. Use coordinates 122 and 136 as the center and the value 25 as the radius and AND the results with other indexes. |
IF ( Radius && Center ) PrimarySpatialRadialSearch( AreaIndex, Center, Radius, 1 ); ENDIF |
If the HTML variable "Radius" contains something other than zero and the HTML variable "Center" contains a pair of coordinates, search the primary spatial index named "AreaIndex" during pass 1 for the circle defined by the HTML variables "Center" and "Radius" and OR the results to other indexes. |