
org.opentripplanner.graph_builder.issues.HopZeroDistance Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of otp Show documentation
Show all versions of otp Show documentation
The OpenTripPlanner multimodal journey planning system
The newest version!
package org.opentripplanner.graph_builder.issues;
import org.locationtech.jts.geom.Geometry;
import org.opentripplanner.framework.time.DurationUtils;
import org.opentripplanner.graph_builder.issue.api.DataImportIssue;
import org.opentripplanner.transit.model.site.StopLocation;
import org.opentripplanner.transit.model.timetable.Trip;
public record HopZeroDistance(
int sec,
Trip trip,
int seq,
StopLocation fromStop,
StopLocation toStop
)
implements DataImportIssue {
private static final String FMT =
"Zero-distance hop in %s on trip %s stop sequence %d between %s and %s.";
@Override
public String getMessage() {
return String.format(FMT, DurationUtils.durationToStr(sec), trip, seq, fromStop, toStop);
}
@Override
public int getPriority() {
return sec;
}
@Override
public Geometry getGeometry() {
return toStop.getGeometry();
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy