Skip to content

Commit

Permalink
Add potential optimization
Browse files Browse the repository at this point in the history
  • Loading branch information
dr-jts committed May 8, 2024
1 parent bc926e8 commit fc0261c
Showing 1 changed file with 6 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -395,7 +395,7 @@ private boolean computeAreaVertices(RelateGeometry geom, boolean isA, RelateGeom
if (! geom.hasDimension(Dimension.A)) {
return false;
}
//-- evaluate for line and area targets only, since points will be handled in the reverse direction
//-- evaluate for line and area targets only, since points are handled in the reverse direction
if (geomTarget.getDimension() < Dimension.L)
return false;

Expand All @@ -407,6 +407,11 @@ private boolean computeAreaVertices(RelateGeometry geom, boolean isA, RelateGeom
continue;

if (elem instanceof Polygon) {
//TODO: see if this optimization can be added. Will need a predicate hint function
//-- If predicate does not check interaction with Ext(! isA), disjoint elements can be skipped
//if (! elem.getEnvelopeInternal().intersects(geomTarget.getEnvelope()))
// continue;

Polygon poly = (Polygon) elem;
computeAreaVertex(geom, isA, poly.getExteriorRing(), geomTarget, topoComputer);
if (topoComputer.isResultKnown()) {
Expand Down

0 comments on commit fc0261c

Please sign in to comment.