GEOS  3.14.0dev
Public Member Functions | Static Public Member Functions | List of all members
geos::algorithm::BoundaryNodeRule Class Referenceabstract

An interface for rules which determine whether node points which are in boundaries of lineal geometry components are in the boundary of the parent geometry collection. More...

#include <BoundaryNodeRule.h>

Public Member Functions

virtual std::string toString () const =0
 
virtual bool isInBoundary (int boundaryCount) const =0
 Tests whether a point that lies in boundaryCount geometry component boundaries is considered to form part of the boundary of the parent geometry. More...
 

Static Public Member Functions

static const BoundaryNodeRulegetBoundaryRuleMod2 ()
 The Mod-2 Boundary Node Rule (which is the rule specified in the OGC SFS). More...
 
static const BoundaryNodeRulegetBoundaryEndPoint ()
 The Endpoint Boundary Node Rule. More...
 
static const BoundaryNodeRulegetBoundaryMultivalentEndPoint ()
 The MultiValent Endpoint Boundary Node Rule. More...
 
static const BoundaryNodeRulegetBoundaryMonovalentEndPoint ()
 The Monovalent Endpoint Boundary Node Rule. More...
 
static const BoundaryNodeRulegetBoundaryOGCSFS ()
 The Boundary Node Rule specified by the OGC Simple Features Specification, which is the same as the Mod-2 rule. More...
 

Detailed Description

An interface for rules which determine whether node points which are in boundaries of lineal geometry components are in the boundary of the parent geometry collection.

The SFS specifies a single kind of boundary node rule, the Mod2BoundaryNodeRule rule. However, other kinds of Boundary Node Rules are appropriate in specific situations (for instance, linear network topology usually follows the EndPointBoundaryNodeRule.) Some JTS operations allow the BoundaryNodeRule to be specified, and respect this rule when computing the results of the operation.

Author
Martin Davis
Version
1.7
See also
operation::relate::RelateOp
operation::valid::IsSimpleOp
algorithm::PointLocator

Member Function Documentation

◆ getBoundaryEndPoint()

static const BoundaryNodeRule& geos::algorithm::BoundaryNodeRule::getBoundaryEndPoint ( )
static

The Endpoint Boundary Node Rule.

A BoundaryNodeRule which specifies that any points which are endpoints of lineal components are in the boundary of the parent geometry. This corresponds to the "intuitive" topological definition of boundary. Under this rule LinearRings have a non-empty boundary (the common endpoint of the underlying LineString).

This rule is useful when dealing with linear networks. For example, it can be used to check whether linear networks are correctly noded. The usual network topology constraint is that linear segments may touch only at endpoints. In the case of a segment touching a closed segment (ring) at one point, the Mod2 rule cannot distinguish between the permitted case of touching at the node point and the invalid case of touching at some other interior (non-node) point. The EndPoint rule does distinguish between these cases, so is more appropriate for use.

◆ getBoundaryMonovalentEndPoint()

static const BoundaryNodeRule& geos::algorithm::BoundaryNodeRule::getBoundaryMonovalentEndPoint ( )
static

The Monovalent Endpoint Boundary Node Rule.

A BoundaryNodeRule which determines that only endpoints with valency of exactly 1 are on the boundary. This corresponds to the boundary of a MultiLineString being all the "unattached" endpoints.

◆ getBoundaryMultivalentEndPoint()

static const BoundaryNodeRule& geos::algorithm::BoundaryNodeRule::getBoundaryMultivalentEndPoint ( )
static

The MultiValent Endpoint Boundary Node Rule.

A BoundaryNodeRule which determines that only endpoints with valency greater than 1 are on the boundary. This corresponds to the boundary of a MultiLineString being all the "attached" endpoints, but not the "unattached" ones.

◆ getBoundaryOGCSFS()

static const BoundaryNodeRule& geos::algorithm::BoundaryNodeRule::getBoundaryOGCSFS ( )
static

The Boundary Node Rule specified by the OGC Simple Features Specification, which is the same as the Mod-2 rule.

A BoundaryNodeRule which determines that only endpoints with valency greater than 1 are on the boundary. This corresponds to the boundary of a MultiLineString being all the "attached" endpoints, but not the "unattached" ones.

◆ getBoundaryRuleMod2()

static const BoundaryNodeRule& geos::algorithm::BoundaryNodeRule::getBoundaryRuleMod2 ( )
static

The Mod-2 Boundary Node Rule (which is the rule specified in the OGC SFS).

A BoundaryNodeRule specifies that points are in the boundary of a lineal geometry iff the point lies on the boundary of an odd number of components. Under this rule LinearRings and closed LineStrings have an empty boundary.

This is the rule specified by the OGC SFS, and is the default rule used in JTS.

◆ isInBoundary()

virtual bool geos::algorithm::BoundaryNodeRule::isInBoundary ( int  boundaryCount) const
pure virtual

Tests whether a point that lies in boundaryCount geometry component boundaries is considered to form part of the boundary of the parent geometry.

Parameters
boundaryCountthe number of component boundaries that this point occurs in
Returns
true if points in this number of boundaries lie in the parent boundary

The documentation for this class was generated from the following file: