RoadPolyline extends MapPolyline implements RoadSegment { @Override @Pure public final Point2d getGeoLocationForDistance(double desired_distance) { final Point2d gl = new Point2d(); getGeoLocationForDistance(desired_distance, 0., gl, null); return gl; } RoadPolyline();  RoadPolyline(AttributeCollection attributeProvider);  RoadPolyline(UUID id);  RoadPolyline(UUID id, AttributeCollection attributeProvider); @Override @Pure void toJson(JsonBuffer buffer); @Override @Pure RoadPolyline clone(); @Override @SuppressWarnings({"checkstyle:equalshashcode", "unlikely-arg-type"}) @Pure boolean equals(Object element); @Override @Pure PointFusionValidator getPointFusionValidator(); @Override @Pure StandardRoadNetwork getRoadNetwork(); @Pure @Override RoadConnection getOtherSidePoint(RoadConnection ref_point); @Pure @Override RoadConnection getBeginPoint(); @Pure @Override RoadConnection getEndPoint(); @Override @Pure Point2d getAntepenulvianPoint(); @Override @Pure Point2d getFirstPoint(); @Override @Pure Point2d getLastPoint(); @Override RoadPolyline invert(); @Override RoadPolyline invertPointsIn(int groupIndex); @Override @Pure boolean isConnectedTo(RoadSegment otherSegment); @Override @Pure boolean isTraversableFrom(RoadConnection point); @Override @Pure TrafficDirection getTrafficDirection(); @Override void setTrafficDirection(TrafficDirection direction); @Override @Pure RoadType getRoadType(); @Override void setRoadType(RoadType type); @Override @Pure String getRoadNumber(); @Override void setRoadNumber(String number); @Override @Pure String getName(); @Override void setName(String name); @Override @Pure RoadConnection getSharedConnectionWith(RoadSegment otherSegment); @Override @Pure double getDistanceFromStart(double ratio); @Override @Pure double getDistanceToEnd(double ratio); @Override @Pure Vector2d getTangentAt(double positionOnSegment); @Override void projectsOnPlane(double positionOnSegment, Point2D<?, ?> position,
			Vector2D<?, ?> tangent); @Override void projectsOnPlane(double positionOnSegment, double shiftDistance,
			Point2D<?, ?> position, Vector2D<?, ?> tangent); @Override @Pure final Point2d getGeoLocationForLocationRatio(double ratio); @Override @Pure final Point2d getGeoLocationForLocationRatio(double ratio, double shifting); @Override @Pure final void getGeoLocationForLocationRatio(double ratio, Point2D<?, ?> geoLocation); @Override @Pure final void getGeoLocationForLocationRatio(double ratio, double shifting,
			Point2D<?, ?> geoLocation); @Override @Pure final Point2d getGeoLocationForLocationRatio(double ratio, double shifting,
			Vector2D<?, ?> tangent); @Override @Pure final void getGeoLocationForLocationRatio(double ratio, double shifting,
			Point2D<?, ?> output, Vector2D<?, ?> tangent); @Override @Pure final Point2d getGeoLocationForDistance(double desired_distance); @Override @Pure final Point2d getGeoLocationForDistance(double desired_distance, double shifting); @Override @Pure Point2d getGeoLocationForDistance(double desired_distance, double shifting,
			Vector2D<?, ?> tangent); @Override @Pure final void getGeoLocationForDistance(double desired_distance, Point2D<?, ?> geoLocation); @Override @Pure final void getGeoLocationForDistance(double desired_distance, double shifting,
			Point2D<?, ?> geoLocation); @Override @Pure void getGeoLocationForDistance(double desired_distance, double shifting,
			Point2D<?, ?> geoLocation, Vector2D<?, ?> tangent); @Override @Pure List<RoadSegment> getSegmentChain(); @Override @Pure List<RoadSegment> getSegmentChain(boolean forward_search, boolean backward_search); @Override @Pure GraphIterator<RoadSegment, RoadConnection> depthIterator(
			double depth, double position_from_starting_point,
			RoadConnection starting_point, boolean allowManyReplies,
			boolean assumeOrientedSegments,
			DynamicDepthUpdater<RoadSegment, RoadConnection> dynamicDepthUpdate); @Override @Pure GraphIterator<RoadSegment, RoadConnection> iterator(
			RoadConnection starting_point, boolean allowManyReplies,
			boolean assumeOrientedSegments); @Override @Pure GraphIterator<RoadSegment, RoadConnection> iterator(); @Override @Pure boolean isFirstPointConnectedTo(Segment1D<?, ?> segment); @Override @Pure boolean isLastPointConnectedTo(Segment1D<?, ?> segment); @Override void addUserData(String id, Object data); @Override void setUserData(String id, Object data); @Override boolean removeUserData(String id, Object data); @Override void clearUserData(String id); @Override void clearUserData(); @Override @SuppressWarnings("unchecked") @Pure T getUserData(String id); @Override @Pure @SuppressWarnings("unchecked") Collection<? extends T> getUserDataCollection(String id); @Override @Pure boolean hasUserData(String id); @Override @Pure boolean containsUserData(String id, Object data); @Override @Pure int getLaneCount(); @Override @Pure double getWidth(); @Override void setWidth(double width); @Override @Pure final double distance(Point2D<?, ?> point); @Override @Pure double getLaneSize(int laneIndex); @Override @Pure double getLaneCenter(int laneIndex); @Override @Pure double getRoadBorderDistance(); @Override @Pure Direction1D getLaneDirection(int laneIndex); @Override @Pure RoadSegment getWrappedRoadSegment();  }
@Test public void testGetGeoLocationForDistance() { runTestGetGeoLocationForDistance(null); runTestGetGeoLocationForDistance(new Vector2d()); runTestGetGeoLocationForDistanceWithShift(this.testedSegment, 0., -2.); runTestGetGeoLocationForDistanceWithShift(this.testedSegment, 0., 2.); runTestGetGeoLocationForDistanceWithShift(this.testedSegment, 1., -2.); runTestGetGeoLocationForDistanceWithShift(this.testedSegment, 1., 2.); Random rnd = new Random(); double ratio, shift; for(int i=0; i<TEST_COUNT; ++i) { ratio = rnd.nextDouble(); shift = rnd.nextDouble() * SHIFTING_RANGE; runTestGetGeoLocationForDistanceWithShift(this.testedSegment, ratio, -shift); runTestGetGeoLocationForDistanceWithShift(this.testedSegment, ratio, shift); } }