Repository navigation
Vector Layer Projection Plan 2/3 - #99
Merged
Merged
Conversation
- add independent display projections and scene invalidation per map layer - transform spatial filters, polygon scenes, meshes, and extents without editing source data - cover projection switching, mixed maps, duplicate layers, and navigation Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
There was a problem hiding this comment.
🟡 Changes recommended
Nonlinear reprojection can produce inverted, overlapping fill triangles, while unnormalized antimeridian bounds can break extent queries and cause otherwise transformable layers to be skipped.
4 open issues
What changed in this PR
This PR adds display-only vector reprojection to MapWinGIS.Core, enabling mixed-coordinate-system maps without changing source datasets. ActiveX projection controls remain outside this phase.
Changes:
- Adds independent per-layer display projections and targeted scene-cache invalidation.
- Transforms viewport filters, polygon coordinates, prepared meshes, and densified bounds.
- Adds Core tests and updates projection architecture and compatibility documentation.
Builds and project tests were not run during this review.
| File | Description |
|---|---|
tests/MapWinGIS.Core.Tests/ProjectionTests.cpp |
Adds transformed-bounds tests. |
tests/MapWinGIS.Core.Tests/MapViewTests.cpp |
Tests cache invalidation and mixed-projection navigation. |
tests/MapWinGIS.Core.Tests/MapTests.cpp |
Tests display-projection state, validation, and extents. |
tests/MapWinGIS.Core.Tests/MapRenderSceneTests.cpp |
Tests transformed geometry and prepared meshes. |
src/MapWinGIS.Core/src/rendering/MapRenderScene.cpp |
Reprojects filters, scene geometry, meshes, and bounds. |
src/MapWinGIS.Core/src/projection/Projection.cpp |
Implements densified bounds transformation. |
src/MapWinGIS.Core/src/map/MapView.cpp |
Invalidates scenes when display projections change. |
src/MapWinGIS.Core/src/map/Map.cpp |
Stores display projections and transforms layer extents. |
src/MapWinGIS.Core/src/internal/VectorRenderSceneBuilder.h |
Documents display-coordinate scene construction. |
src/MapWinGIS.Core/include/mapwingis/rendering/VectorRenderScene.h |
Clarifies coordinate-system documentation. |
src/MapWinGIS.Core/include/mapwingis/rendering/MapRenderScene.h |
Documents display projections in map scenes. |
src/MapWinGIS.Core/include/mapwingis/projection/Projection.h |
Declares the bounds-transform API. |
src/MapWinGIS.Core/include/mapwingis/map/MapView.h |
Declares display-projection controls. |
src/MapWinGIS.Core/include/mapwingis/map/Map.h |
Exposes per-layer display-projection state and operations. |
README.md |
Introduces display-only reprojection support. |
docs/PORTING.md |
Clarifies editing and ActiveX limitations. |
docs/ARCHITECTURE.md |
Describes reprojection flow and cache behavior. |
.github/plans/Vector-Layer-Projection.md |
Marks Phase 2 complete and records scope boundaries. |
.ai/memory/architecture/core-library.md |
Records Core reprojection behavior. |
.ai/memory/architecture/activex.md |
Clarifies that ActiveX loads retain source coordinates. |
Review effort: Balanced
- rebuild fill meshes after nonlinear coordinate transforms - normalize antimeridian bounds and cover spatial filtering regressions Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
- split antimeridian polygons with preserved holes before triangulation - avoid ambiguous wrapped filters and redundant source triangulation Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.



Motivation
Implement Phase 2 by making the Phase 1 projection model useful for mixed-CRS maps without modifying geometry on disk.
Design
MapLayer.MapViewscene cache when its display projection changes.Dependencies and validation
Uses the existing GDAL/PROJ dependency set. Debug x64 built without warnings and all 553 non-interactive CTest tests passed.
Updated
.ai/memoryarchitecture notes to record the verified scene and ActiveX boundary; updated README and projection architecture/porting documentation.