
org.opentripplanner.graph_builder.issues.DisconnectedOsmNode 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.geometry.GeometryUtils;
import org.opentripplanner.graph_builder.issue.api.DataImportIssue;
import org.opentripplanner.openstreetmap.model.OSMNode;
import org.opentripplanner.openstreetmap.model.OSMWithTags;
public record DisconnectedOsmNode(OSMNode node, OSMWithTags way, OSMWithTags area)
implements DataImportIssue {
private static final String FMT = "Node %s in way %s is coincident but disconnected with area %s";
private static final String HTMLFMT =
"Node'%s' in way '%s' is coincident but disconnected with area '%s'";
@Override
public String getMessage() {
return String.format(FMT, node.getId(), way.getId(), area.getId());
}
@Override
public String getHTMLMessage() {
return String.format(
HTMLFMT,
node.url(),
node.getId(),
way.url(),
way.getId(),
area.url(),
area.getId()
);
}
@Override
public Geometry getGeometry() {
return GeometryUtils.getGeometryFactory().createPoint(node.getCoordinate());
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy