File tree Expand file tree Collapse file tree 2 files changed +7
-3
lines changed
core/src/main/java/com/graphhopper/routing
reader-osm/src/main/java/com/graphhopper/reader/osm Expand file tree Collapse file tree 2 files changed +7
-3
lines changed Original file line number Diff line number Diff line change @@ -156,7 +156,9 @@ public QueryGraph(Graph graph) {
156
156
mainNodes = graph .getNodes ();
157
157
mainEdges = graph .getAllEdges ().getMaxId ();
158
158
159
- if (mainGraph .getExtension () instanceof TurnCostExtension )
159
+ // Modification by Maxim Rylov
160
+ // if (mainGraph.getExtension() instanceof TurnCostExtension)
161
+ if (Helper .getTurnCostExtensions (mainGraph .getExtension ()) != null )
160
162
wrappedExtension = new QueryGraphTurnExt ();
161
163
else
162
164
wrappedExtension = mainGraph .getExtension ();
@@ -775,7 +777,9 @@ class QueryGraphTurnExt extends TurnCostExtension {
775
777
private final TurnCostExtension mainTurnExtension ;
776
778
777
779
public QueryGraphTurnExt () {
778
- this .mainTurnExtension = (TurnCostExtension ) mainGraph .getExtension ();
780
+ // Modification by Maxim Rylov
781
+ //this.mainTurnExtension = (TurnCostExtension) mainGraph.getExtension();
782
+ this .mainTurnExtension = Helper .getTurnCostExtensions (mainGraph .getExtension ());
779
783
}
780
784
781
785
@ Override
Original file line number Diff line number Diff line change @@ -456,7 +456,7 @@ public void processRelation(ReaderRelation relation) throws XMLStreamException {
456
456
if (relation .hasTag ("type" , "restriction" )) {
457
457
OSMTurnRelation turnRelation = createTurnRelation (relation );
458
458
if (turnRelation != null ) {
459
- GraphExtension extendedStorage = graph .getExtension ();
459
+ GraphExtension extendedStorage = Helper . getTurnCostExtensions ( graph .getExtension () );
460
460
if (extendedStorage instanceof TurnCostExtension ) {
461
461
TurnCostExtension tcs = (TurnCostExtension ) extendedStorage ;
462
462
Collection <TurnCostTableEntry > entries = analyzeTurnRelation (turnRelation );
You can’t perform that action at this time.
0 commit comments