Elevations no longer showing in graphhopper 1.0 (resolved)

Hiyas,
Upgrading to 1.0 I have noticed that I no longer get elevation data in my paths, where previously it was.

graphHopper.setElevation(true)
graphHopper.setElevationProvider(new CGIARProvider().setBaseURL("C:/Users/"))

Then

GHResponse route = graphHopper.route(request);
   
//Get the best route
    ResponsePath path = route.getBest();

    //Setup instructions of that path
    InstructionList il = path.getInstructions();
    List<Double> instruction_Distances = new ArrayList();
    List<Double> instruction_Elevations = new ArrayList();

    // iterate over turn instructions
    for(Instruction instruction : il) {
        instruction_Elevations.add(instruction.getPoints().getElevation(0));
        instruction_Distances.add(instruction.getDistance());
    }

Everything has an Elevation of 0.0. Is there a new way of getting elevation data?

Finally resolved it.

Where I presumed setting the BaseURL set where the elevation data was kept, this is not the case.
It should just be setup as graphHopper.setElevationProvider(new CGIARProvider(“C:/Users/”))

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.