Skip to content

feat: extract tileset.json from 3tz and validate footprint (MAPCO-11837) - #12

Open
lirantul123 wants to merge 2 commits into
jobnik-jobfrom
tileset-extraction
Open

lirantul123 wants to merge 2 commits into
jobnik-jobfrom
tileset-extraction

Conversation

@lirantul123

Copy link
Copy Markdown
Collaborator

Add tileset validation to the ingestion flow for both 3tz and folder inputs: read tileset.json, extract the model polygon from its bounding volume, and require the footprint to intersect and cover the model above a configurable threshold.

TilesetReader reads tileset.json without a zip dependency: for a 3tz it reads the first local file entry directly via a file handle (real 3tz archives break yauzl's central-directory parsing), guarding against data-descriptor/ZIP64 entries whose size is absent from the local header; for a folder it reads the file from disk. Polygon extraction (region/sphere bounding volumes) lives in @map-colonies/3d-shared. Coverage is checked with turf against validation.percentageLimit (default 10), wired through schema, config, custom-environment-variables and helm. Unit and integration tests included.

Question Answer
Bug fix ✖
New feature ✔
Breaking change ✖
Deprecations ✖
Documentation ✖
Tests added ✔
Chore ✖

Add tileset validation to the ingestion flow for both 3tz and folder inputs:
read tileset.json, extract the model polygon from its bounding volume, and
require the footprint to intersect and cover the model above a configurable
threshold.

TilesetReader reads tileset.json without a zip dependency: for a 3tz it reads
the first local file entry directly via a file handle (real 3tz archives break
yauzl's central-directory parsing), guarding against data-descriptor/ZIP64
entries whose size is absent from the local header; for a folder it reads the
file from disk. Polygon extraction (region/sphere bounding volumes) lives in
@map-colonies/3d-shared. Coverage is checked with turf against
validation.percentageLimit (default 10), wired through schema, config,
custom-environment-variables and helm. Unit and integration tests included.
@github-actions

github-actions Bot commented Sep 30, 2026 •

Copy link
Copy Markdown

🎫 Related Jira Issue: MAPCO-11837

Return ValidationResponse {isValid, message} from the tileset polygon
extraction and footprint-intersection checks (mirroring 3d-gateway), route
every failure through a single rejectValidation() that logs the outcome and
throws AppError so the message reaches the client. Move ValidationResponse to
common/interfaces. Match 3d-gateway's coverage/far-from-model messages and add
a coverage-below-threshold test.
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.

1 participant