Skip to content

test(data): cover TopoJSON, CSV WKT and GML measures and GeoJSON collections - #3432

Open
dwarburg wants to merge 2 commits into
opengeos:mainfrom
dwarburg:test/reading-loss-measures-collections
Open

dwarburg wants to merge 2 commits into
opengeos:mainfrom
dwarburg:test/reading-loss-measures-collections

Conversation

@dwarburg

@dwarburg dwarburg commented Nov 30, 2026 •

Copy link
Copy Markdown
Contributor

New reading-loss cases, each a clean file against the same file with one loss:

  • TopoJSON: a measure ([x, y, null, m]) on every position and on one.
  • CSV: a measure in WKT (POINT M) and on a WKT line (LINESTRING M).
  • GML: a measure, as a 4-D posList (srsDimension="4"), since GML can't mark a 3-D position as XYM.
  • GeoJSON: a two-member geometry collection, which the reader rejects rather than keep part of it.

The measures give the DroppedZm notice and the collection DroppedFeature ("unreadable geometry"). The inventory's TopoJSON, delimited-text, GML and GeoJSON rows move these to the covered column.

Summary

Fills four gaps in the reading-loss tests (crates/engine/tests/integration/never_silent_reading.rs), following the pattern of #3419. Each case pairs a clean file with the same file holding one loss. The readers already say each of these losses, so no reader changes.

Case Clean Lossy Expect
TopoJSON: a measure [[0,0],[1,1]] [[0,0,null,7],[1,1,null,8]] Classified(DroppedZm, "Z or M")
TopoJSON: a measure on one position [[0,0],[1,1]] [[0,0],[1,1,null,8]] Classified(DroppedZm, "Z or M")
CSV: a measure in WKT POINT(1 2) POINT M(1 2 4) Classified(DroppedZm, "Z or M")
CSV: a measure on a WKT line LINESTRING(0 0,1 1) LINESTRING M(0 0 7,1 1 8) Classified(DroppedZm, "Z or M")
GML: a measure 2-D posList srsDimension="4": 48 10 5 7 49 11 6 8 Classified(DroppedZm, "Z or M")
GeoJSON: a geometry collection of two members two points a point and a two-point GeometryCollection Classified(DroppedFeature, "unreadable geometry")

The coverage inventory (crates/engine/testdata/reading-losses/README.md) moves these to the covered column of the TopoJSON, delimited-text, GML and GeoJSON rows.

Notes for review:

  • GML M is tested only together with Z. GML has no way to mark a 3-D position as XYM, so the measure case is a 4-D position, and a reader that dropped only M would pass it.
  • The GeoJSON notice doesn't name the collection. geometry_from_geojson rejects a multi-member collection instead of keeping part of it, so the feature is left out with the generic "1 features had unreadable geometry" (DroppedFeature). It doesn't say the geometry was a collection of several members, which the reader can't keep. Would you like a specific notice for this? I've left the reader unchanged here. (The notice also says "1 features"; that plural is in the existing message.)

ROADMAP › Correct results (open item).

Testing

  • cargo test -p rustgis-engine --test integration: 246 passed, including never_silent_reading:: and read_routes::.
  • Probe: I temporarily set each new case to Silent("probe"). The test failed with "a new notice …" for every one (DroppedZm for the TopoJSON, CSV and GML cases, DroppedFeature for the GeoJSON one). Then I restored them.
  • cargo fmt --all --check, clippy -D warnings (the packages cargo xtask changed --list names), cargo xtask layers|attribution|rows|schema --check|test-hygiene and pre-commit run --all-files all pass.
  • cargo test --workspace --no-fail-fast on Windows had three failures, all in code this PR doesn't touch:

Reach every surface: tests only. No reader, command or UI change, so no surface needs anything.

UI evidence

No visible UI change.

Related issue

Part of ROADMAP › Correct results (open item; no issue needed). Follows #3419.

🤖 Generated with Claude Code

Summary by CodeRabbit

  • Tests
    • Expanded validation of data-loss notices for geometry collections, measures, and four-dimensional geometries across supported formats.
  • Documentation
    • Updated the format coverage reference to reflect which geometry and measure cases are covered and which limitations remain.
  • User Impact
    • No user-facing behavior changes are included in this update.

dwarburg and others added 2 commits November 29, 2026 21:21
…ections

