Skip to content

refactor(Geo): unify geo format system and embed minimal GDAL/PROJ#13986

Open
HTRamsey wants to merge 7 commits intomavlink:masterfrom
HTRamsey:feature/geo-updates
Open

refactor(Geo): unify geo format system and embed minimal GDAL/PROJ#13986
HTRamsey wants to merge 7 commits intomavlink:masterfrom
HTRamsey:feature/geo-updates

Conversation

@HTRamsey
Copy link
Collaborator

Summary

  • adopt map path inheritance updates: QGCMapPathBase, QGCMapPolyline, QGCMapPolygon
  • wire in geo updates and plan-shape import and export registry work
  • update geo and plan tests for new behavior
  • make GDAL always enabled via CPM using GDAL 3.12.2 with PROJ dependency
  • tighten GDAL to core-only drivers needed for this repo build profile
  • include CPM patching needed for embedded and worktree builds

Validation

  • cmake --build build -j8 --target QGroundControl

Please use this PR to validate GDAL and PROJ integration in CI across all supported platforms: Linux, macOS, Windows, Android, iOS.

Copilot AI review requested due to automatic review settings February 14, 2026 21:00
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This PR refactors the geo format system and integrates minimal GDAL/PROJ libraries for enhanced geospatial format support. The changes introduce a unified import/export registry system for handling multiple geographic file formats (KML, KMZ, GeoJSON, GPX, Shapefiles, CSV, WKT, and OpenAir), replaces direct file handling with a registry pattern, and embeds GDAL 3.12.2 with PROJ 9.7.0 via CPM for consistent cross-platform builds.

Changes:

  • Unified plan import/export system with registry-based format handling
  • Integration of GDAL 3.12.2, PROJ 9.7.0, and GEOS 3.14.1 via CPM
  • Refactored QGCMapPolygon and QGCMapPolyline to inherit from QGCMapPathBase
  • Updated tests to use new importer/exporter APIs

Reviewed changes

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

Show a summary per file
File Description
test/MissionManager/PlanImporterTest.h New test header for plan importer functionality
test/MissionManager/PlanImporterTest.cc Test implementation covering importer registration and format support
test/MissionManager/PlanExporterTest.h New test header for plan exporter functionality
test/MissionManager/PlanExporterTest.cc Test implementation for exporter validation and file operations
test/MissionManager/CMakeLists.txt Added test files to build system
test/CMakeLists.txt Registered new test targets for importers, exporters, and geo utilities
src/Utilities/JsonHelper.h Added geoJsonFormat parameter to coordinate loading/saving functions
src/Utilities/JsonHelper.cc Implemented GeoJSON coordinate format support
src/Utilities/Geo/*.{h,cc} New geo format helpers (XsdValidator, GeoValidation, GeoFileIO, etc.)
src/Utilities/Geo/CMakeLists.txt Added GDAL, PROJ, GEOS integration via CPM
src/Settings/AppSettings.h Removed deprecated kmlFileExtension and shpFileExtension constants
src/QmlControls/*.qml Updated to use new ShapeFileDialog and loadShapeFile method
src/QmlControls/QGCMapPathBase.{h,cc} New base class for polygon/polyline path handling
src/QmlControls/QGCMapPolygon.{h,cc} Refactored to inherit from QGCMapPathBase
src/QmlControls/QGCMapPolyline.{h,cc} Refactored to inherit from QGCMapPathBase
src/MissionManager/PlanShapes/** New plan importer/exporter implementations for all formats
src/MissionManager/PlanMasterController.{h,cc} Replaced saveToKml with exportToFile using registry
src/MissionManager/MissionController.{h,cc} Updated to support new export system and removed KML-specific code
src/MissionManager/*.{h,cc} Updated complex item constructors to use shapeFile parameter
cmake/patches/*.patch Added PROJ and GDAL patches for build compatibility
.clang-format Updated formatting rules for short functions and if statements
Comments suppressed due to low confidence (1)

src/Utilities/Geo/geographiclib.patch:1

  • The entire geographiclib.patch file has been deleted. If this patch was previously required for the GeographicLib dependency, ensure that the deletion doesn't break the build or that equivalent configuration has been moved elsewhere.

Comment on lines +9 to +10
constexpr const char *_gpxNamespace = "http://www.topografix.com/GPX/1/1";
constexpr const char *_gpxSchemaLocation = "http://www.topografix.com/GPX/1/1 http://www.topografix.com/GPX/1/1/gpx.xsd";
Copy link

Copilot AI Feb 14, 2026

Choose a reason for hiding this comment

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

HTTP URLs are used for namespace and schema location. Consider using HTTPS versions if available to ensure secure references, especially for schema validation.

Copilot uses AI. Check for mistakes.
Comment on lines +33 to +34
AllowShortFunctionsOnASingleLine: InlineOnly
AllowShortIfStatementsOnASingleLine: WithoutElse
Copy link

Copilot AI Feb 14, 2026

Choose a reason for hiding this comment

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

Changed from 'None'/'Never' to 'InlineOnly'/'WithoutElse'. This allows single-line inline functions and simple if statements without else clauses. Ensure the team agrees with this style change as it affects code formatting across the project.

Suggested change
AllowShortFunctionsOnASingleLine: InlineOnly
AllowShortIfStatementsOnASingleLine: WithoutElse
AllowShortFunctionsOnASingleLine: None
AllowShortIfStatementsOnASingleLine: Never

Copilot uses AI. Check for mistakes.
@HTRamsey HTRamsey force-pushed the feature/geo-updates branch from 36b060f to fcb1e7c Compare February 14, 2026 21:01
@github-actions
Copy link
Contributor

github-actions bot commented Feb 14, 2026

Build Results

Platform Status

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

Some builds failed.

Pre-commit

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

Pre-commit hooks: 12 passed, 60 failed, 3 skipped.

Artifact Sizes

Artifact Size Δ from master
QGroundControl-installer-AMD64-ARM64.exe 168.45 MB +92.96 MB (increase)
QGroundControl-installer-AMD64.exe 257.49 MB +93.93 MB (increase)
QGroundControl-installer-ARM64.exe 169.40 MB +92.95 MB (increase)
QGroundControl-mac.apk 110.57 MB
QGroundControl-windows.apk 110.61 MB
QGroundControl.apk 268.91 MB

Total size increased by 279.83 MB

Updated: 2026-02-15 06:10:45 UTC • Triggered by: Android

@HTRamsey HTRamsey force-pushed the feature/geo-updates branch 2 times, most recently from d9a0046 to ca0caec Compare February 14, 2026 22:56
@HTRamsey HTRamsey force-pushed the feature/geo-updates branch from ca0caec to d8111b7 Compare February 14, 2026 23:47
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