Commit 3b255a8b authored by DonLakeFlyer's avatar DonLakeFlyer

Better log output

parent f57d805c
......@@ -371,7 +371,7 @@ QGeoCoordinate QGCMapPolygon::vertexCoordinate(int vertex) const
if (vertex >= 0 && vertex < _polygonPath.count()) {
return _polygonPath[vertex].value<QGeoCoordinate>();
} else {
qWarning() << "QGCMapPolygon::vertexCoordinate bad vertex requested";
qWarning() << "QGCMapPolygon::vertexCoordinate bad vertex requested:count" << vertex << _polygonPath.count();
return QGeoCoordinate();
}
}
......@@ -530,6 +530,10 @@ double QGCMapPolygon::area(void) const
{
// https://www.mathopenref.com/coordpolygonarea2.html
if (_polygonPath.count() < 3) {
return 0;
}
double coveredArea = 0.0;
QList<QPointF> nedVertices = nedPolygon();
for (int i=0; i<nedVertices.count(); i++) {
......
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