com.conveyal.gtfs.validator.model.DuplicateStops Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of gtfs-lib Show documentation
Show all versions of gtfs-lib Show documentation
A library to load and index GTFS feeds of arbitrary size using disk-backed storage
package com.conveyal.gtfs.validator.model;
import com.conveyal.gtfs.model.Stop;
import java.io.Serializable;
public class DuplicateStops implements Serializable {
public Stop stop1;
public Stop stop2;
public double distance;
public DuplicateStops(Stop s1, Stop s2, double dist) {
stop1 = s1;
stop2 = s2;
distance = dist;
}
public Stop getOriginalStop () { return stop1.id < stop2.id ? stop1 : stop2; }
public Stop getDuplicatedStop () { return stop1.id > stop2.id ? stop1 : stop2; }
public String getStop1Id() {
return stop1.stop_id;
}
public String getStop2Id() {
return stop2.stop_id;
}
public String getStopIds() {
return this.getStop1Id() + "," + this.getStop2Id();
}
public String toString() {
return "Stops " + this.getStop1Id() + " and " + this.getStop2Id() + " are within " + this.distance + " meters";
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy