Commit 91b4705e authored by Volker Krause's avatar Volker Krause
Browse files

Check the precise boundary for including terminals, not just the bbox

This removes terminal buildings from adjacent facilities from the
consideration, such as the Airbus site next to TLS, or the government
terminal next to TXL.
parent 6479a49c
......@@ -309,8 +309,6 @@ private Q_SLOTS:
QEXPECT_FAIL("PVG", "not optimized yet", Continue);
QEXPECT_FAIL("RIG", "open polygon in OSM", Continue);
QEXPECT_FAIL("SHA", "not optimized yet", Continue);
QEXPECT_FAIL("TLS", "out of bounds Airbus buildings interfering", Continue);
QEXPECT_FAIL("TXL", "not optimized yet", Continue);
QEXPECT_FAIL("SXF", "not optimized yet", Continue);
QVERIFY(d <= dist);
#endif
......
......@@ -233,6 +233,12 @@ void OSMAirportDb::loadTerminal(const OSM::Way &elem)
if (!OSM::intersects((*it).second.bbox, elem.bbox)) {
continue;
}
// check against the exact airport boundary, not just the bounding box,
// this excludes terminal buildings from adjacent sites we don't care about
// example: the Airbus delivery buildings next to TLS
if (!(*it).second.airportPolygon.intersects(QRectF(QPointF(elem.bbox.min.latF(), elem.bbox.min.lonF()), QPointF(elem.bbox.max.latF(), elem.bbox.max.lonF())))) {
continue;
}
//qDebug() << "found terminal for airport:" << elem.url() << (*it).first << (*it).second.source;
(*it).second.terminalBboxes.push_back(elem.bbox);
......
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