
org.opentripplanner.graph_builder.module.osm.AreaTooComplicated 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.module.osm;
import org.locationtech.jts.geom.Geometry;
import org.opentripplanner.graph_builder.issue.api.DataImportIssue;
import org.opentripplanner.openstreetmap.model.OSMWithTags;
public record AreaTooComplicated(AreaGroup areaGroup, int nbNodes, int maxAreaNodes)
implements DataImportIssue {
private static final String FMT = "Area %s is too complicated (%s > %s)";
private static final String HTMLFMT = "Area '%s' is too complicated (%s > %s)";
@Override
public String getMessage() {
return String.format(FMT, areaGroup.getSomeOSMObject().getId(), nbNodes, maxAreaNodes);
}
@Override
public String getHTMLMessage() {
OSMWithTags entity = areaGroup.getSomeOSMObject();
return String.format(HTMLFMT, entity.url(), entity.getId(), nbNodes, maxAreaNodes);
}
@Override
public int getPriority() {
return nbNodes;
}
@Override
public Geometry getGeometry() {
return areaGroup.union;
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy