From 66ee4538dc58b86b40ce4db02a93c66dfd9eb2e4 Mon Sep 17 00:00:00 2001 From: Martin Davis Date: Fri, 23 Aug 2024 13:37:53 -0700 Subject: [PATCH] Javadoc --- .../operation/relateng/RelatePointLocator.java | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) diff --git a/modules/core/src/main/java/org/locationtech/jts/operation/relateng/RelatePointLocator.java b/modules/core/src/main/java/org/locationtech/jts/operation/relateng/RelatePointLocator.java index 655e19d0ba..c6f63680f0 100644 --- a/modules/core/src/main/java/org/locationtech/jts/operation/relateng/RelatePointLocator.java +++ b/modules/core/src/main/java/org/locationtech/jts/operation/relateng/RelatePointLocator.java @@ -48,6 +48,9 @@ * of the collection geometry. * * Prepared mode is supported via cached spatial indexes. + *

+ * Supports specifying the {@link BoundaryNodeRule} to use + * for line endpoints. * * @author Martin Davis * @@ -144,23 +147,24 @@ public int locate(Coordinate p) { } /** - * Locates a point which is a line endpoint, - * as a {@link DimensionLocation}. - * For a mixed-dim GC, the line end point may also lie in an area, - * in which case this location is reported. - * Otherwise, the dimLoc will be either LINE_BOUNDARY + * Locates a line endpoint, as a {@link DimensionLocation}. + * In a mixed-dim GC, the line end point may also lie in an area. + * In this case the area location is reported. + * Otherwise, the dimLoc is either LINE_BOUNDARY * or LINE_INTERIOR, depending on the endpoint valence * and the BoundaryNodeRule in place. * * @param p the line end point to locate - * @return the dimension and location of the point + * @return the dimension and location of the line end point */ public int locateLineEndWithDim(Coordinate p) { + //-- if a GC with areas, check for point on area if (polygons != null) { int locPoly = locateOnPolygons(p, false, null); if (locPoly != Location.EXTERIOR) return DimensionLocation.locationArea(locPoly); } + //-- not in area, so return line end location return lineBoundary.isBoundary(p) ? DimensionLocation.LINE_BOUNDARY : DimensionLocation.LINE_INTERIOR;