Skip to content

Vector Layer Projection Plan 2/3 - #99

Merged
pmeems merged 3 commits into
developmentfrom
phase-2-layer-reprojection
Nov 27, 2026
Merged

pmeems merged 3 commits into
developmentfrom
phase-2-layer-reprojection

Conversation

@pmeems

@pmeems pmeems commented Nov 27, 2026 •

Copy link
Copy Markdown
Contributor

Motivation

Implement Phase 2 by making the Phase 1 projection model useful for mixed-CRS maps without modifying geometry on disk.

Design

  • Store an independent optional display projection on each MapLayer.
  • Invalidate and rebuild only the affected MapView scene cache when its display projection changes.
  • Inverse-transform viewport filters into source coordinates, then transform polygon coordinates, prepared meshes, and densified extents into display coordinates.
  • Keep native scenes on the original no-transform path and document display-only editing as an intentional limitation.

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/memory architecture notes to record the verified scene and ActiveX boundary; updated README and projection architecture/porting documentation.

- 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>
Copilot AI balanced review requested due to automatic review settings November 27, 2026 10:16

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

🟡 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

@pmeems pmeems changed the title MapWinGIS6 – Vector Layer Projection Plan Vector Layer Projection Plan 2/3 Nov 27, 2026
- 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>
Copilot AI balanced review requested due to automatic review settings November 27, 2026 10:52

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

🟡 Changes recommended

Unresolved longitude-wrapping bugs invert antimeridian polygon coverage and incorrectly exclude visible wrapped features from viewport-filtered scenes.

3 open issues
4 resolved since last review

Review effort: Balanced

- 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>
Copilot AI balanced review requested due to automatic review settings November 27, 2026 11:42

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Copilot was unable to review this pull request because the user who requested the review has insufficient remaining quota. Try requesting a review at a lower effort level.

@pmeems
pmeems enabled auto-merge (squash) November 27, 2026 12:24
@pmeems
pmeems merged commit 778e76d into development Nov 27, 2026
17 checks passed
@pmeems
pmeems deleted the phase-2-layer-reprojection branch November 27, 2026 13:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants