GeoRectFilter Command

Use the GeoRectFilter command in a Logic Template to filter out records that on or outside the perimeter of a rectangle.

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

To execute a Geo-Spatial Rectangle Filter request, use the GeoRectFilter command with four or five arguments:

GeoRectFilter( bd, lon, lat, box ); or GeoRectFilter( bd, lon, lat, box, flag );

GeoRectFilter Arguments

Argument

Description

bd

Indicates how the boundary of the rectangle is handled.

lon

The name of the data field containing the longitude for the record being tested.

lat

The name of the data field containing the latitude for the record being tested.

box

The name of the HTML variable containing the rectangle definition.

flag

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

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

Examples

Command

Description

Region = {{LonNW, LatNW },{LonSE, LatSE}};

GeoRectFilter( INCLUDE, Longitude, Latitude, Region);

Pass records containing, in the fields named "Longitude" and "Latitude", coordinates that lie on or within a rectangular region defined by northwest coordinates stored in HTML variables "LonNW" and "LatNW" and southeast coordinates stored in HTML variables "LonSE" and "LatSE".

Region = {{LonNW, LatNW },{LonSE, LatSE}};

GeoRectFilter( INCLUDE, Longitude, Latitude, Region, keep);

Pass records containing, in the fields named "Longitude" and "Latitude", a pair of zeros or coordinates that lie on or within a rectangular region defined by northwest coordinates stored in HTML variables "LonNW" and "LatNW" and southeast coordinates stored in HTML variables "LonSE" and "LatSE".