File tree Expand file tree Collapse file tree
street/src/main/java/org/opentripplanner/street/model/edge Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -773,7 +773,7 @@ protected void copyPropertiesToSplitEdge(
773773 );
774774
775775 StreetElevationExtensionBuilder .of (seb )
776- .withDistanceInMeters (defaultMillimeterLength ( seb . geometry ()) / 1000. )
776+ .withDistanceInMeters (toDistance - fromDistance )
777777 .withElevationProfile (partialElevationProfileFromParent )
778778 .build ()
779779 .ifPresent (seb ::withElevationExtension );
Original file line number Diff line number Diff line change @@ -43,7 +43,11 @@ public static StreetElevationExtensionBuilder of(StreetEdgeBuilder<?> seb) {
4343 }
4444
4545 public Optional <StreetElevationExtension > build () {
46- if (elevationProfileHasAtLeastTwoPoints () && (!isSlopeOverride || computed )) {
46+ if (
47+ distanceInMeters > 0.01 &&
48+ elevationProfileHasAtLeastTwoPoints () &&
49+ (!isSlopeOverride || computed )
50+ ) {
4751 return Optional .of (buildInternal ());
4852 }
4953 return Optional .empty ();
You can’t perform that action at this time.
0 commit comments