refactor(Geo): unify geo format system and embed minimal GDAL/PROJ#13986
refactor(Geo): unify geo format system and embed minimal GDAL/PROJ#13986HTRamsey wants to merge 7 commits intomavlink:masterfrom
Conversation
There was a problem hiding this comment.
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.
| 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"; |
There was a problem hiding this comment.
HTTP URLs are used for namespace and schema location. Consider using HTTPS versions if available to ensure secure references, especially for schema validation.
| AllowShortFunctionsOnASingleLine: InlineOnly | ||
| AllowShortIfStatementsOnASingleLine: WithoutElse |
There was a problem hiding this comment.
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.
| AllowShortFunctionsOnASingleLine: InlineOnly | |
| AllowShortIfStatementsOnASingleLine: WithoutElse | |
| AllowShortFunctionsOnASingleLine: None | |
| AllowShortIfStatementsOnASingleLine: Never |
36b060f to
fcb1e7c
Compare
Build ResultsPlatform Status
Some builds failed. Pre-commit
Pre-commit hooks: 12 passed, 60 failed, 3 skipped. Artifact Sizes
Total size increased by 279.83 MBUpdated: 2026-02-15 06:10:45 UTC • Triggered by: Android |
d9a0046 to
ca0caec
Compare
ca0caec to
d8111b7
Compare
Summary
Validation
Please use this PR to validate GDAL and PROJ integration in CI across all supported platforms: Linux, macOS, Windows, Android, iOS.