Skip to content

test(engine): GeoJSON reading says a dropped measure (M), alone or on a later vertex - #3419

Merged
Mavrick-F merged 2 commits into
opengeos:mainfrom
dwarburg:test/geojson-m-values
Nov 30, 2026
Merged

Mavrick-F merged 2 commits into
opengeos:mainfrom
dwarburg:test/geojson-m-values

Conversation

@dwarburg

@dwarburg dwarburg commented Nov 30, 2026 •

Copy link
Copy Markdown
Contributor

Summary

Adds two cases to the reading-loss tests (crates/engine/tests/integration/never_silent_reading.rs)
for the GeoJSON M gap listed in its
coverage inventory. This is
part of the ROADMAP › Correct results (open) item "Lossy sample files … for the readers it doesn't
cover yet".

  • GeoJSON: a measure: a point [1,2,null,4]. GeoJSON has no XYM, so a measure without a
    height is written with a null Z. This keeps M apart from the existing height case.
  • GeoJSON: a measure on a line's later vertex: [[0,0],[1,1,null,7]], so a measure is found
    past the first position.

Both are Classified(DroppedZm, "Z or M"): the lossy file gives exactly one DroppedZm notice and
the clean file none. read_routes.rs picks the cases up, so they're also read linked in place, as
bytes, text, a download and inside a zip. The reader already said this loss, so no reader change
was needed. The inventory's GeoJSON row now lists M as covered.

Reach every surface: this adds tests of the shared GeoJSON reader, which the desktop app,
browser, CLI and Python reach through layer.addData*. The ribbon, shortcuts, Assistant/MCP,
plugins and Undo don't apply: no command, option or saved data changes. No outside code was
followed.

Testing

Run locally on Windows 11 (x64), at ab8a94bd:

  • cargo fmt --all --check, cargo clippy with -D warnings on the 9 packages
    cargo xtask changed selects, cargo xtask layers, attribution, rows, schema --check,
    test-hygiene and pre-commit run --all-files (workspace clippy included): all pass.
  • cargo test --workspace --no-fail-fast: 10,989 passed, 26 ignored, 2 failed. Both failures
    are engine --lib unit tests that this change can't reach (it touches only an integration test
    file and a README):
  • never_silent_reading:: and read_routes:: pass with the new cases. To check that the cases test
    something, I temporarily marked the M-only case Silent. The test then failed with the expected
    "1 feature had Z or M values" notice.

UI evidence

No visible UI change.

Related issue

Part of ROADMAP › Correct results: lossy sample files for the readers the corpus doesn't cover yet.

🤖 Generated with Claude Code

Summary by CodeRabbit

  • Documentation
    • Updated the GeoJSON coverage information to include measure (M) loss alongside Z loss and unreadable geometry. Members, holes, and attributes remain listed as gaps.
  • Tests
    • Added GeoJSON reading-loss cases for measures with null Z values, including cases on later line vertices. These cases check that the reported classification and notice identify Z or M loss.

… a later vertex

Two cases in the reading-loss corpus close the GeoJSON M gap in its
coverage inventory: a point with a measure and no height ([1,2,null,4],
as GeoJSON has no XYM) and a line whose second vertex alone has one.
Both give one DroppedZm notice that the clean file doesn't, and every
read route reads them as the path does.

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

coderabbitai Bot commented Nov 30, 2026 •

Copy link
Copy Markdown
Contributor

Explain Change →

Important

Review skipped

Review was skipped as selected files did not have any reviewable changes.

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: e76a42f8-e7fc-49a8-a01a-e8d816f54da2
Commits

Reviewing files that changed from the base of the PR and between ab8a94b and 3b8ac93.

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • Trigger review

No actionable comments were generated in the recent review.

Walkthrough

The GeoJSON reading-loss tests now cover M values with null Z and M values on later line vertices. The coverage table adds these cases and updates the remaining listed gaps.

Changes: GeoJSON M-loss coverage

Layer / File(s) Summary
GeoJSON M-loss notice coverage
crates/engine/tests/integration/never_silent_reading.rs, crates/engine/testdata/reading-losses/README.md
Two cases expect a DroppedZm classification and a notice containing “Z or M.” The coverage table now lists M loss alongside Z loss and unreadable geometry. Members/holes and attributes remain gaps.

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

Change: Other

Possibly related PRs

  • opengeos/RustGIS#1214: That PR adds the GeoJSON Z/M dropped-value notice. This PR adds tests for two cases of that behavior.

Suggested reviewers: mavrick-f, giswqs

Merge Risk: Minimal · previous review ab8a9

This change only adds reading-loss test coverage for GeoJSON M values and updates the coverage table. It does not change runtime behavior, and it is ready to merge.

Pre-merge checks: Passed 4

Check name Status Explanation
Title check Passed The title names the main change: two GeoJSON reading-loss test cases for a dropped measure (M), alone or on a later vertex. It follows the conventional type(scope) format and matches the changeset, wh…
Description check Passed The description follows the template. It has a Summary that explains the change and why, a Testing section with commands and results, and a UI evidence section that correctly states there is no visibl…
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: two GeoJSON reading-loss test cases for a dropped measure (M), alone or on a later vertex. It follows the conventional type(scope) format and matches the changeset, which adds those tests and updates the coverage inventory.

Full details: Description check

Explanation

The description follows the template. It has a Summary that explains the change and why, a Testing section with commands and results, and a UI evidence section that correctly states there is no visible UI change. The Related issue section names a ROADMAP item instead of an issue number, which is acceptable here because the template calls for a reference and the author gives one.

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 a point of M,
Then checks the line’s next vertex, too.
“Z or M,” the notice says,
The coverage table marks the loss.
The rabbit hops through tests anew.

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: 2b085327-6606-4b2c-9f5d-c9080aeaeebe
Commits

Reviewing files that changed from the base of the PR and between 25af577 and ab8a94b.

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

github-actions Bot commented Nov 30, 2026 •

Copy link
Copy Markdown
Contributor

📖 Docs preview

Item Value
Preview https://preview.rustgis.app/pr-3419/
Web app https://preview.rustgis.app/pr-3419/app/
Commit 3b8ac93

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).

@Mavrick-F
Mavrick-F added this pull request to the merge queue Nov 30, 2026
Merged via the queue into opengeos:main with commit b0a2717 Nov 30, 2026
30 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