Skip to content

Comments

Add Measure Tool#146

Merged
frewsxcv merged 3 commits intomainfrom
measure-tool
Nov 21, 2025
Merged

Add Measure Tool#146
frewsxcv merged 3 commits intomainfrom
measure-tool

Conversation

@google-labs-jules
Copy link
Contributor

Introduces a new Measure Tool in the UI. When selected, users can click on the map to set a start point. Moving the mouse displays a line and the distance to the cursor position. The distance is calculated using the Haversine formula, transforming projected coordinates to WGS84 Lat/Lon using geo-geodesy. The tool uses rgis-mouse for input handling and rgis-ui for rendering the overlay.


PR created automatically by Jules for task 13093766333491556391 started by @frewsxcv

- Add `Measure` tool to `rgis_settings::Tool` enum.
- Add "Measure Tool" button to `rgis-ui` top panel.
- Add `MeasureState` resource to `rgis-mouse` to store measurement start point.
- Implement `measure_click_system` in `rgis-mouse` to handle start point selection.
- Implement `render_measure_tool` system in `rgis-ui` to:
    - Render a line between start point and current mouse position.
    - Calculate and display Haversine distance using `geo` and `geo-geodesy`.
    - Transform coordinates from projected CRS to WGS84 (EPSG:4326).
@google-labs-jules
Copy link
Contributor Author

👋 Jules, reporting for duty! I'm here to lend a hand with this pull request.

When you start a review, I'll add a 👀 emoji to each comment to let you know I've read it. I'll focus on feedback directed at me and will do my best to stay out of conversations between you and other bots or reviewers to keep the noise down.

I'll push a commit with your requested changes shortly after. Please note there might be a delay between these steps, but rest assured I'm on the job!

For more direct control, you can switch me to Reactive Mode. When this mode is on, I will only act on comments where you specifically mention me with @jules. You can find this option in the Pull Request section of your global Jules UI settings. You can always switch back!


For security, I will only act on instructions from the user who triggered this task.

New to Jules? Learn more at jules.google/docs.

- Add `Measure` tool to `rgis_settings::Tool` enum.
- Add "Measure Tool" button to `rgis-ui` top panel.
- Add `MeasureState` resource to `rgis-mouse` to store measurement start point.
- Implement `measure_click_system` in `rgis-mouse` to handle start point selection.
- Implement `render_measure_tool` system in `rgis-ui` to:
    - Render a line between start point and current mouse position.
    - Calculate and display Haversine distance using `geo` and `geo-geodesy`.
    - Transform coordinates from projected CRS to WGS84 (EPSG:4326).
- Fix: Make `distance_to_readable_string` public.
- Fix: Use `geo::Geometry` for `Transformer`.
- Fix: Use `Haversine::distance` instead of deprecated `HaversineDistance` trait.
- Add `Measure` tool to `rgis_settings::Tool` enum.
- Add "Measure Tool" button to `rgis-ui` top panel.
- Add `MeasureState` resource to `rgis-mouse` to store measurement start point.
- Implement `measure_click_system` in `rgis-mouse` to handle start point selection.
- Implement `render_measure_tool` system in `rgis-ui` to:
    - Render a line between start point and current mouse position.
    - Calculate and display Haversine distance using `geo` and `geo-geodesy`.
    - Transform coordinates from projected CRS to WGS84 (EPSG:4326).
- Fix: Make `distance_to_readable_string` public.
- Fix: Use `geo::Geometry` for `Transformer`.
- Fix: Use deprecated `HaversineDistance` trait with suppression to resolve compilation error regarding undeclared type `Haversine`.
@frewsxcv frewsxcv marked this pull request as ready for review November 21, 2025 19:00
@frewsxcv frewsxcv merged commit e96a21c into main Nov 21, 2025
0 of 2 checks passed
@frewsxcv frewsxcv deleted the measure-tool branch November 21, 2025 19:00
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.

1 participant