use of com.revolsys.geometry.graph.filter.IsPointOnLineEdgeFilter in project com.revolsys.open by revolsys.
the class Graph method findNodes.
/**
* Find all the nodes <= the distance of the edge, that are "on" the line.
*
* @param edge The edge.
* @param distance The distance.
* @return The nodes
* @see IsPointOnLineEdgeFilter
*/
public List<Node<T>> findNodes(final Edge<T> edge, final double distance) {
final IsPointOnLineEdgeFilter<T> filter = new IsPointOnLineEdgeFilter<>(edge, distance);
final Node<T> fromNode = edge.getFromNode();
final Comparator<Node<T>> comparator = new NodeDistanceComparator<>(fromNode);
final BoundingBox boundingBox = filter.getEnvelope();
return getNodes(boundingBox, filter, comparator);
}
Aggregations