| DIRECTION | NAME | | ONE_WAY_F | Side St | | TWO_WAY | Main St | | ONE_WAY_B | Foo St. |You could use a CaseBasedTraversalPermissionConverter to implement the following rules:
By default, all streets should be traversable by pedestrians and bicycles in both directions.
If a street's DIRECTION attribute is ONE_WAY_F, it should be traversable by cars and bikes in only the forward direction and traversable by pedestrians in both directions.
If a street's DIRECTION attribute is ONE_WAY_B, it should be traversable by cars and bikes in only the backward direction and traversable by pedestrians in both directions.
If a street's DIRECTION attribute is TWO_WAY, it should be traversable by everyone in both directions.
These rules could be implemented by configuring the converter bean as follows:{@code@see org.opentripplanner.routing.edgetype.StreetTraversalPermission}
|
|