Interface S2LaxPolylineShape

    • Method Detail

      • filterLine

        static <T> Iterable<T> filterLine​(Iterable<T> input)
        Returns 'input' or an empty iterable if 'input' has only one vertex.
      • readResolve

        default Object readResolve()
        Canonicalize exactly empty polylines to EMPTY.
      • dimension

        default int dimension()
        Description copied from interface: S2Shape
        Returns the dimension of the geometry represented by this shape.
        • 0 - Point geometry. Each point is represented as a degenerate edge.
        • 1 - Polyline geometry. Polyline edges may be degenerate. A shape may represent any number of polylines. Polylines edges may intersect.
        • 2 - Polygon geometry. Edges should be oriented such that the polygon interior is always on the left. In theory the edges may be returned in any order, but typically the edges are organized as a collection of edge chains where each chain represents one polygon loop. Polygons may have degeneracies, e.g., degenerate edges or sibling pairs consisting of an edge and its corresponding reversed edge. A polygon loop may also be full (containing all points on the sphere); by convention this is represented as a chain with no edges.

        Note that this method allows degenerate geometry of different dimensions to be distinguished, e.g., it allows a point to be distinguished from a polyline or polygon that has been simplified to a single point.

        Specified by:
        dimension in interface S2Shape
        Specified by:
        dimension in interface com.google.common.geometry.S2ShapeAspect.TopoAspect
      • hasInterior

        default boolean hasInterior()
        Description copied from interface: S2Shape
        Returns true if this shape has an interior, i.e. the shape consists of one or more closed non-intersecting loops.
        Specified by:
        hasInterior in interface S2Shape
        Specified by:
        hasInterior in interface com.google.common.geometry.S2ShapeAspect.TopoAspect
      • containsOrigin

        default boolean containsOrigin()
        Description copied from interface: S2Shape
        Returns true if this shape contains S2.origin(). Should return false for shapes that do not have an interior.
        Specified by:
        containsOrigin in interface S2Shape
        Specified by:
        containsOrigin in interface com.google.common.geometry.S2ShapeAspect.TopoAspect
      • numEdges

        default int numEdges()
        Description copied from interface: S2Shape
        Returns the number of edges in this shape.
        Specified by:
        numEdges in interface S2Shape
        Specified by:
        numEdges in interface com.google.common.geometry.S2ShapeAspect.EdgeAspect
        Specified by:
        numEdges in interface S2ShapeAspect.EdgeAspect.Open
      • isEmpty

        default boolean isEmpty()
        Returns true unless there is at least one edge in this line.
      • isFull

        default boolean isFull()
        Returns false in all cases since a polyline may never cover the entire sphere.