double lengthRatioIn = geometries.first.getLength() / totalGeomLength;
double lengthIn = street.getDistance() * lengthRatioIn;
double lengthOut = street.getDistance() * (1 - lengthRatioIn);
StreetWithElevationEdge newLeft = new PartialStreetEdge(street, fromv, base,
geometries.first, name, lengthIn);
StreetWithElevationEdge newRight = new PartialStreetEdge(street, base, tov,
geometries.second, name, lengthOut);
newLeft.setElevationProfile(ElevationUtils.getPartialElevationProfile(
street.getElevationProfile(), 0, lengthIn), false);
newLeft.setNoThruTraffic(street.isNoThruTraffic());
newLeft.setStreetClass(street.getStreetClass());
newRight.setElevationProfile(ElevationUtils.getPartialElevationProfile(
street.getElevationProfile(), lengthIn, lengthIn + lengthOut), false);
newRight.setStreetClass(street.getStreetClass());
newRight.setNoThruTraffic(street.isNoThruTraffic());
// Copy turn restrictions onto the outgoing half-edge.
for (TurnRestriction turnRestriction : graph.getTurnRestrictions(street)) {
graph.addTurnRestriction(newRight, turnRestriction);
}