Enum S2ContainsPointQuery.S2VertexModel

    • Enum Constant Detail

      • OPEN

        public static final S2ContainsPointQuery.S2VertexModel OPEN
        In the OPEN model, no shapes contain their vertices (not even points). Therefore contains(S2Point) returns true if and only if the point is in the interior of some polygon.
      • SEMI_OPEN

        public static final S2ContainsPointQuery.S2VertexModel SEMI_OPEN
        In the SEMI_OPEN model, polygon point containment is defined such that if several polygons tile the region around a vertex, then exactly one of those polygons contains that vertex. Points and polylines still do not contain any vertices.
    • Method Detail

      • values

        public static S2ContainsPointQuery.S2VertexModel[] values()
        Returns an array containing the constants of this enum type, in the order they are declared. This method may be used to iterate over the constants as follows:
        for (S2ContainsPointQuery.S2VertexModel c : S2ContainsPointQuery.S2VertexModel.values())
            System.out.println(c);
        
        Returns:
        an array containing the constants of this enum type, in the order they are declared
      • valueOf

        public static S2ContainsPointQuery.S2VertexModel valueOf​(String name)
        Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)
        Parameters:
        name - the name of the enum constant to be returned.
        Returns:
        the enum constant with the specified name
        Throws:
        IllegalArgumentException - if this enum type has no constant with the specified name
        NullPointerException - if the argument is null
      • shapeContains

        public boolean shapeContains​(S2Point cellCenter,
                                     S2ShapeIndex.S2ClippedShape clipped,
                                     S2Point p)
        Returns true if the clipped portion of a shape 'clipped' from a cell with center 'cellCenter' contains the point 'p' according to this vertex model.