-
-
Notifications
You must be signed in to change notification settings - Fork 4.6k
refactor(Geo): Comprehensive geo format system with unified registry #13887
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
refactor(Geo): Comprehensive geo format system with unified registry #13887
Conversation
There was a problem hiding this 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 file handling system with a unified GeoFormatRegistry for centralized format detection and dispatching. The refactoring reorganizes format-specific code into subdirectories (KML/, GeoJSON/, GPX/, SHP/, etc.) and adds support for new formats (CSV, WKT, WKB, GeoPackage, OpenAir). A unified PlanImporter/PlanExporter system with format-specific implementations replaces the previous ad-hoc approach.
Changes:
- Introduced GeoFormatRegistry for centralized format handling and auto-detection
- Reorganized geo helpers into format-specific subdirectories with consistent interfaces
- Added PlanImporter/PlanExporter abstraction with singleton implementations per format
- Fixed
filterMetersparameter propagation and altitude validation test thresholds - Renamed
loadKMLOrSHPFile()toloadShapeFile()for broader format support
Reviewed changes
Copilot reviewed 140 out of 152 changed files in this pull request and generated no comments.
Show a summary per file
| File | Description |
|---|---|
| test/Utilities/Geo/GeoTest.cc | Removed comment explaining tolerance threshold |
| test/Utilities/Geo/CMakeLists.txt | Added GeoUtilitiesTest sources and test resources |
| test/UnitTestList.cc | Registered new test classes (GeoUtilitiesTest, PlanImporter/ExporterTest) |
| test/MissionManager/QGCMapPolylineTest.cc | Updated to use renamed loadShapeFile() method |
| test/MissionManager/QGCMapPolygonTest.cc | Updated to use renamed loadShapeFile() method |
| test/MissionManager/PlanImporterTest.h | New test class for PlanImporter functionality |
| test/MissionManager/PlanExporterTest.h | New test class for PlanExporter functionality |
| test/MissionManager/CMakeLists.txt | Added PlanImporter/ExporterTest sources |
| src/Utilities/JsonHelper.h | Added geoJsonFormat parameter to coordinate array functions |
| src/Utilities/JsonHelper.cc | Implemented GeoJSON coordinate format support |
| src/Utilities/Geo/XsdValidator.h | New base class for XSD-based XML validators |
| src/Utilities/Geo/XsdValidator.cc | Implementation of XSD validator with schema parsing |
| src/Utilities/Geo/WKB/WKBHelper.h | New WKB (Well-Known Binary) format support |
| src/Utilities/Geo/ShapeFileHelper.* | Removed (replaced by GeoFormatRegistry) |
| src/Utilities/Geo/SHPFileHelper.h | Removed (replaced by SHP/SHPHelper) |
| src/Utilities/Geo/SHP/SHPHelper.h | New SHP helper with expanded API |
| src/Utilities/Geo/OpenAir/OpenAirParser.h | New OpenAir airspace format parser |
| src/Utilities/Geo/KMLSchemaValidator.* | Removed (replaced by KML/KMLSchemaValidator) |
| src/Utilities/Geo/KML/KMLSchemaValidator.* | New KML validator extending XsdValidator |
| src/Utilities/Geo/KML/KMLDomDocument.cc | Updated logging category name |
| src/Utilities/Geo/GeoValidation.* | New unified validation result structure |
| src/Utilities/Geo/GeoPackage/GeoPackageHelper.h | New GeoPackage format support |
| src/Utilities/Geo/GeoJsonHelper.* | Removed (replaced by GeoJSON/GeoJsonHelper) |
| src/Utilities/Geo/GeoJSON/GeoJsonHelper.h | New GeoJSON helper with expanded API |
| src/Utilities/Geo/GeoFileIO.h | New file I/O utilities for various formats |
| src/Utilities/Geo/GPX/GPXSchemaValidator.* | New GPX validator extending XsdValidator |
| src/Utilities/Geo/GPX/GPXHelper.h | New GPX format helper |
| src/Utilities/Geo/CSV/CSVHelper.* | New CSV format support |
| src/Utilities/Geo/CMakeLists.txt | Reorganized sources into format subdirectories |
| src/Settings/AppSettings.h | Removed kmlFileExtension and shpFileExtension constants |
| src/QmlControls/ShapeFileDialog.qml | New unified shape file dialog |
| src/QmlControls/QGCMapPolyline.* | Renamed loadKMLOrSHPFile() to loadShapeFile() |
| src/QmlControls/QGCMapPolygon.* | Renamed loadKMLOrSHPFile() to loadShapeFile(), removed KML-specific methods |
| src/QmlControls/PlanView.qml | Updated to use GeoFormatRegistryQml |
| src/QmlControls/KMLOrSHPFileDialog.qml | Updated to use GeoFormatRegistryQml filters |
| src/QmlControls/CMakeLists.txt | Replaced KMLOrSHPFileDialog.qml with ShapeFileDialog.qml |
| src/MissionManager/TransectStyleComplexItem.* | Removed addKMLVisuals() method |
| src/MissionManager/SurveyComplexItem.* | Renamed parameter kmlOrShpFile to shapeFile |
| src/MissionManager/StructureScanComplexItem.* | Renamed parameter kmlOrShpFile to shapeFile |
| src/MissionManager/PlanShapes/WKT/* | New WKT format plan importer/exporter/document |
| src/MissionManager/PlanShapes/SHP/* | New SHP format plan importer/exporter/document |
| src/MissionManager/PlanShapes/PlanStatistics.* | New plan statistics and analysis utility |
| src/MissionManager/PlanShapes/PlanImporter.* | New base class for plan importers with registry |
| src/MissionManager/PlanShapes/PlanExporter.* | New base class for plan exporters with registry |
| src/MissionManager/PlanShapes/PlanDocument.* | New base class for plan document exporters |
| src/MissionManager/PlanShapes/OpenAir/* | New OpenAir format plan importer |
| src/MissionManager/PlanShapes/KML/* | New KML/KMZ plan importer/exporter/document |
| src/MissionManager/PlanShapes/GeoPackage/* | New GeoPackage plan importer/exporter/document |
| src/MissionManager/PlanShapes/GeoJSON/* | New GeoJSON plan importer/exporter/document |
| src/MissionManager/PlanShapes/GeoFormatPlanImporter.* | New generic plan importer using GeoFormatRegistry |
| src/MissionManager/PlanShapes/GPX/* | New GPX plan importer/exporter/document |
| src/MissionManager/PlanShapes/CSV/* | New CSV plan importer/exporter/document |
| src/MissionManager/PlanMasterController.* | Replaced saveToKml() with exportToFile(), updated API |
| src/MissionManager/MissionController.* | Removed addMissionToKML(), added export-oriented methods |
| src/MissionManager/CorridorScanComplexItem.* | Renamed parameter kmlOrShpFile to shapeFile |
| src/MissionManager/ComplexMissionItem.* | Removed addKMLVisuals() method |
| src/MissionManager/CMakeLists.txt | Added all PlanShapes sources with format subdirectories |
| src/FlightMap/MapItems/QGCMapPolylineVisuals.qml | Updated to use ShapeFileDialog |
| src/FlightMap/MapItems/QGCMapPolygonVisuals.qml | Updated to use ShapeFileDialog |
Build ResultsPlatform Status
All builds passed. Test Resultslinux_gcc_64: 691 passed, 1 skipped Total: 691 passed, 1 skipped Code CoverageCoverage: 100.0% No baseline available for comparison Artifact Sizes
No baseline available for comparisonUpdated: 2026-01-23 05:20:15 UTC • Triggered by: MacOS |
Major refactoring of geo file handling with a unified GeoFormatRegistry: - Add GeoFormatRegistry as central dispatch for all geo format operations - Reorganize helpers into format-specific subdirectories (KML/, GeoJSON/, GPX/, SHP/, etc.) - Add new format support: CSV points, WKT, WKB, GeoPackage, OpenAir airspace - Add GeoUtilities with coordinate validation, simplification algorithms, UTM conversion - Add XsdValidator for schema-based KML/GPX validation - Add comprehensive PlanImporter/PlanExporter system with format-specific implementations - Fix filterMeters parameter propagation in loadFile() to prevent double-filtering - Add QSKIP for schema validation tests when resources unavailable - Update altitude validation tests to use correct threshold values - Add extensive unit tests for all geo formats and utilities
0a275a9 to
d8fb513
Compare
Summary
Major refactoring of the geo file handling system with a unified GeoFormatRegistry:
Bug Fixes
filterMetersparameter propagation inloadFile()to prevent double-filteringTest plan