Repository navigation
fix(data): a CSV export writes its coordinate columns first #1862
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
0ee8c16
f811646
11b6681
1ec3f88
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -709,6 +709,7 @@ fn write_layer(l: &rustgis_map::Layer, path: &str, asked: Option<Crs>, gpkg: Gpk | |
| // CSV holds a point a row, GPX a name for each feature and no areas. | ||
| if ext == "csv" { | ||
| said.extend(csv.notes(path)); | ||
| said.extend(csv.coordinates_note(&ds.fields, path)); | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Test coverage (Quality, confidence ~70%). This call is the only place the app/CLI export path adds the coordinate-column notice for a streamed or in-memory layer; the other path (
Member
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Left for the release quality pass: the data-level test pins the note, and adding an engine test means another engine build for a one-line call. |
||
| } | ||
| if ext == "gpx" { | ||
| said.extend(rustgis_data::io::gpx_notes(ds, rustgis_data::io::name_field(ds), path)); | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Dead branch (Quality, confidence ~85%).
coordinates_noteonly gets past the early return whenfound != Some((0, 1)), andfound_xycan't returnNonehere. Header 0 is either aLON_NAMES/LAT_NAMESname, orlongitude_1/latitude_1, which is only picked when every such name is already a field. Either wayfind(LON_NAMES)andfind(LAT_NAMES)both match, so theNonearm ("reads no coordinates") is unreachable and its wording would be wrong if it ever ran. Suggest stating the invariant instead:There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Left for the release quality pass: the arm is unreachable today, and it keeps the note honest if the reader's fallback names change.