New reading-loss cases, each a clean file against the same file with one
loss:
- TopoJSON: a measure ([x, y, null, m]) on every position and on one.
- CSV: a measure in WKT (POINT M) and on a WKT line (LINESTRING M).
- GML: a measure, as a 4-D posList (srsDimension="4"), since GML can't
  mark a 3-D position as XYM.
- GeoJSON: a two-member geometry collection, which the reader rejects
  rather than keep part of it.

The measures give the DroppedZm notice and the collection DroppedFeature
("unreadable geometry"). The inventory's TopoJSON, delimited-text, GML
and GeoJSON rows move these to the covered column.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@coderabbitai

coderabbitai Bot commented Nov 30, 2026 •

Copy link
Copy Markdown
Contributor

Explain Change →

No actionable comments were generated in the recent review.

Walkthrough

The integration tests add loss-notice cases for GeoJSON geometry collections and measures in TopoJSON, CSV WKT, and GML. The reading-loss coverage table records these additions and updates the remaining gaps.

Changes: Reading loss notices

Layer / File(s) Summary
Add reader loss cases
crates/engine/tests/integration/never_silent_reading.rs, crates/engine/testdata/reading-losses/README.md
Integration cases check DroppedFeature notices for unreadable GeoJSON collection members and DroppedZm notices for measures in TopoJSON, CSV WKT, and GML. The coverage table records these cases and updates the remaining gaps.

Estimated code review effort: 2 (Simple) | ~10 minutes

Change: Other

Possibly related issues

  • opengeos/RustGIS#748 — The tests check import notices for omitted Z/M values, which matches an item in the release test checklist.
  • opengeos/RustGIS#2717 — The PR adds never-silent tests, and the provided issue summary says the new cases were verified to fail with a temporary Silent("probe") expectation.

Suggested reviewers: mavrick-f, giswqs

Merge Risk: Minimal · up to 60a23

This change adds test cases and documentation for reading-loss notices without altering production behavior. No merge-blocking risk was found.

Pre-merge checks: Passed 4

Check name Status Explanation
Title check Passed The title names the main change: new reading-loss test cases for TopoJSON, CSV WKT and GML measures and GeoJSON geometry collections. The changeset adds these cases in never_silent_reading.rs and upda…
Description check Passed The description follows the template's sections: Summary, Testing, UI evidence and Related issue. The Summary explains the four gaps filled, the paired clean and lossy cases, and the coverage README u…
Linked Issues check Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check Passed Check skipped because no linked issues were found for this pull request.
Full details: Title check

Explanation

The title names the main change: new reading-loss test cases for TopoJSON, CSV WKT and GML measures and GeoJSON geometry collections. The changeset adds these cases in never_silent_reading.rs and updates the coverage README, so the title matches the change. It uses the conventional test(scope) prefix and is 76 characters.

Full details: Description check

Explanation

The description follows the template's sections: Summary, Testing, UI evidence and Related issue. The Summary explains the four gaps filled, the paired clean and lossy cases, and the coverage README update. Testing lists commands, results, and a probe that confirms the new cases fail on a Silent expectation. UI evidence states 'No visible UI change', as the template requires. Related issue names the ROADMAP item and follows #3419, which the template accepts as no issue link. The description also notes the GML M-with-Z limitation and the generic GeoJSON notice, which gives reviewers the context they need.

Finishing Touches

Generate unit tests (beta)

  • Create a new PR
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

Share

A rabbit checks each feature’s trail
And spots where measures fail
GeoJSON speaks, then Topo too
CSV and GML join the queue
Notices mark what did not stay
The coverage chart records the way

Recent review info

Run configuration

  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: Organization UI
  • Review profile: ASSERTIVE
  • Plan: Advanced
  • Run ID: 414e926b-8f01-464a-b653-93918871be3e
Commits

Reviewing files that changed from the base of the PR and between 7fc9ea5 and 60a239c.

Files selected for processing: 2

  • crates/engine/testdata/reading-losses/README.md
  • crates/engine/tests/integration/never_silent_reading.rs

Included review availability: This review used your included allowance. Your plan provides up to 8 included reviews per hour; 7 remain after this review.

@github-actions

Copy link
Copy Markdown
Contributor

📖 Docs preview

Item Value
Preview https://preview.rustgis.app/pr-3432/
Web app https://preview.rustgis.app/pr-3432/app/
Commit 60a239c

GitHub Pages takes a minute or two to publish a new commit. Newer commits from the fork aren't published until a maintainer adds the preview label (once per commit).

This branch has not been deployed

No deployments
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