GeoRectSearch Command

Use the GeoRectSearch command in a Logic Template to search a 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.

To execute a Search Geo-Spatial Index Rectangular request, use the GeoRectSearch command with five arguments:

GeoRectSearch( fc, idx, rect, pas, wt );

GeoRectSearch Arguments

Argument

Description

fc

The function code defining how to merge results.( NONRESTRICTIVE, RESTRICTIVE )

idx

The 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.

wt

The weighting value to apply to this search. The weighting value may be passed directly or within an HTML variable.

Access the GeoRectSearch Dialog Box by selecting the Geo-Spatial Index->Rectangular menu item under the Searching category of the Logic Template editor command menu.

Examples

Command

Description

GeoRectSearch( NONRESTRICTIVE, AreaIndex, Rectangle, 1, 4 );

Search geo-spatial index named "AreaIndex" during pass 1 with a weighting value of 4. 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 }};

GeoRectSearch( RESTRICTIVE, AreaIndex, Rectangle, 3, 0 );

Search geo-spatial index named "AreaIndex" during pass 3 without a weighting value. 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};

GeoRectSearch( NONRESTRICTIVE, AreaIndex, Rectangle, 1, Weight );

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 using a weighting value stored in the HTML variable "Weight".