Interface S2LaxPolylineShape

    • Method Detail

      • create

        static S2LaxPolylineShape create​(java.lang.Iterable<S2Point> vertices)
        Creates a new lax polyline from the given vertices.
      • createMulti

        static S2LaxPolylineShape createMulti​(java.lang.Iterable<? extends java.lang.Iterable<S2Point>> lines)
        Creates a new lax multipolyline with the given lines.
      • filterLine

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

        static <T> java.lang.Iterable<? extends java.lang.Iterable<T>> filterLines​(java.lang.Iterable<? extends java.lang.Iterable<T>> input)
      • readResolve

        default java.lang.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 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 S2ShapeAspect.TopoAspect
      • 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.