Size-Based Geometry Prioritization for Tile Generation#244
Size-Based Geometry Prioritization for Tile Generation#244
Conversation
Added issue section to address slow queries due to long hash lists and provided todo items for optimization.
Added potential improvement for z=0 tile handling in md5_queries.
Added recommended spatial indexing strategies for MD5 hashes, including SQL commands and performance notes.
Corrected header formatting and removed unnecessary code blocks for index creation.
Added performance notes and clarified query patterns for MD5 filtering.
…into md5_implementation
There was a problem hiding this comment.
Pull request overview
This PR implements size-based geometry prioritization for tile generation, where the largest geometries are rendered first at each tile level. The approach uses MD5 hashing to track which geometries have already been processed at higher levels, preventing duplicate rendering in child tiles.
Changes:
- Adds MD5 hash-based geometry tracking to avoid duplicate rendering across tile hierarchy levels
- Implements size-based prioritization using
ORDER BY ST_Area(ST_Envelope(geom)) DESC - Updates spatial index recommendations and test expectations to reflect the new tiling algorithm
Reviewed changes
Copilot reviewed 12 out of 13 changed files in this pull request and generated 17 comments.
Show a summary per file
| File | Description |
|---|---|
| src/wkb2gltf.core/GeometryRecord.cs | Adds Hash property to track geometry identity |
| src/b3dm.tileset/GeometryRepository.cs | Implements MD5 hash generation, filtering, and size-based ordering for geometry queries |
| src/b3dm.tileset/FeatureCountRepository.cs | Updates feature counting to exclude already-processed geometries |
| src/b3dm.tileset/QuadtreeTiler.cs | Refactors tiling algorithm to create tiles for largest geometries first, then recurse with filtered sets |
| src/b3dm.tileset/OctreeTiler.cs | Applies same size-based prioritization approach to 3D octree tiling |
| src/b3dm.tileset/TileCreationHelper.cs | Extracts tile writing logic into reusable helper method |
| src/b3dm.tileset/SpatialIndexChecker.cs | Updates spatial index detection pattern (with critical bug) |
| src/pg2b3dm/Program.cs | Updates spatial index recommendation in warning message (with critical bug) |
| src/pg2b3dm.database.tests/UnitTest1.cs | Updates test expectations to match new tile counts and adds useImplicitTiling parameter |
| README.md | Updates spatial index creation example (with critical bug) |
| md5_queries.md | Documents the MD5-based query approach and performance considerations |
| src/pg2b3dm.sln | Adds md5_queries.md to solution (with hard-coded paths issue) |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
…rator Co-authored-by: bertt <538812+bertt@users.noreply.github.com>
Co-authored-by: bertt <538812+bertt@users.noreply.github.com>
Co-authored-by: bertt <538812+bertt@users.noreply.github.com>
Fix geometry deduplication in LOD child tiles
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 12 out of 13 changed files in this pull request and generated 3 comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
…into md5_implementation
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
…into md5_implementation
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 12 out of 13 changed files in this pull request and generated 1 comment.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
No description provided.