IDOL Server 24.4
IDOL Server Help

# DISTCARTESIAN

The `DISTCARTESIAN` field specifier allows you to find documents that define a location that is within a specified distance from a specified point.

You can specify the document location using either a pair of fields (corresponding to X and Y coordinates), or a unified GeospatialType field that contains a supported geometric shape in Well-Known Text format.

TIP: If your document location field contains any shape other than a point, IDOL calculates distances from the geometric center of the shape.

## Format

    FieldText=DISTCARTESIAN{coordX,coordY,dist}:POSITION

`coordX` | The specified x coordinate.
`coordY` | The specified y coordinate.
`dist` | The distance in units from the specified x/y coordinates.
`POSITION` | The document field or fields that contain the position value. You can use one of the following options to specify location fields: a single field. This field must contain a supported well-known text geometric object. See Supported Well-Known Text Geometric Objects. two fields, in the format `X:Y`, where `X` is the field that contains the x coordinate, and `Y` is the field that contains the y coordinate. You must specify the fields in the order `x:y`. You can specify multiple options for the location fields, in the form `POSITION1:POSITION2:POSITION3`, and so on. This form can include a mix of types (unified location fields and split X and Y coordinate fields). NOTE: If you use multiple position fields or field pairs, IDOL Server cannot match documents where a pair of split geospatial fields occurs interleaved with other geospatial fields. For example, if you use `X1:Y1:POSITION` in your query, and these fields occur in a document in the order `X1`, `POSITION`, `Y1`, IDOL Server does not match that document. In such cases, you can rewrite the query, in the form `DISTCARTESIAN{...}:X1:Y1 OR DISTCARTESIAN{...}:POSITION`

NOTE: You can optimize this field specifier by configuring your coordinate fields with the GeospatialType or NumericType property types. If you want to use a single field with well-known text definitions, you can optimize the field specifier only by using the unified GeospatialType property.

## Examples

    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). The position of a document in this example is contained in the fields `X` and `Y`.

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

This example matches all documents whose (X,Y) position is within a distance of 5 units of the point (10,11). The position of a document in this example is contained in either the (unified) `POSITION` field, or the separate `X` and `Y` fields.

Copyright 2024 Open Text
Version 24.4 | Last updated September 2024

Send documentation feedback

Close

Send documentation feedback

To send feedback using your default email client, open an email window.

Otherwise, send your feedback and the information below to MFI-swpdl.idoldocsfeedback@opentext.com.

We appreciate your feedback!

Product: IDOL Server 24.4

Topic Title: DISTCARTESIAN