Skip to content

Point and Polyline Vector Rendering – Generalize the vector render scene - #106

Merged
pmeems merged 4 commits into
developmentfrom
phase-1-generalize-vector-render-scene
Dec 4, 2026
Merged

pmeems merged 4 commits into
developmentfrom
phase-1-generalize-vector-render-scene

Conversation

@pmeems

@pmeems pmeems commented Dec 4, 2026

Copy link
Copy Markdown
Contributor

Motivation and context

Generalize the backend-neutral Core render scene so later phases can render points and polylines without duplicating OGR conversion or breaking polygon behavior.

Key design decisions

  • Store point coordinates and polyline parts in contiguous buffers alongside the existing polygon buffer.
  • Preserve source feature ranges across point, polyline, and polygon stores, including multipart geometry and collection members.
  • Linearize curved OGR geometry during scene construction, skip unsupported or degenerate parts explicitly, and transform every geometry family during reprojection.
  • Keep the current ActiveX renderers polygon-only; point and line loads remain explicitly rejected until their rendering phases land.
  • Existing architecture memory, README, and architecture documentation now describe the generalized scene model.

Validation

  • CMake Debug x64: 607/607 non-interactive CTest cases passed.
  • Legacy MSBuild Debug x64: 0 warnings, 0 errors; Core 431 passed/2 skipped, ActiveX 163 passed/8 skipped.

Dependencies

None. This PR is the first implementation phase and targets development.

- Store point, polyline, and polygon geometry in backend-neutral flat buffers

- Preserve source feature ranges through scene construction and reprojection

- Cover multipart, curved, empty, and mixed vector geometry

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copilot AI balanced review requested due to automatic review settings December 4, 2026 18:59

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

Reprojected polylines can incorrectly cross Greenwich instead of the antimeridian, and copy-assignment allocation failures can leave part ranges outside coordinate storage.

2 open issues
What changed in this PR

Generalizes Core’s backend-neutral render scenes for future point and polyline rendering while keeping ActiveX polygon-only.

Changes:

  • Adds contiguous point/polyline storage and per-feature geometry ranges.
  • Extends geometry conversion and reprojection across supported families.
  • Adds regression tests and updates architecture documentation.

Builds and tests were not run during this review.

File Description
tests/​MapWinGIS.Core.Tests/​VectorRenderSceneTests.cpp Tests geometry conversion, buffers, and feature ranges.
tests/​MapWinGIS.Core.Tests/​MapRenderSceneTests.cpp Tests mixed layers and reprojection.
src/​MapWinGIS.Core/​src/​rendering/​VectorRenderScene.cpp Converts points, lines, and curves into scene storage.
src/​MapWinGIS.Core/​src/​rendering/​MapRenderScene.cpp Transforms all geometry families and preserves polygon ranges.
src/​MapWinGIS.Core/​src/​map/​MapView.cpp Recognizes non-polygon scenes as nonempty.
src/​MapWinGIS.Core/​src/​internal/​VectorRenderSceneBuilder.h Updates scene-building contracts.
src/​MapWinGIS.Core/​include/​mapwingis/​rendering/​VectorRenderScene.h Exposes generalized buffers and feature ranges.
src/​MapWinGIS.ActiveX/​MapWinGISControl.cpp Retains polygon-only loading.
README.md Describes generalized scenes and renderer limitations.
docs/​ARCHITECTURE.md Documents storage and reprojection changes.
.ai/​memory/​architecture/​core-library.md Updates shared scene architecture notes.

Review effort: Balanced

- Make polyline copy assignment use copy-and-swap.
- Split projected polylines at the antimeridian.
- Update feature ranges and add regression coverage.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copilot AI balanced review requested due to automatic review settings December 4, 2026 20:36

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

Longitude unwrapping and seam handling still create spurious world-spanning segments and incorrectly split valid long projected lines.

3 open issues
2 resolved since last review

Review effort: Balanced

@Julian-MW Julian-MW 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.

Automated review. Final decision is with the human reviewer.

- Densify projected lines to distinguish long segments from seam crossings.
- Track longitude worlds across exact seam vertices.
- Rebuild invalid scene extents from retained finite geometry.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copilot AI balanced review requested due to automatic review settings December 4, 2026 21: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.

🟡 Changes recommended

Unresolved antimeridian handling errors can truncate Greenwich-crossing lines and drop seam-following vertices, replacing intended geometry with incorrect segments.

2 open issues
3 resolved since last review

Review effort: Balanced

- Densify near-seam Greenwich-crossing lines before seam normalization.
- Preserve vertices that follow the antimeridian.
- Cover near-seam and seam-corner regressions.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copilot AI balanced review requested due to automatic review settings December 4, 2026 21:54

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

The endpoint-only check can reverse a projected line’s path through Greenwich instead of across the antimeridian, requiring source-midpoint validation and a regression test.

1 open issue
2 resolved since last review

Review effort: Balanced

@pmeems
pmeems enabled auto-merge (squash) December 4, 2026 22:53
@pmeems
pmeems merged commit c966e8c into development Dec 4, 2026
18 checks passed
@pmeems
pmeems deleted the phase-1-generalize-vector-render-scene branch December 4, 2026 23:18
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.

3 participants