Skip to content

Commit

Permalink
Javadoc
Browse files Browse the repository at this point in the history
  • Loading branch information
dr-jts committed Aug 23, 2024
1 parent e98dcac commit 66ee453
Showing 1 changed file with 10 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,9 @@
* of the collection geometry.
* </ol>
* Prepared mode is supported via cached spatial indexes.
* <p>
* Supports specifying the {@link BoundaryNodeRule} to use
* for line endpoints.
*
* @author Martin Davis
*
Expand Down Expand Up @@ -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;
Expand Down

0 comments on commit 66ee453

Please sign in to comment.