code: public RoadPath solve(Point2D<?, ?> startPoint, Point2D<?, ?> endPoint, RoadNetwork network) {
  		assert network != null && startPoint != null && endPoint != null;
  		final RoadSegment startSegment = network.getNearestSegment(startPoint);
  		if (startSegment != null) {
  			final RoadSegment endSegment = network.getNearestSegment(endPoint);
  			if (endSegment != null) {
  				final VirtualPoint start = new VirtualPoint(startPoint, startSegment);
  				final VirtualPoint end = new VirtualPoint(endPoint, endSegment);
  				return solve(start, end);
  			}
  		}
  		return null;
  	}
docs: Run the A* algorithm from the nearest segment to
  <var>startPoint</var> to the nearest segment to
  <var>endPoint</var>.
  
  @param startPoint is the starting point.
  @param endPoint is the point to reach.
  @param network is the road network to explore.
  @return the found path, or <code>null</code> if none found.