Open topic with navigation

# Fields that Contain a Geospatial Region or Point

## GEOINTERSECTS

The `GEOINTERSECTS` field specifier (case sensitive) allows you to find documents that have a document field that describes a location that wholly or partially fits within a specified point or polygonal shape.

When you specify a polygon, `GEOINTERSECTS` matches points that occur within the polygon, and polygon regions that at least partially overlap it. When you specify a point, `GEOINTERSECTS` matches polygons that contain that point, and points that exactly match the point.

    FieldText=GEOINTERSECTS{POINT(coordX coordY)}:POSITION

or

    FieldText=GEOINTERSECTS{POLYGON((coordX coordY, coordX coordY,...))}:POSITION

`coordXcoordY` | The coordinates for a point or one of the vertices of a polygon. For a polygon, specify an X/Y pair of coordinates for each vertex, working either clockwise or counterclockwise around the polygon. The polygon can be concave, but the edges cannot cross themselves. The polygon can also contain holes. You can specify coordinates with decimal numbers.
`POSITION` | The document field containing the position information. This field must contain unified geospatial location information (that is, Well-known text format POINT or POLYGON definitions). You can specify multiple options for the location fields, in form `POSITION1:POSITION2:POSITION3`, and so on.

For example:

    FieldText=GEOINTERSECTS{POLYGON((1 1, -1 1, 0 -2, 1 -1))}:LOCATION

This example matches all documents whose (X,Y) position is within the quadrilateral with vertices at (1,1), (-1,1), (0,-2), (1,-1). A document returns if it has a `LOCATION` field that contains either a POINT definition that occurs within the specified quadrilateral, or a Well-known text POLYGON definition that at least partially overlaps it.

## GEOCONTAINS

The `GEOCONTAINS` field specifier (case sensitive) allows you to find documents that contain a document field that specifies a location region that contains a specified point or polygonal shape.

    FieldText=GEOCONTAINS{POINT(coordX coordY)}:POSITION

or

    FieldText=GEOCONTAINS{POLYGON((coordX coordY, coordX coordY,...))}:POSITION

`coordXcoordY` | The coordinates for a point or one of the vertices of a polygon. For a polygon, specify an X/Y pair of coordinates for each vertex, working either clockwise or counterclockwise around the polygon. The polygon can be concave, but the edges cannot cross themselves. The polygon can also contain holes. You can specify coordinates with decimal numbers.
`POSITION` | The document field containing the position information. This field must contain unified geospatial location information (that is, Well-known text format POINT or POLYGON definitions). You can specify multiple options for the location fields, in form `POSITION1:POSITION2:POSITION3`, and so on.

For example:

    FieldText=GEOCONTAINS{POINT(0 0)}:LOCATION

This example matches all documents that define a region that contains the point (0,0). A document returns if it has a `LOCATION` field that contains either a `POINT` definition that matches the query point (that is, (0,0)), or a `POLYGON` definition that contains it.

## GEOWITHIN

The `GEOWITHIN` field specifier (case sensitive) allows you to find documents that have a document field that describes a location region that wholly fits within a specified point or polygonal shape.

When you specify a polygon, `GEOWITHIN` matches points and polygons that occur wholly within the polygon. When you specify a point, `GEOWITHIN` matches only points that exactly match that point.

    FieldText=GEOWITHIN{POINT(coordX coordY)}:POSITION

or

    FieldText=GEOWITHIN{POLYGON((coordX coordY, coordX coordY,...))}:POSITION

`coordXcoordY` | The coordinates for a point or one of the vertices of a polygon. For a polygon, specify an X/Y pair of coordinates for each vertex, working either clockwise or counterclockwise around the polygon. The polygon can be concave, but the edges cannot cross themselves. The polygon can also contain holes. You can specify coordinates with decimal numbers.
`POSITION` | The document field containing the position information. This field must contain unified geospatial location information (that is, Well-known text format POINT or POLYGON definitions). You can specify multiple options for the location fields, in form `POSITION1:POSITION2:POSITION3`, and so on.

For example:

    FieldText=GEOWITHIN{POLYGON((1 1, -1 1, 0 -2, 1 -1))}:LOCATION

This example matches all documents whose (X,Y) position is within the quadrilateral with vertices at (1,1), (-1,1), (0,-2), (1,-1). A document returns if it has a `LOCATION` field that contains either a POINT or POLYOGN definition that occurs wholly within the specified quadrilateral.

© 2018 Micro Focus or one of its affiliates | Send documentation feedback to Micro Focus Close Send documentation feedback To open the configured email client on this computer, open an email window. Otherwise, copy the information below to a web mail client, and send this email to swpdl.idoldocsfeedback@microfocus.com. We appreciate your feedback! Product: Topic Title: Help Topic: Feedback:

_FT_HTML5_bannerTitle.htm