@@ -819,21 +819,22 @@ def get_route_details_for_coordinates_lngLat(
819819 f"Routes did not match! route details: { route_details_start ['Route' ]} , { route_details_end ['Route' ]} "
820820 )
821821 return route_details_start , route_details_end
822+
823+ # Update route suffixes based on directionality
824+ if not cdot_geospatial_api .GeospatialApi .is_route_dec (
825+ route_details_start ["Measure" ], route_details_end ["Measure" ]
826+ ):
827+ route_details_start ["Route" ] = route_details_start ["Route" ].replace (
828+ "_DEC" , ""
829+ )
830+ route_details_end ["Route" ] = route_details_end ["Route" ].replace ("_DEC" , "" )
822831 else :
823- if route_details_start ["Measure" ] < route_details_end ["Measure" ]:
824- route_details_start ["Route" ] = route_details_start ["Route" ].replace (
825- "_DEC" , ""
826- )
827- route_details_end ["Route" ] = route_details_end ["Route" ].replace (
828- "_DEC" , ""
829- )
830- else :
831- route_details_start ["Route" ] = (
832- route_details_start ["Route" ].replace ("_DEC" , "" ) + "_DEC"
833- )
834- route_details_end ["Route" ] = (
835- route_details_end ["Route" ].replace ("_DEC" , "" ) + "_DEC"
836- )
832+ route_details_start ["Route" ] = (
833+ route_details_start ["Route" ].replace ("_DEC" , "" ) + "_DEC"
834+ )
835+ route_details_end ["Route" ] = (
836+ route_details_end ["Route" ].replace ("_DEC" , "" ) + "_DEC"
837+ )
837838
838839 return route_details_start , route_details_end
839840
0 commit comments