Pairing InstructionList with PointList (Elevation with Distance)


In a previous thread I included elevation data within my data and I am now looking into pairing this with distance of points.

This currently outputs each points altitude.

    for (int i = 0; i < pointList.getSize(); i++) {
                alt = pointList.getElevation(i);
                System.out.println(alt + " Meters");

I would then like to pair this with distance, althought pointList does not contain getDistance.
Is it a case of instead using the InstructionList to match the points list?

If correct would I use paths[0].instructions[0].sign where REACHED_VIA = 5 ??
eg. alt = pointList.getElevation(1); = my second request.addPoint(new GHPoint(Lat,Long));

So I could say pointList.getElevation(0) - pointList.getElevation(1) = 1m
instructions.sign = 5 then instruction.getDistance() = 15m

This would give me distance between points that can be match with the points elevation to calculate the rough gradient between the two points?

Or am I far off the mark?

I think for my purposes I will simplify it and use;

for(Instruction instruction : il) {
           System.out.println(instruction.getDistance() + " Meters");
           System.out.println(instruction.getPoints().getElevation(0) + " Meters");
           //if(instruction.getSign() == 5){
           //    System.out.println("Delivery");

Happy to get guidance if this is wrong.

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

Powered by Discourse