updateNearestLocationsLineLine method
void
updateNearestLocationsLineLine(
- int i,
- Coordinate p0,
- Coordinate p1,
- FacetSequence facetSeq,
- int j,
- Coordinate q0,
- Coordinate q1,
- List<
GeometryLocation?> ? locs,
Implementation
void updateNearestLocationsLineLine(
int i,
Coordinate p0,
Coordinate p1,
FacetSequence facetSeq,
int j,
Coordinate q0,
Coordinate q1,
List<GeometryLocation?>? locs) {
LineSegment seg0 = LineSegment.fromCoordinates(p0, p1);
LineSegment seg1 = new LineSegment.fromCoordinates(q0, q1);
List<Coordinate> closestPt = seg0.closestPoints(seg1);
if(locs != null) {
locs[0] =
GeometryLocation(geom!, i, Coordinate.fromCoordinate(closestPt[0]));
locs[1] = GeometryLocation(
facetSeq.geom!, j, new Coordinate.fromCoordinate(closestPt[1]));
}
}