Commit a0d9cdd9 authored by Volker Krause's avatar Volker Krause
Browse files

Support EFA floor level difference attributes

Should be more robust than our previous attempt in recovering that
information, but isn't provided by all EFA endpoints.
parent 3bcbbd29
Pipeline #112785 passed with stage
in 2 minutes and 37 seconds
......@@ -501,6 +501,12 @@ std::vector<EfaXmlParser::PathDescription> EfaXmlParser::parsePathDescriptionLis
} else if (indoorType == QLatin1String("ESCALATOR")) {
desc.maneuver = PathSection::Escalator;
}
bool floorLevelDifferenceValid = false;
const auto floorLevelDifference = attrs.value(QStringLiteral("FLOOR_LEVEL_DIFFERENCE")).toInt(&floorLevelDifferenceValid);
if (floorLevelDifferenceValid) {
desc.niveauDelta = floorLevelDifference;
}
}
// NOTE: skyDirection seems flipped by 180°, ie. pointing to the start point, should we ever need that
// turnDirection, turningManoeuvre, from/toPathLink??
......@@ -523,7 +529,9 @@ void EfaXmlParser::resolvePathDescription(std::vector<PathDescription> &descs) c
}
const auto niveauBefore = (*std::prev(it)).niveau;
const auto niveauAfter = (*std::next(it)).niveau;
(*it).niveauDelta = niveauAfter - niveauBefore;
if (niveauAfter != niveauBefore && (*it).niveauDelta == 0) {
(*it).niveauDelta = niveauAfter - niveauBefore;
}
}
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment