Package org.meteoinfo.jts.algorithm
Interface BoundaryNodeRule
-
- All Known Implementing Classes:
BoundaryNodeRule.EndPointBoundaryNodeRule,BoundaryNodeRule.Mod2BoundaryNodeRule,BoundaryNodeRule.MonoValentEndPointBoundaryNodeRule,BoundaryNodeRule.MultiValentEndPointBoundaryNodeRule
public interface BoundaryNodeRuleAn interface for rules which determine whether node points which are in boundaries ofLinealgeometry components are in the boundary of the parent geometry collection. The SFS specifies a single kind of boundary node rule, theBoundaryNodeRule.Mod2BoundaryNodeRulerule. However, other kinds of Boundary Node Rules are appropriate in specific situations (for instance, linear network topology usually follows theBoundaryNodeRule.EndPointBoundaryNodeRule.) Some JTS operations (such asRelateOp,BoundaryOpandIsSimpleOp) allow the BoundaryNodeRule to be specified, and respect the supplied rule when computing the results of the operation.An example use case for a non-SFS-standard Boundary Node Rule is that of checking that a set of
LineStrings have valid linear network topology, when turn-arounds are represented as closed rings. In this situation, the entry road to the turn-around is only valid when it touches the turn-around ring at the single (common) endpoint. This is equivalent to requiring the set of LineStrings to be simple under theBoundaryNodeRule.EndPointBoundaryNodeRule. The SFS-standardBoundaryNodeRule.Mod2BoundaryNodeRuleis not sufficient to perform this test, since it states that closed rings have no boundary points.This interface and its subclasses follow the Strategy design pattern.
- See Also:
RelateOp,BoundaryOp,IsSimpleOp,PointLocator
-
-
Nested Class Summary
Nested Classes Modifier and Type Interface Description static classBoundaryNodeRule.EndPointBoundaryNodeRuleABoundaryNodeRulewhich specifies that any points which are endpoints of lineal components are in the boundary of the parent geometry.static classBoundaryNodeRule.Mod2BoundaryNodeRuleABoundaryNodeRulespecifies that points are in the boundary of a lineal geometry iff the point lies on the boundary of an odd number of components.static classBoundaryNodeRule.MonoValentEndPointBoundaryNodeRuleABoundaryNodeRulewhich determines that only endpoints with valency of exactly 1 are on the boundary.static classBoundaryNodeRule.MultiValentEndPointBoundaryNodeRuleABoundaryNodeRulewhich determines that only endpoints with valency greater than 1 are on the boundary.
-
Field Summary
Fields Modifier and Type Field Description static BoundaryNodeRuleENDPOINT_BOUNDARY_RULEThe Endpoint Boundary Node Rule.static BoundaryNodeRuleMOD2_BOUNDARY_RULEThe Mod-2 Boundary Node Rule (which is the rule specified in the OGC SFS).static BoundaryNodeRuleMONOVALENT_ENDPOINT_BOUNDARY_RULEThe Monovalent Endpoint Boundary Node Rule.static BoundaryNodeRuleMULTIVALENT_ENDPOINT_BOUNDARY_RULEThe MultiValent Endpoint Boundary Node Rule.static BoundaryNodeRuleOGC_SFS_BOUNDARY_RULEThe Boundary Node Rule specified by the OGC Simple Features Specification, which is the same as the Mod-2 rule.
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description booleanisInBoundary(int boundaryCount)Tests whether a point that lies in boundaryCount geometry component boundaries is considered to form part of the boundary of the parent geometry.
-
-
-
Field Detail
-
MOD2_BOUNDARY_RULE
static final BoundaryNodeRule MOD2_BOUNDARY_RULE
The Mod-2 Boundary Node Rule (which is the rule specified in the OGC SFS).- See Also:
BoundaryNodeRule.Mod2BoundaryNodeRule
-
ENDPOINT_BOUNDARY_RULE
static final BoundaryNodeRule ENDPOINT_BOUNDARY_RULE
The Endpoint Boundary Node Rule.
-
MULTIVALENT_ENDPOINT_BOUNDARY_RULE
static final BoundaryNodeRule MULTIVALENT_ENDPOINT_BOUNDARY_RULE
The MultiValent Endpoint Boundary Node Rule.
-
MONOVALENT_ENDPOINT_BOUNDARY_RULE
static final BoundaryNodeRule MONOVALENT_ENDPOINT_BOUNDARY_RULE
The Monovalent Endpoint Boundary Node Rule.
-
OGC_SFS_BOUNDARY_RULE
static final BoundaryNodeRule OGC_SFS_BOUNDARY_RULE
The Boundary Node Rule specified by the OGC Simple Features Specification, which is the same as the Mod-2 rule.- See Also:
BoundaryNodeRule.Mod2BoundaryNodeRule
-
-
Method Detail
-
isInBoundary
boolean isInBoundary(int boundaryCount)
Tests whether a point that lies in boundaryCount geometry component boundaries is considered to form part of the boundary of the parent geometry.- Parameters:
boundaryCount- the number of component boundaries that this point occurs in- Returns:
- true if points in this number of boundaries lie in the parent boundary
-
-