Skip to content

Commit

Permalink
Javadoc
Browse files Browse the repository at this point in the history
  • Loading branch information
dr-jts committed Apr 8, 2024
1 parent a4f87c9 commit 9fb19d3
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 12 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -57,10 +57,11 @@ public RelateNode createNode() {
while (i < sections.size()) {
int blockSize = 1;
NodeSection ns = sections.get(i);
//-- are there multiple polygon sections incident at node?
if (ns.isArea() && hasMultiplePolygonSections(sections, i)) {
List<NodeSection> polySections = collectPolygonSections(sections, i);
List<NodeSection> nsInvert = PolygonNodeConverter.convert(polySections);
node.addEdges(nsInvert);
List<NodeSection> nsConvert = PolygonNodeConverter.convert(polySections);
node.addEdges(nsConvert);
blockSize = polySections.size();
}
else {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,16 +27,16 @@
* which all lies inside the polygon
* (i.e. they does not enclose hole edges).
* This allows a simple area-additive semantics to be used
* for adding edges and propagating edge locations
* in {@link RelateNode}.
* in {@link RelateNode}
* for adding edges and propagating edge locations.
* <p>
* The arrangement of shells and holes must be topologically valid.
* I.e. the node sections must not cross.
* 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.
* <p>
* This also supports multiple shell-shell touches
* (including ones containing holes) and hold-hole 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.
*
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -151,7 +151,7 @@ public void finish() {
predicate.finish();
}

private NodeSections getNode(Coordinate nodePt) {
private NodeSections getNodeSections(Coordinate nodePt) {
NodeSections node = nodeMap.get(nodePt);
if (node == null) {
node = new NodeSections(nodePt);
Expand All @@ -170,10 +170,10 @@ public void addIntersection(NodeSection a, NodeSection b) {
addNodeSections(a, b);
}

private void addNodeSections(NodeSection e0, NodeSection e1) {
NodeSections node = getNode(e0.nodePt());
node.addNodeSection(e0);
node.addNodeSection(e1);
private void addNodeSections(NodeSection ns0, NodeSection ns1) {
NodeSections sections = getNodeSections(ns0.nodePt());
sections.addNodeSection(ns0);
sections.addNodeSection(ns1);
}

private void updateABIntersection(NodeSection a, NodeSection b) {
Expand Down

0 comments on commit 9fb19d3

Please sign in to comment.