Fields that are within a Specified Distance from a Specified Point

DISTCARTESIAN

The DISTCARTESIAN field specifier allows you to find documents whose X/Y position is within a specified distance from a specified point.

FieldText=DISTCARTESIAN{coordX,coordY,dist}:X:Y

where:

coordX is the specified X coordinate.
coordY is the specified Y coordinate.
dist is the distance in kilometers from the specified coordinates.
X is the document field that contains the X coordinate.
Y is the document field that contains the Y coordinate.
NOTE:

You must specify two fields in the order X:Y.

Example:

FieldText=DISTCARTESIAN{10,11,5}:X:Y

This example matches all documents whose (X,Y) position is within a distance of 5 units of the point (10,11).

DISTSPHERICAL

FieldText=DISTSPHERICAL{lat,long,dist}:LATFIELD:LONGFIELD

where:

lat is the latitude. Specify latitude positions south of the equator as negative.
long is the longitude. Specify longitude positions west of the Greenwich Meridian as negative.
dist is the distance in kilometers from the specified latitude and longitude.
LATFIELD is the document field that contains the latitude.
LONGFIELD is the document field that contains the longitude.
NOTE:

You must specify two fields in the order latitude:longitude.

Example:

FieldText=DISTSPHERICAL{37.75,-122.4,20}:LAT:LONG

This example matches all documents whose position is within a 20 kilometer radius of San Francisco (37.75N,122.4W). The latitude and longitude position of a document in this example is contained in the fields LAT and LONG, respectively.


_HP_HTML5_bannerTitle.htm