Skip to content

feat(Survey): split transects at concave polygon boundaries - #15011

Open
HTRamsey wants to merge 2 commits into
mavlink:masterfrom
HTRamsey:feat/split-concave-survey-transects
Open

feat(Survey): split transects at concave polygon boundaries#15011
HTRamsey wants to merge 2 commits into
mavlink:masterfrom
HTRamsey:feat/split-concave-survey-transects

Conversation

@HTRamsey

Copy link
Copy Markdown
Member

Summary

  • enable the existing SplitConcavePolygons survey option and expose it in the survey editor
  • split each survey grid line into all continuous intersections with a concave polygon, while preserving an efficient alternating transect order
  • add a shared QGCPolygonClipper geometry adapter backed by Clipper2 2.0.1
  • replace private Qt Positioning clipping and the map polygon/polyline brute-force offset implementations
  • reuse the shared polygon and polyline operations for corridor buffers and guard degenerate offset results

Validation

  • JOBS=10 just build
  • focused geometry and mission tests: 6/6 passed
  • full Unit label: 261/262 passed; the only failure was the environment-dependent BluetoothWorkerTest reacting to local BlueZ Device is powered off warnings
  • scoped formatting, logging, assertion, fixed-wait, and test-message checks passed for the new geometry code

Copilot AI balanced review requested due to automatic review settings August 31, 2026 23:41

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Adds concave survey transect splitting and centralizes polygon/polyline geometry operations using Clipper2.

Changes:

  • Adds shared clipping, offset, and buffering utilities.
  • Enables split concave survey transects with updated route ordering.
  • Adds geometry and mission-planning tests.

Reviewed changes

Copilot reviewed 20 out of 20 changed files in this pull request and generated 2 comments.

Show a summary per file
File Description
test/Utilities/Geo/PolygonClipperTest.h Declares geometry tests.
test/Utilities/Geo/PolygonClipperTest.cc Tests clipping, offsets, and buffers.
test/Utilities/Geo/CMakeLists.txt Registers geometry tests.
test/MissionManager/SurveyComplexItemTest.h Declares concave survey test.
test/MissionManager/SurveyComplexItemTest.cc Tests split transect generation.
test/MissionManager/QGCMapPolylineTest.h Declares polyline offset test.
test/MissionManager/QGCMapPolylineTest.cc Tests geographic polyline offsets.
test/MissionManager/QGCMapPolygonTest.h Declares polygon offset test.
test/MissionManager/QGCMapPolygonTest.cc Tests polygon expansion.
src/Utilities/Geo/QGCPolygonClipper.h Defines shared geometry API.
src/Utilities/Geo/QGCPolygonClipper.cc Implements Clipper2 geometry operations.
src/Utilities/Geo/CMakeLists.txt Adds Clipper2 and geometry sources.
src/QmlControls/QGCMapPolyline.cc Uses shared polyline offsets.
src/QmlControls/QGCMapPolygon.cc Uses shared polygon offsets.
src/PlanView/SurveyItemEditor.qml Exposes concave splitting option.
src/MissionManager/SurveyComplexItem.h Updates transect grouping interface.
src/MissionManager/SurveyComplexItem.cc Generates and orders split transects.
src/MissionManager/Survey.SettingsGroup.json Enables and describes the setting.
src/MissionManager/CorridorScanComplexItem.cc Uses shared corridor buffering and offsets.
src/CMakeLists.txt Removes private Positioning linkage.

💡 Add a code-review agent skill for context-aware, tailored reviews. Learn more in the docs.

Comment thread src/Utilities/Geo/QGCPolygonClipper.cc Outdated
}

Clipper2Lib::Clipper64 clipper;
clipper.AddOpenSubject({{toClipperPoint(normalizedLineStart), toClipperPoint(normalizedLineEnd)}});
_surveyItem->flyAlternateTransects()->setRawValue(false);
ignoreLogMessage("Plan.SurveyComplexItem", QtWarningMsg, QRegularExpression("Transect spacing.*raised"));
_surveyItem->cameraCalc()->adjustedFootprintSide()->setRawValue(0.001);
QVERIFY(_surveyItem->_transectCount() <= TransectStyleComplexItem::maxTransectCount);
@codecov

