Class ContainsFunction

All Implemented Interfaces:
ADQLObject, ADQLOperand

public class ContainsFunction extends GeometryFunction

It represents the CONTAINS function of the ADQL language.

This numeric function determines if a geometry is wholly contained within another. This is most commonly used to express the "point-in-shape" condition.

Example:
CONTAINS(POINT('ICRS GEOCENTER', 25.0, -19.5), CIRCLE('ICRS GEOCENTER', 25.4, -20.0, 1)) = 1
In this example the function determines if the point (25.0,-19.5) is within a circle of one degree radius centered in a position of (25.4,-20.0).

Warning:

  • The CONTAINS function returns 1 (true) if the first argument is in or on the boundary of the circle and 0 (false) otherwise.
  • Since the two argument geometries may be expressed in different coordinate systems, the function is responsible for converting one (or both). If it can not do so, it SHOULD throw an error message, to be defined by the service making use of ADQL.

Version:
1.4 (06/2015)
Author:
Grégory Mantelet (CDS;ARI)