File tree Expand file tree Collapse file tree 3 files changed +9
-2
lines changed
web/src/test/java/com/graphhopper/http/resources
web-bundle/src/main/java/com/graphhopper/resources Expand file tree Collapse file tree 3 files changed +9
-2
lines changed Original file line number Diff line number Diff line change @@ -76,6 +76,9 @@ public Response doGet(
76
76
RouteResource .initHints (hintsMap , uriInfo .getQueryParameters ());
77
77
hintsMap .putObject (Parameters .CH .DISABLE , true );
78
78
hintsMap .putObject (Parameters .Landmark .DISABLE , true );
79
+ // make sure to explicitly disable turn costs when resolving the profile, otherwise it might be true depending
80
+ // on the encoder
81
+ hintsMap .putObject (Parameters .Routing .EDGE_BASED , false );
79
82
ProfileConfig profile = graphHopper .resolveProfile (hintsMap );
80
83
if (profile .isTurnCosts ()) {
81
84
throw new IllegalArgumentException ("Isochrone calculation does not support turn costs yet" );
Original file line number Diff line number Diff line change @@ -64,6 +64,9 @@ public Response doGet(
64
64
RouteResource .initHints (hintsMap , uriInfo .getQueryParameters ());
65
65
hintsMap .putObject (Parameters .CH .DISABLE , true );
66
66
hintsMap .putObject (Parameters .Landmark .DISABLE , true );
67
+ // make sure to explicitly disable turn costs when resolving the profile, otherwise it might be true depending
68
+ // on the encoder
69
+ hintsMap .putObject (Parameters .Routing .EDGE_BASED , false );
67
70
ProfileConfig profile = graphHopper .resolveProfile (hintsMap );
68
71
if (profile .isTurnCosts ()) {
69
72
throw new IllegalArgumentException ("SPT calculation does not support turn costs yet" );
Original file line number Diff line number Diff line change 21
21
import com .fasterxml .jackson .databind .JsonNode ;
22
22
import com .graphhopper .http .GraphHopperApplication ;
23
23
import com .graphhopper .http .util .GraphHopperServerTestConfiguration ;
24
- import static com .graphhopper .http .util .TestUtils .clientTarget ;
25
24
import com .graphhopper .json .geo .JsonFeatureCollection ;
26
25
import com .graphhopper .util .Helper ;
27
26
import io .dropwizard .testing .junit .DropwizardAppRule ;
35
34
import javax .ws .rs .core .Response ;
36
35
import java .io .File ;
37
36
37
+ import static com .graphhopper .http .util .TestUtils .clientTarget ;
38
38
import static com .graphhopper .util .Parameters .Routing .BLOCK_AREA ;
39
39
import static junit .framework .TestCase .assertFalse ;
40
40
import static junit .framework .TestCase .assertTrue ;
@@ -47,7 +47,8 @@ public class IsochroneResourceTest {
47
47
48
48
static {
49
49
config .getGraphHopperConfiguration ().
50
- putObject ("graph.flag_encoders" , "car" ).
50
+ // isochrone does not support turn costs yet, but use it anyway to make sure this is handled correctly
51
+ putObject ("graph.flag_encoders" , "car|turn_costs=true" ).
51
52
putObject ("datareader.file" , "../core/files/andorra.osm.pbf" ).
52
53
putObject ("graph.location" , DIR );
53
54
}
You can’t perform that action at this time.
0 commit comments