Specifies that a polygon should be constructed using the given options.
Specifies that a polygon should be constructed using the given options, and that any labels attached to the input edges should be returned in "label_set_ids" and "label_set_lexicion".
Defines options for building the edge graph that is passed to Build().
Assembles a graph of snapped edges into the geometry type implemented by this layer. If an error is encountered, sets "error" appropriately.
A layer type that assembles edges (directed or undirected) into an S2Polygon. Returns an error if the edges cannot be assembled into loops.
If the input edges are directed, they must be oriented such that the polygon interior is to the left of all edges. Directed edges are always preferred (see S2Builder::EdgeType).
Before the edges are assembled into loops, "sibling pairs" consisting of an edge and its reverse edge are automatically removed. Such edge pairs represent zero-area degenerate regions, which S2Polygon does not allow. (If you need to build polygons with degeneracies, use LaxPolygonLayer instead.)
S2PolygonLayer is implemented such that if the input to S2Builder is a polygon and is not modified, then the output has the same cyclic ordering of loop vertices and the same loop ordering as the input polygon.
CAVEAT: Because polygons are constructed from their boundaries, this method cannot distinguish between the empty and full polygons. An empty boundary always yields an empty polygon. If the result should sometimes be the full polygon, such logic must be implemented outside of this class (and will need to consider factors other than the polygon's boundary).