Skip to content

Commit

Permalink
Code cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
dr-jts committed Jan 4, 2025
1 parent f226c8d commit dcb9f94
Showing 1 changed file with 0 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,6 @@
*/
class InputGeometry {

//private static final PointLocator ptLocator = new PointLocator();

private Geometry[] geom = new Geometry[2];
private PointOnGeometryLocator ptLocatorA;
private PointOnGeometryLocator ptLocatorB;
Expand Down Expand Up @@ -118,19 +116,14 @@ public int locatePointInArea(int geomIndex, Coordinate pt) {

if ( isCollapsed[geomIndex])
return Location.EXTERIOR;


//return ptLocator.locate(pt, geom[geomIndex]);

//*
// this check is required because IndexedPointInAreaLocator can't handle empty polygons
if (getGeometry(geomIndex).isEmpty()
|| isCollapsed[geomIndex])
return Location.EXTERIOR;

PointOnGeometryLocator ptLocator = getLocator(geomIndex);
return ptLocator.locate(pt);
//*/
}

private PointOnGeometryLocator getLocator(int geomIndex) {
Expand All @@ -150,5 +143,4 @@ public void setCollapsed(int geomIndex, boolean isGeomCollapsed) {
isCollapsed[geomIndex] = isGeomCollapsed;
}


}

0 comments on commit dcb9f94

Please sign in to comment.