IDOL Category Component 23.4

# POLYGON

The `POLYGON` field specifier (case sensitive) allows you to find documents whose X/Y position is within a specified polygonal shape.

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. If the document contains a shape, rather than a point, the document matches only if the shape fits wholly within the polygon you specify in the query.

## Format

    FieldText=POLYGON{coordX,coordY,coordX,coordY,...}:POSITION

`coordX,coordY` | The coordinates for one of the vertices. Specify an X/Y pair of coordinates for each vertex of the polygon working either clockwise or counterclockwise around the polygon. The polygon can be concave, but the edges cannot cross themselves. You can specify coordinates with decimal numbers.
`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 unified geospatial position information (that is, 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 more than one pair of fields in the form `X1:Y1:X2:Y2` and so on. You can specify multiple options for the location fields, in form :`POSITION1:POSITION2:POSITION3`, and so on. This form can include a mix of types (unified location fields and split latitude and longitude fields). NOTE: If you use multiple position fields or field pairs, IDOL Category Component 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 Category Component does not match that document. In such cases, you can rewrite the query, in the form `POLYGON{...}:X1:Y1 OR POLYGON{...}: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.

## Example

    FieldText=POLYGON{1,1,-1,1,0,-2,1,-1}:XPOS:YPOS:POSITION

This example matches all documents whose (X,Y) position is within the quadrilateral with vertices at (1,1), (-1,1), (0,-2), (1,-1).

Copyright 2023 Open Text
Version 23.4 | Last updated September 2023

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 swpdl.idoldocsfeedback@microfocus.com.

We appreciate your feedback!

Product: IDOL IDOL Category Component 23.4

Topic Title: POLYGON