com.supermap.data

Class SpatialQueryMode



  • public final class SpatialQueryMode
    extends Enum
    Defines the spatial query mode constant.

    The spatial query is a query method that constructs the filter according to the spatial position relationship. For instance: through the spatial query it is able to find the spatial objects contained in the region, the spatial objects that joint or disjoint, etc.

    Note: the current version provides the spatial query to the point, line, region, network, and text type data, where the text type only supports the Intersect and Contain spatial query mode and is only able to be the searched object but the search object.

    • Field Detail

      • IDENTITY

        public static final SpatialQueryMode IDENTITY
        Identity mode. Returns objects in the searched layer that are fully overlapped with the searching object. Note: The type of the search feature must be identical with the searched features. The intersection of search and searched features should not be empty. But the boundary and interior of search feature has no intersection with the exterior of the searched feature.

        The object types supported by this relation:

          Query objects: point, line and region;
          Objects been queried: point line and region.
        Where, the search objects are in green color, the objects in the searched layer are in black color and the geometry objects of the result recordset are in red color.

      • DISJOINT

        public static final SpatialQueryMode DISJOINT
        Disjoint mode. Returns the objects which completely are separated from the searching objects in the layer that is searched. Note: The search feature and the searched features are disjoint, namely, their intersection is empty.

        The object types supported by this relation:

          Query objects: point, line and region;
          Objects been queried: point line and region.
        Where, the search objects are in green color, the objects in the searched layer are in black color and the geometry objects of the result recordset are in red color.

      • INTERSECT

        public static final SpatialQueryMode INTERSECT
        Intersect mode. Returns all the objects that intersect the search feature. Note: If the search feature is a region, returns features that are wholly or partially contained within it, and features that wholly or partially contain it; if the search feature is not a region, returns features that wholly or partially contain the search feature.

        The object types supported by this relation:

          Query objects: point, line and region;
          Objects been queried: point line and region.
        Where, the search objects are in green color, the objects in the searched layer are in black color and the geometry objects of the result recordset are in red color.

      • TOUCH

        public static final SpatialQueryMode TOUCH
        Touch mode. Returns the objects which are adjacent with the boundaries of the searching objects in the layer being searched. Note: the intersection of the query object and the object been queried are empty.

        The intersection of the search feature and the searched features is empty.

        Below is the illustration for contiguous spatial query mode. The search features are in blue color, the searched features are in black color and the output features are in red color.

      • OVERLAP

        public static final SpatialQueryMode OVERLAP
        Overlap mode. Returns the objects which partly overlay with the searching objects in the layer being searched. This query mode only applies to two situations. One is when the search feature is line while the searched features are line; the other is when the search feature is region while the searched features are regions Where,the dimensions of the output features must be consistent with the search and searched features. Note: The point has no partly overlapping with the other features. As shown below, the search objects are in green color, the objects in the searched layer are in black color and the geometry objects of the result recordset are in red color.

      • CROSS

        public static final SpatialQueryMode CROSS
        Cross mode. Returns line or region objects in the searched layer intersected with the searching line object. Note: The intersection of the interior of the search and searched features should not be empty. There must be a line feature when performing cross query operation.

        The object types supported by this relation:

          Query objects: Line;
          Objects been queried: line and region.
        As shown below, the search objects are in green color, the objects in the searched layer are in black color and the geometry objects of the result recordset are in red color.

      • WITHIN

        public static final SpatialQueryMode WITHIN
        The within spatial query mode. Returns features that wholly contain the search feature. If the output feature is a region, the search feature must be wholly inside it. If the output feature is a line, the search feature must cover the searched feature. If the output feature is a point, the search feature must overlap with it. Within mode is the opposite operation of Contain mode.

        The object type supported by this relation:

          Query object: point, line and region;
          Object been queried: point, line and region.
        Note: There is no within relationship if query point with line or region, or query line with region. Below is the illustration for searching region with point. The search objects are in green color, the objects in the searched layer are in black color and the geometry objects of the result recordset are in red color.

      • CONTAIN

        public static final SpatialQueryMode CONTAIN
        Contain mode. Returns the objects which are completely contained in the search objects in the layer being searched. Note: The intersection of interiors of the search feature and searched features should not be empty. There is no containing query operation when using line to query region or using point to query the line or region.

        The object types supported by this relation:

          Query objects: point, line and region;
          Objects been queried: point line and region.
        Where, the search objects are in green color, the objects in the searched layer are in black color and the geometry objects of the result recordset are in red color.