Repository navigation
fix(analysis): report the assumed XY coordinate system - #3454
Conversation
|
No actionable comments were generated in the recent review. Walkthrough
Merge Risk:
|
| }; | ||
| let (xi, yi) = (field("x")?, field("y")?); | ||
| let (crs, crs_note) = match s(p, "crs").trim() { | ||
| let crs_text = s(p, "crs").trim(); |
There was a problem hiding this comment.
A numeric crs (for example "crs": 3857) is read by s() as empty, so it is silently ignored and the points are placed as longitude/latitude. The new notice then says "no coordinate system was given", which is wrong for this input: one was given and dropped. raster_crs_of already refuses this case with "crs must be text"; the same check belongs here, before crs_text is read. A regression case would go in the junk-parameter list of places_rows_by_their_coordinates, e.g. {"input": "stops", "x": "lon", "y": "lat", "crs": 3857} expected to be an error.
| let crs_text = s(p, "crs").trim(); | |
| if p.get("crs").is_some_and(|v| !v.is_null() && !v.is_string()) { | |
| return Err("crs must be text".into()); | |
| } | |
| let crs_text = s(p, "crs").trim(); |
Category: bug
There was a problem hiding this comment.
Fixed in 9962be862f. XY Table To Point now rejects a non-null, non-string crs with "crs must be text", matching the existing raster guard. The regression using numeric 3857 failed before the guard and passes with it. Missing/null/blank values retain the default path; explicit text coordinate systems are unchanged. The named regression, formatting, test hygiene, normal hooks and fork CI passed.
| Ok((crs, rustgis_data::raster::wkt::typed_crs_note(text, crs))) | ||
| } | ||
|
|
||
| /// Places points from two fields, whose system is independent of any input layer geometry. |
There was a problem hiding this comment.
Nit: this doc comment is hard to parse. Something like "Places points from two numeric fields, in the system crs names (longitude/latitude when empty), whatever system the input layer has." says what the function does more directly. Left for the release quality pass if you prefer.
Category: quality
There was a problem hiding this comment.
Included in 9962be862f: the comment now describes the X/Y fields' requested coordinate system and its longitude/latitude default, and states separately that the input layer's geometry system does not determine those coordinates.
Code reviewScope: one file, Bugs
Security
Performance
Quality
AGENTS.md
Twins checked
Earlier concerns: none. Change sizeCompared: the whole PR against main (merge base b0a2717 to PR head 4b77571).
|
📖 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 |
Code reviewNo new findings. I did not post any inline comments. Bugs: None found. The default change from Security: None found. The new non-string check rejects arrays, booleans and numbers before parsing. Performance: None found. The change adds one branch and one Quality: One nit, left alone. The doc comment at AGENTS.md: None found. The change has no Already raised, left alone (2 earlier threads):
Twins checked:
I could not build or run the tests in this environment, since I have no shell. The findings above come from reading the diff and the surrounding source. Change sizeCompared with the base branch: the whole PR against main (merge base b0a2717 to PR head 9962be8).
|
Summary
XY Table To Point now says when it assumes WGS 84 because no coordinate system was given. Explicit text coordinate systems keep their existing behavior; non-text values are refused with “crs must be text”. The resulting points and exported bytes are unchanged.
The shared tool result reaches the desktop, browser, phone, CLI, Python, Assistant, MCP and plugins through the existing tool command. No new parameter, saved format or dependency is introduced, and the change holds no additional feature rows. The generated layer can still be removed or undone.
Validation
The original eleven-case check covered empty, whitespace and explicit coordinate systems across CLI, Python and the tool pane; ten successful exports were byte-identical. Independent Sol review approved that exact patch. On main
b0a271707, the missing-notice regression failed with the fix removed and passed after restoration; the existing file-output regression, formatting and test hygiene passed. Fork CI passed on4b775719e2.The review fix in
9962be862fpassed the numeric-CRS regression (red before the guard, green after it) and fork CI. Current-head public checks are running.UI evidence
The same tool run with an empty Coordinate System field, before and after the notice:
Part of #1998.
Summary by CodeRabbit