Repository navigation
Formats out follow-ups: streamed CSV system notice, digests and loss counts without converting the layer (#2032 C2f-1) - #2708
Conversation
…ss counts without a layer conversion (opengeos#2032 C2f-1)
|
No actionable comments were generated in the recent review. Walkthrough
Merge Risk:
|
| } else if crs == ds.coord_crs() { | ||
| std::borrow::Cow::Borrowed(ds) | ||
| // Of the coordinates the file is written in: longitude/latitude, or another | ||
| // geographic system's, whose points alone are converted to be checked (no copy of the |
There was a problem hiding this comment.
The comment says a projected system's coordinates "aren't checked as such", but the projected branch (else at line 5007) still calls CsvLosses::of on the native coordinates, so they are checked as degrees. The result is never read for a projected target: coordinates_note_in returns before using unusable_points when !crs.is_geographic(), and notes() doesn't read it either. So the pass is wasted work and the comment misstates what happens. Suggest rewording the comment to say the count is not used for projected targets, or skipping the degree check on that path.
Category: quality
There was a problem hiding this comment.
Left for the release quality pass.
| // (no conversion), and in longitude/latitude too only when its record is of that kind | ||
| // (an older release's kept no native one), in the same pass. A record of a kind not | ||
| // hashed here (a held layer read back in longitude/latitude) differs, so the layer | ||
| // takes what was read back: refreshed, never out of step. |
There was a problem hiding this comment.
The later comment (lines 128-129, which is outside this diff hunk) says the new record's digest is "hashed above", but in this else branch (a layer held in its own system, with a native record) only the native digest is computed. If published.native is None (the file reads back in longitude/latitude), of_kind(false) is None, so held is always Some and the layer is refreshed to the read-back, changing its held_in, where before the digests could match and it kept its system. I think this is unreachable in practice (GeoJSON sources aren't projected at read, and shapefile publishes read back in the file's system), so this is mainly a comment fix. Suggest saying that the comparison is skipped in this branch and why the refresh is safe.
Category: quality
There was a problem hiding this comment.
Left for the release quality pass.
Code reviewNo bugs, security issues, or AGENTS.md breaks found. The new CSV loss counting, the untyped-layer notice, the per-axis column-name notice, and the publish digest selection all check out against the surrounding code. Two comment-accuracy issues are posted inline. Nothing here is a bug the author must fix before merge. I checked: Quality
Performance
Security
Bugs
AGENTS.md
Change sizeCompared with the base branch (merge base 5955e44 to PR head d68b8a0). Files only, not line counts.
|
📖 Docs preview
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 |
Follow-ups to #2682 (#2032 C2f-1), from the review comments left on it after the merge.
What changes
share.exportLayerto a CSV in a"crs"other than WGS 84 says which system the coordinates are in. A streamed layer that declares no geometry type takes its first geometry's, so it gets coordinate columns too. The notice now follows what the export wrote (Exported.csv.points) instead of the declared type, so such a layer is no longer silent.xandeastingonly, the notice names those two, not all four.x, theneasting, thenx_1and so on;y, thennorthing, theny_1and so on.Reach
Desktop, browser, command line and Python reach
share.exportLayerand the publish command as before; nothing new to show in the ribbon, the Assistant or MCP (no parameter changed). Nothing a project saves changes.Memory
1×: the CSV loss count no longer makes a second, projected copy of the layer, and a natively held layer's publish no longer converts it to longitude/latitude.
Tests
a_csv_export_takes_x_and_y_in_a_system_asked_forgains the one-axis case (fails without the fix) and the four-name wording; its ETRS89 part fails if the points aren't converted.a_layer_without_a_declared_type_takes_its_first_geometryschecks the export reports point columns.share.rsline that reads that report has no command-level test: streaming an untyped layer throughshare.exportLayerneeds a streamed source the test fixtures don't give. The digest change only skips work; the existing publish tests (formats_out, the sync tests) cover each record kind.cargo xtask rowspass.Summary by CodeRabbit
Bug Fixes
Documentation