Commit 30af64f4 authored by Volker Krause's avatar Volker Krause
Browse files

Filter out freight terminals

parent 6e84f16c
......@@ -297,7 +297,7 @@ private Q_SLOTS:
QEXPECT_FAIL("GDN", "station/terminal proximity metric is too simple", Continue);
QEXPECT_FAIL("GLA", "airport is not a polygon in OSM", Continue);
QEXPECT_FAIL("GRU", "w777206182 interfering", Continue);
QEXPECT_FAIL("HKG", "freight terminals interfering, better station selection", Continue);
QEXPECT_FAIL("HKG", "better station selection", Continue);
QEXPECT_FAIL("LIS", "station/terminal proximity metric is too simple", Continue);
QEXPECT_FAIL("PRG", "private/military terminals 3 and 4 interfering", Continue);
QEXPECT_FAIL("PVG", "complicated", Continue);
......
......@@ -45,7 +45,19 @@ template <typename T>
static bool isTerminal(const T &elem)
{
const auto aeroway = OSM::tagValue(elem, QLatin1String("aeroway"));
return aeroway == QLatin1String("terminal");
if (aeroway != QLatin1String("terminal")) {
return false;
}
// filter out freight terminals
const auto usage = OSM::tagValue(elem, QLatin1String("usage"));
const auto traffic_mode = OSM::tagValue(elem, QLatin1String("traffic_mode"));
const auto building = OSM::tagValue(elem, QLatin1String("building"));
const auto industrial = OSM::tagValue(elem, QLatin1String("industrial"));
return usage != QLatin1String("freight")
&& traffic_mode != QLatin1String("freigt")
&& building != QLatin1String("industrial")
&& industrial.isEmpty();
}
void OSMAirportDb::load(const QString &path)
......
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