S2PolylineVectorLayer

A layer type that assembles edges (directed or undirected) into multiple S2Polylines. Returns an error if S2Builder found any problem with the input edges; this layer type does not generate any errors of its own.

Duplicate edges are handled correctly (e.g., if a polyline backtracks on itself, or loops around and retraces some of its previous edges.) The implementation attempts to preserve the order of the input edges whenever possible, so that if the input is a polyline and it is not modified by S2Builder, then the output will be the same polyline even if the polyline forms a loop. However, note that this is not guaranteed when undirected edges are used: for example, if the input consists of a single undirected edge, then either directed edge may be returned.

Constructors

this
this(S2Polyline[]* polylines, Options options)

Specifies that a vector of polylines should be constructed using the given options.

this
this(S2Polyline[]* polylines, LabelSetIds* label_set_ids, IdSetLexicon* label_set_lexicon, Options options)

Specifies that a vector of polylines 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".

Members

Aliases

LabelSetIds
alias LabelSetIds = LabelSetId[][]
Undocumented in source.

Functions

build
void build(Graph g, S2Error error)
Undocumented in source. Be warned that the author may not have intended to support it.
graphOptions
GraphOptions graphOptions()
Undocumented in source. Be warned that the author may not have intended to support it.

Structs

Options
struct Options
Undocumented in source.

Inherited Members

From Layer

EdgeType
alias EdgeType = S2Builder.EdgeType
Undocumented in source.
GraphOptions
alias GraphOptions = .GraphOptions
Undocumented in source.
Graph
alias Graph = .Graph
Undocumented in source.
Label
alias Label = S2Builder.Label
Undocumented in source.
LabelSetId
alias LabelSetId = S2Builder.LabelSetId
Undocumented in source.
graphOptions
GraphOptions graphOptions()

Defines options for building the edge graph that is passed to Build().

build
void build(Graph g, S2Error error)

Assembles a graph of snapped edges into the geometry type implemented by this layer. If an error is encountered, sets "error" appropriately.

Meta