PrimaryGeoRectSearch Command |
|
Use the PrimaryGeoRectSearch command in a Logic Template to search a primary geo-spatial index for records containing coordinates that lie within any of the geo-spatial grid rectangles that are touched by the rectangular area being searched. To obtain exact results, the records returned by the search request should then be filtered by the GeoRectFilter command.
Only the PrimaryGeoRadialSearch or the PrimaryGeoRectSearch commands can be used to search a primary geo-spatial index. And, only a primary geo-spatial index should be searched using the PrimaryGeoRadialSearch or the PrimaryGeoRectSearch 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 Geo-Spatial Index Rectangular request, use the PrimaryGeoRectSearch command with three arguments:
PrimaryGeoRectSearch( idx, rect, pas );
PrimaryGeoRectSearch Arguments
Argument |
Description |
idx |
The primary geo-spatial index to be searched. |
rect |
The name of the HTML variable containing the coordinates of two diagonallly opposing corners of the rectangular region. |
pas |
The pass during which the search is to be executed. |
Access the PrimaryGeoRectSearch Dialog Box by selecting the Geo-Spatial Index->Primary Rectangular menu item under the Searching category of the Logic Template editor command menu.
Examples
Command |
Description |
PrimaryGeoRectSearch( AreaIndex, Rectangle, 1 ); |
Search primary geo-spatial index named "AreaIndex" during pass 1. Use the coordinates of the two diagonally opposing corners stored in the HTML variable "Rectangle" to define the rectangle and OR the results with other indexes. |
Rectangle = {{ -82.232, 30.233 }, { -81.985, 29.679 }}; PrimaryGeoRectSearch( AreaIndex, Rectangle, 3 ); |
Search primary geo-spatial index named "AreaIndex" during pass 3. Search for records within a rectangle defined by the two diagonally opposing corners with coordinates { -82.232°, 30.233° } and { -81.985°, 29.679° }, and AND the results with other indexes. |
IF ( NWcorner && SEcorner ) Rectangle = {NWcorner, SEcorner}; PrimaryGeoRectSearch( AreaIndex, Rectangle, 1 ); ENDIF |
If the HTML variables "NWcorner" and "SEcorner" are defined, search the geo-spatial index named "AreaIndex" during pass 1 for the rectangle defined by the two HTML variables and OR the results to other indexes. |