codecov Bot commented Sep 1, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 50.00000% with 296 lines in your changes missing coverage. Please review.
✅ Project coverage is 34.66%. Comparing base (f29efd3) to head (c090e06).
⚠️ Report is 348 commits behind head on master.

Files with missing lines Patch % Lines
src/Utilities/Geo/QGCPolygonClipper.cc 56.46% 40 Missing and 135 partials ⚠️
src/MissionManager/SurveyComplexItem.cc 41.22% 8 Missing and 69 partials ⚠️
src/MissionManager/CorridorScanComplexItem.cc 17.39% 6 Missing and 13 partials ⚠️
src/QmlControls/QGCMapPolygon.cc 27.27% 4 Missing and 12 partials ⚠️
src/QmlControls/QGCMapPolyline.cc 35.71% 1 Missing and 8 partials ⚠️
Additional details and impacted files

Impacted file tree graph

@@            Coverage Diff             @@
##           master   #15011      +/-   ##
==========================================
+ Coverage   25.47%   34.66%   +9.19%     
==========================================
  Files         769      946     +177     
  Lines       65912    85918   +20006     
  Branches    30495    39608    +9113     
==========================================
+ Hits        16788    29780   +12992     
+ Misses      37285    36324     -961     
- Partials    11839    19814    +7975     
Flag Coverage Δ
unittests 34.66% <50.00%> (+9.19%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

Files with missing lines Coverage Δ
src/MissionManager/SurveyComplexItem.h 35.71% <ø> (+7.14%) ⬆️
src/QmlControls/QGCMapPolyline.cc 38.61% <35.71%> (+2.31%) ⬆️
src/QmlControls/QGCMapPolygon.cc 37.91% <27.27%> (+1.40%) ⬆️
src/MissionManager/CorridorScanComplexItem.cc 32.23% <17.39%> (+10.42%) ⬆️
src/MissionManager/SurveyComplexItem.cc 29.49% <41.22%> (+7.42%) ⬆️
src/Utilities/Geo/QGCPolygonClipper.cc 56.46% <56.46%> (ø)

... and 655 files with indirect coverage changes


Continue to review full report in Codecov by Harness.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 2d7cf8c...c090e06. Read the comment docs.

🚀 New features to boost your workflow:
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@github-actions

github-actions Bot commented Sep 1, 2026

Copy link
Copy Markdown
Contributor

Build Results

Platform Status

Platform Status Details
Linux Passed View
Windows Passed View
MacOS Passed View
Android Passed View

All builds passed.

Pre-commit

Check Status Details
pre-commit Failed (non-blocking) View

Pre-commit hooks: 2 passed, 75 failed, 7 skipped.

Test Results

linux-coverage-integration: 51 passed, 0 skipped
linux-coverage-unit: 185 passed, 0 skipped
linux-sanitizers-integration: 30 passed, 0 skipped
linux-sanitizers-unit: 185 passed, 0 skipped
Total: 451 passed, 0 skipped

Code Coverage

Coverage: 70.7%

No baseline available for comparison

Artifact Sizes

Artifact Size
QGroundControl 253.23 MB
QGroundControl-aarch64 177.47 MB
QGroundControl-installer-AMD64 139.33 MB
QGroundControl-installer-AMD64-ARM64 81.80 MB
QGroundControl-installer-ARM64 110.55 MB
QGroundControl-linux 84.81 MB
QGroundControl-mac 84.81 MB
QGroundControl-x86_64 189.74 MB
No baseline available for comparison

Updated: 2026-09-01 07:02:49 UTC • Commit: c090e06 • Triggered by: Linux

@HTRamsey
HTRamsey force-pushed the feat/split-concave-survey-transects branch from cb79496 to c090e06 Compare September 1, 2026 05:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants