Skip to content

Fix geometry deduplication in LOD child tiles#248

Merged
bertt merged 4 commits intomd5_implementationfrom
copilot/sub-pr-244-again
Feb 5, 2026
Merged

Fix geometry deduplication in LOD child tiles#248
bertt merged 4 commits intomd5_implementationfrom
copilot/sub-pr-244-again

Conversation

Copy link
Contributor

Copilot AI commented Feb 5, 2026

The ProcessLodLevels method was calling GenerateTiles without passing the processedGeometries parameter, causing geometries already processed at parent LOD levels to be duplicated in child LOD tiles.

Changes

  • Updated ProcessLodLevels signature to accept HashSet<string> processedGeometries parameter
  • Pass processedGeometries through to GenerateTiles call for LOD children
  • Updated both call sites (CreateTileForLargestGeometries and CreateTile) to pass their respective processed geometry sets
// Before
private void ProcessLodLevels(BoundingBox bbox, Tile tile, int lod, bool createGltf, bool keepProjection)
{
    var lodNextTiles = GenerateTiles(bbox, t2, new List<Tile>(), nextLod, createGltf, keepProjection);
}

// After
private void ProcessLodLevels(BoundingBox bbox, Tile tile, int lod, bool createGltf, bool keepProjection, HashSet<string> processedGeometries)
{
    var lodNextTiles = GenerateTiles(bbox, t2, new List<Tile>(), nextLod, createGltf, keepProjection, processedGeometries);
}

This ensures the size-based geometry prioritization correctly deduplicates across all LOD levels.


💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.

Co-authored-by: bertt <538812+bertt@users.noreply.github.com>
Copilot AI changed the title [WIP] Address feedback on size-based geometry prioritization Fix geometry deduplication in LOD child tiles Feb 5, 2026
Copilot AI requested a review from bertt February 5, 2026 10:57
@bertt bertt marked this pull request as ready for review February 5, 2026 11:05
@bertt bertt merged commit 777f8b2 into md5_implementation Feb 5, 2026
2 checks passed
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