Skip to content

test: pin that overlapping imports store each building once - #214

Merged
jravani merged 1 commit into
mainfrom
test/overlapping-import
Oct 22, 2026
Merged

jravani merged 1 commit into
mainfrom
test/overlapping-import

Conversation

@jravani

@jravani jravani commented Oct 22, 2026

Copy link
Copy Markdown
Member

Regions are unlocked by running the pipeline for one bbox after another into the same country database, and neighbouring tiles share buildings along their edges. Nothing tested that a building imported twice is stored once.

Change

TestRunForRegion_RealCitydbTool_OverlapsImportOnce (integration, real citydb-tool, one Deggendorf tile) runs RunForRegion:

  1. a western bbox;
  2. an overlapping eastern bbox;
  3. the whole tile, after a copy of the tile is added to the dataset folder, the extreme case of two tiles sharing buildings.

After each run no object id appears twice in lod2.feature or city2tabula.lod2_building. The eastern run adds buildings, and the run after the copy changes no count.

Tests

  • Passes against citydb-tool 1.3.2 (CITYDB_TOOL_PATH set; skipped without it, like the existing real-tool test).
  • With --import-mode=import_all in place of skip in internal/importer/citydb.go, it fails: overlapping east bbox: RunForRegion: failed to extract features for germany: 1 job(s) failed. Repeated buildings break feature extraction, so skip mode is what keeps overlapping runs working.

Regions are unlocked by running the pipeline for one bbox after
another into the same country database, and providers' tiles share
buildings along their edges. Nothing tested that a building imported
twice, through overlapping bboxes or a second file holding it, is
stored once.

TestRunForRegion_RealCitydbTool_OverlapsImportOnce runs RunForRegion
against real citydb-tool on one Deggendorf tile: a western bbox, an
overlapping eastern one, then the whole tile after a copy of the tile
is added to the dataset folder. After each run no object id appears
twice in lod2.feature or city2tabula.lod2_building; the eastern run
adds buildings and the run after the copy changes no count.

With citydb-tool's --import-mode=import_all in place of skip, the
overlapping run fails, as feature extraction cannot process the
repeated buildings.
@codecov

codecov Bot commented Oct 22, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.

📢 Thoughts on this report? Let us know!

@jravani
jravani merged commit a494cfe into main Oct 22, 2026
8 checks passed
@jravani
jravani deleted the test/overlapping-import branch October 22, 2026 16:15
@jravani jravani mentioned this pull request Oct 23, 2026
@jravani jravani added this to the v0.12.0 milestone Oct 23, 2026
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