com.mapinfo.midev.language.filter

## Class GeometryFilter

- java.lang.Object
- - com.mapinfo.midev.language.filter.GeometryFilter

All Implemented Interfaces:
  IFilter

    public final class GeometryFilter
    extends Object
    implements IFilter

Defines a filter that specifies features based on a spatial comparison between the values of a geometry attribute (column) and a literal `IFeatureGeometry` value. The comparison to perform is determined by the specified `GeometryOperator` enumeration value.

### Constructor Summary

Constructors
Constructor and Description
`GeometryFilter(String geometryAttributeName, GeometryOperator operator, IFeatureGeometry searchGeometry)` Create a filter based on the relationship between the values in a geometry column and a specified geometry.

### Method Summary

All Methods Static Methods Instance Methods Concrete Methods
`static GeometryFilter` `containsCentroidFilter(String geometryAttributeName, IFeatureGeometry searchGeometry)` Create a filter based on whether or not the geometry in the specified column contains the centroid of the specified geometry.
`static GeometryFilter` `containsFilter(String geometryAttributeName, IFeatureGeometry searchGeometry)` Create a filter based on whether or not the geometry in the specified column contains the specified geometry.
`static GeometryFilter` `crossesFilter(String geometryAttributeName, IFeatureGeometry searchGeometry)` Create a filter based on whether or not the geometry in the specified column crosses the specified geometry.
`static GeometryFilter` `disjointFilter(String geometryAttributeName, IFeatureGeometry searchGeometry)` Create a filter based on whether or not the geometry in the specified column is disjoint from the specified geometry.
`static GeometryFilter` `envelopesIntersectFilter(String geometryAttributeName, IFeatureGeometry searchGeometry)` Create a filter based on whether or not the envelope of the geometry in the specified column intersects the envelope of the specified geometry.
`static GeometryFilter` `equalsFilter(String geometryAttributeName, IFeatureGeometry searchGeometry)` Create a filter based on whether or not the geometry in the specified column equals the specified geometry.
`String` `getGeometryAttributeName()` Returns the name of the attribute that will be searched.
`GeometryOperator` `getGeometryOperator()` Returns the comparison test operation to be performed.
`IFeatureGeometry` `getSearchGeometryArgument()` Returns the value to be compared.
`static GeometryFilter` `intersectsEnvelopeFilter(String geometryAttributeName, IFeatureGeometry searchGeometry)` Create a filter based on whether or not the envelope of the geometry in the specified column intersects the specified geometry.
`static GeometryFilter` `intersectsFilter(String geometryAttributeName, IFeatureGeometry searchGeometry)` Create a filter based on whether or not the geometry in the specified column intersects the specified geometry.
`boolean` `isSpatial()` Returns `true`.
`static GeometryFilter` `overlapsFilter(String geometryAttributeName, IFeatureGeometry searchGeometry)` Create a filter based on whether or not the geometry in the specified column overlaps the specified geometry.
`static GeometryFilter` `touchesFilter(String geometryAttributeName, IFeatureGeometry searchGeometry)` Create a filter based on whether or not the geometry in the specified column touches the specified geometry.
`static GeometryFilter` `withinFilter(String geometryAttributeName, IFeatureGeometry searchGeometry)` Create a filter based on whether or not the geometry in the specified column is within the specified geometry.

### Methods inherited from class java.lang.Object

`equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

### Constructor Detail

#### GeometryFilter

    public GeometryFilter(String geometryAttributeName,
                          GeometryOperator operator,
                          IFeatureGeometry searchGeometry)

Create a filter based on the relationship between the values in a geometry column and a specified geometry.

Parameters:
  `geometryAttributeName` - Filter this geometry column.
  `operator` - Filter the column based on this spatial relationship.
  `searchGeometry` - Filter the column based on the specified relationship to this geometry.

### Method Detail

#### getGeometryAttributeName

    public String getGeometryAttributeName()

Returns the name of the attribute that will be searched.

Returns:
  the name of the attribute that will be searched.

#### getGeometryOperator

    public GeometryOperator getGeometryOperator()

Returns the comparison test operation to be performed.

Returns:
  the comparison test operation to be performed.

#### getSearchGeometryArgument

    public IFeatureGeometry getSearchGeometryArgument()

Returns the value to be compared.

Returns:
  the value to be compared.

#### isSpatial

    public boolean isSpatial()

Returns `true`.

Specified by:
  `isSpatial` in interface `IFilter`
Returns:
  `true`.

#### containsFilter

    public static GeometryFilter containsFilter(String geometryAttributeName,
                                                IFeatureGeometry searchGeometry)

Create a filter based on whether or not the geometry in the specified column contains the specified geometry.

Parameters:
  `geometryAttributeName` - The geometry column on which to filter.
  `searchGeometry` - The geometry on which to filter.

#### intersectsFilter

    public static GeometryFilter intersectsFilter(String geometryAttributeName,
                                                  IFeatureGeometry searchGeometry)

Create a filter based on whether or not the geometry in the specified column intersects the specified geometry.

Parameters:
  `geometryAttributeName` - The geometry column on which to filter.
  `searchGeometry` - The geometry on which to filter.

#### withinFilter

    public static GeometryFilter withinFilter(String geometryAttributeName,
                                              IFeatureGeometry searchGeometry)

Create a filter based on whether or not the geometry in the specified column is within the specified geometry.

Parameters:
  `geometryAttributeName` - The geometry column on which to filter.
  `searchGeometry` - The geometry on which to filter.

#### disjointFilter

    public static GeometryFilter disjointFilter(String geometryAttributeName,
                                                IFeatureGeometry searchGeometry)

Create a filter based on whether or not the geometry in the specified column is disjoint from the specified geometry.

Parameters:
  `geometryAttributeName` - The geometry column on which to filter.
  `searchGeometry` - The geometry on which to filter.

#### overlapsFilter

    public static GeometryFilter overlapsFilter(String geometryAttributeName,
                                                IFeatureGeometry searchGeometry)

Create a filter based on whether or not the geometry in the specified column overlaps the specified geometry.

Parameters:
  `geometryAttributeName` - The geometry column on which to filter.
  `searchGeometry` - The geometry on which to filter.

#### touchesFilter

    public static GeometryFilter touchesFilter(String geometryAttributeName,
                                               IFeatureGeometry searchGeometry)

Create a filter based on whether or not the geometry in the specified column touches the specified geometry.

Parameters:
  `geometryAttributeName` - The geometry column on which to filter.
  `searchGeometry` - The geometry on which to filter.

#### envelopesIntersectFilter

    public static GeometryFilter envelopesIntersectFilter(String geometryAttributeName,
                                                          IFeatureGeometry searchGeometry)

Create a filter based on whether or not the envelope of the geometry in the specified column intersects the envelope of the specified geometry.

Parameters:
  `geometryAttributeName` - The geometry column on which to filter.
  `searchGeometry` - The geometry on which to filter.

#### intersectsEnvelopeFilter

    public static GeometryFilter intersectsEnvelopeFilter(String geometryAttributeName,
                                                          IFeatureGeometry searchGeometry)

Create a filter based on whether or not the envelope of the geometry in the specified column intersects the specified geometry.

Parameters:
  `geometryAttributeName` - The geometry column on which to filter.
  `searchGeometry` - The geometry on which to filter.

#### equalsFilter

    public static GeometryFilter equalsFilter(String geometryAttributeName,
                                              IFeatureGeometry searchGeometry)

Create a filter based on whether or not the geometry in the specified column equals the specified geometry.

Parameters:
  `geometryAttributeName` - The geometry column on which to filter.
  `searchGeometry` - The geometry on which to filter.

#### containsCentroidFilter

    public static GeometryFilter containsCentroidFilter(String geometryAttributeName,
                                                        IFeatureGeometry searchGeometry)

Create a filter based on whether or not the geometry in the specified column contains the centroid of the specified geometry.

Parameters:
  `geometryAttributeName` - The geometry column on which to filter.
  `searchGeometry` - The geometry on which to filter.

#### crossesFilter

    public static GeometryFilter crossesFilter(String geometryAttributeName,
                                               IFeatureGeometry searchGeometry)

Create a filter based on whether or not the geometry in the specified column crosses the specified geometry.

Parameters:
  `geometryAttributeName` - The geometry column on which to filter.
  `searchGeometry` - The geometry on which to filter.