GEOS 3.14.0dev
|
#include <PolygonNodeConverter.h>
Static Public Member Functions | |
static std::vector< std::unique_ptr< NodeSection > > | convert (std::vector< const NodeSection * > &polySections) |
Converts the node sections at a polygon node where a shell and one or more holes touch, or two or more holes touch. This converts the node topological structure from the OGC "touching-rings" (AKA "minimal-ring") model to the equivalent "self-touch" (AKA "inverted/exverted ring" or "maximal ring") model. In the "self-touch" model the converted NodeSection corners enclose areas which all lies inside the polygon (i.e. they does not enclose hole edges). This allows RelateNode to use simple area-additive semantics for adding edges and propagating edge locations.
The input node sections are assumed to have canonical orientation (CW shells and CCW holes). The arrangement of shells and holes must be topologically valid. Specifically, the node sections must not cross or be collinear.
This supports multiple shell-shell touches (including ones containing holes), and hole-hole touches, This generalizes the relate algorithm to support both the OGC model and the self-touch model.
|
static |
Converts a list of sections of valid polygon rings to have "self-touching" structure. There are the same number of output sections as input ones.
polySections | the original sections |