Repository navigation
Route, Simulation and annotation made from a layer in degrees take the project's coordinate system (C3a part 3) - #2782
Conversation
…yer made in longitude/latitude in the project's coordinate system (C3a part 3)
|
No actionable comments were generated in the recent review. Walkthrough
Merge Risk:
|
| point is found in its own coordinates, where a map in that system draws it; a moved label that | ||
| The annotation layer is held in the labelled layer's system; for a layer in | ||
| longitude/latitude, Web Mercator or another system in degrees, in the project's coordinate | ||
| system when it has one (not a geocentric one). In a projected system a label's point is found in its own coordinates, where a map in that system draws it; a moved label that |
There was a problem hiding this comment.
Nit: this paragraph line runs far past the wrap width the rest of the guide uses. Rewrap the paragraph so each line stays near 100 columns.
Category: quality
Code reviewI checked the three call sites ( Bugs: None found. Security: None. Performance: No new issues. The added conversion is one pass over the new layer, and the PR states its memory multiple (about 2× then 1×), consistent with Quality:
AGENTS.md:
Already raised earlier: 0. There are no prior review threads on this PR. Change sizeCompared with the base branch (merge base 78fd00f to PR head 7ffcc20), the whole PR against
|
📖 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 |
Part 3 of C3a in #2032, after #2776 (part 2).
Part 2 holds a tool's output made in longitude/latitude in the project's coordinate system. Part 3 applies the same rule to the three engine commands that make a layer from another one, as #2776 promised.
What changes
Commands covered:
analysis.route)analysis.simulate)labels.convert)The rule: when the source layer is in longitude/latitude, Web Mercator or another system in degrees, and the project has a coordinate system, the new layer is held in the project's system, with it as its own
crs. Before, the new layer took the source's system, and it still does without a project system.Refusals: a place the project's system can't hold (beyond 85.05° in Web Mercator) leaves the layer in longitude/latitude, said once:
That notice used to name the layer twice; now it names it once.
Cancel: a Cancel during the conversion stops the command, which adds nothing, as before.
All three go through
workflows::hold_as, which now asksmade_infor the system.Memory
Each new layer is converted once through
Dataset::hold_as. Since #2776, that keeps the converted geometry beside the rows and copies no attributes, so the peak is about 2× the new layer's geometry, then 1×. The layers are a route, up to 1,000,000 simulated points, or one point per label. Nothing else is copied.Thread
The three commands already run on the session's thread, and the conversion adds to that. It looks at Cancel every 256 rows, as
hold_indoes. Moving Simulation onto a background thread, which its million points might call for, is out of scope here.Surfaces
analysis.route,analysis.simulateandlabels.convertare commands, so the desktop, the web app, the CLI, Python and the Assistant/MCP all reach the change. No command or parameter changes.Docs:
Tests
In
tests/project_crs.rs:layers_made_from_another_in_longitude_latitude_take_the_project_system:a_layer_made_from_another_the_project_system_cant_hold_stays_in_longitude_latitude:Summary by CodeRabbit