Repository navigation
Modern GDAL Integration for MapWinGIS6 - #6
Conversation
- Add ToArgs structures for the ten prioritized raster and vector algorithms. - Validate typed values through GDAL argument metadata and structured errors. - Add metadata, validation, and raster conversion tests. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
4e1a3d0 to
f0633b9
Compare
There was a problem hiding this comment.
🟡 Changes recommended
The conflict test can pass on an unrelated missing-input failure, and an unused helper conflicts with the warning-clean requirement.
2 open issues
What changed in this PR
Adds typed options for ten prioritized GDAL raster and vector algorithms, integrating argument conversion and validation with the existing algorithm runner.
Changes:
- Introduces option structures and
ToArgs()conversions using GDAL argument names and types. - Extends the runner with integer-list arguments and explicit validation.
- Adds metadata, fixture-based validation, raster conversion, and invalid-option tests.
Builds and tests were not run during this review.
| File | Description |
|---|---|
| tests/MapWinGIS.Core.Tests/MapWinGIS.Core.Tests.vcxproj | Registers the typed-options tests. |
| tests/MapWinGIS.Core.Tests/GdalTypedOptionsTests.cpp | Tests option mappings, validation, and raster conversion. |
| src/MwGdalCore/MwGdalCore.vcxproj | Registers typed-options sources and the internal include path. |
| src/MwGdalCore/GdalTypedOptions.cpp | Implements argument conversion and configuration. |
| src/MwGdalCore/GdalAlgorithmRunner.cpp | Adds integer-list setters and argument validation. |
| src/MapWinGIS.Core/MapWinGIS.Core.vcxproj | Registers the public typed-options header. |
| src/MapWinGIS.Core/include/mapwingis/gdal/GdalTypedOptions.h | Declares option structures for ten algorithms. |
| src/MapWinGIS.Core/include/mapwingis/gdal/GdalAlgorithmRunner.h | Exposes the new runner methods. |
Review effort: Balanced
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
pmeems
left a comment
There was a problem hiding this comment.
Two non-blocking recommendations from my review:
-
Broaden behavioral execution tests. The current tests provide useful coverage for metadata-recognized argument names/types and include a successful raster conversion. Please consider adding end-to-end execution tests for representative vector operations, raster clipping, reprojection, and mosaicking, asserting the generated output and key properties. These would catch option-mapping or argument-combination issues that metadata validation alone cannot detect.
-
Expand public API documentation in
GdalTypedOptions.h. Please document required inputs, the meaning of unset optional fields/default behavior, and any relevant error/exception and thread-safety guarantees for the option structs andToArgs()methods. This would bring the new public API closer to the expectations indocs/CODING-STANDARDS.md.
These are follow-up quality improvements, not confirmed defects; I found no blocking functional issue in the reviewed changes.
Add output round-trip tests for vector conversion and clipping, raster clipping, reprojection, and mosaicking. Document required inputs, omitted values, conversion errors, and thread safety. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
|
Addressed both recommendations from #6 (review) in 8731c10. Added five execution tests for vector conversion, vector clipping, raster clipping, reprojection, and mosaicking. Each test closes the runner and reopens the generated output. Assertions cover feature counts, attributes, clipped geometry areas and extents, coordinate reference systems, raster dimensions, geotransforms, pixel values, compression, and nodata where applicable. The georeferenced raster fixture now lives in the shared TestData helpers. Expanded GdalTypedOptions.h with required inputs and selector constraints for each struct. The shared conversion contract and ToArgs() references document omitted values and GDAL defaults, ownership, validation boundaries, exceptions, thread safety, and conversion cost. ConfigureGdalAlgorithm() also documents partial application and error reporting. The Debug x64 CI build and all 95 tests passed: https://github.com/MapWindow/MapWinGIS6/actions/runs/40206393593. No public API signatures or algorithm behavior changed. |


Introduce strongly typed options and
ToArgs()conversions for the ten prioritized GDAL raster and vector algorithms, validating them through GDAL 3.12 argument metadata. The wrappers use GDAL’s actual option names and value types; unsupported legacy raster-convert flags and raster-reproject template input are omitted. No dependencies were added.Tests cover metadata-recognized arguments, validation with real raster/vector fixtures, a successful raster conversion, and invalid options. CI passes the full Debug x64 build and test suite.