Skip to content

[ADD] geoengine_tools: measure toolbox#4

Merged
leNeo merged 1 commit into
19.0-mig-base_geoenginefrom
19.0-add-geoengine_tools-measure
Jun 28, 2026
Merged

[ADD] geoengine_tools: measure toolbox#4
leNeo merged 1 commit into
19.0-mig-base_geoenginefrom
19.0-add-geoengine_tools-measure

Conversation

@leNeo

@leNeo leNeo commented Jun 28, 2026

Copy link
Copy Markdown
Owner

Description

Adds a read-only measure toolbox to the GeoengineRenderer (module geoengine_tools), available to every user since measuring never alters data. Implemented as a patch on the renderer prototype + a small CSS file (picked up by the existing static/src/**/* asset glob — no manifest change).

Tools (controls stacked on the right side of the map)

  • Coordinates (fa-crosshairs): live GPS (WGS84) coordinates of the mouse on hover. When the map runs in a projected CRS (e.g. EPSG:2056 / CH1903+ LV95 from geoengine_swisstopo) the native E/N coordinates are shown as well.
  • Distance (fa-arrows-h): geodesic length of a drawn line.
  • Surface/perimeter (fa-square-o): geodesic area and perimeter of a drawn polygon.
  • Proximity (fa-compress): prompts for a minimum distance and highlights every pair of map objects (parcels) closer than that threshold, with the measured gap. Touching/overlapping objects (gap < 1 cm) are ignored and features are deduped by id to avoid 0.00 m noise. Exact minimum gap via vertex-to-closest-point sampling both ways, with a bbox pre-filter.
  • Copy last / Copy all (fa-copy / fa-clipboard): clipboard export of measurements.
  • Eraser (fa-eraser): clear all measurements and restore normal selection.

Notes

  • All measurements use ol.sphere (geodesic), so they stay correct in any map projection without depending on the projection-aware modules.
  • Measure tools are mutually exclusive with the core draw/select/edit controls via the shared addSelectedClassToButton hook; the coordinate readout is an independent toggle.

🤖 Generated with Claude Code

@leNeo leNeo force-pushed the 19.0-add-geoengine_tools-measure branch from 0310bf8 to a409180 Compare June 28, 2026 21:37
Add a read-only measure toolbox to the GeoengineRenderer, available to
every user (measuring never alters data):

- Coordinate readout: live GPS (WGS84) coordinates on hover; native E/N
  shown too when the map runs in a projected CRS (e.g. EPSG:2056).
- Distance ruler: geodesic length of a drawn line.
- Surface/perimeter: geodesic area and perimeter of a drawn polygon.
- Proximity check: flags pairs of objects (parcels) closer than a given
  threshold; touching/overlapping objects (gap < 1 cm) are ignored and
  features are deduped by id to avoid 0 m noise.
- Clipboard export of the last / all measurements.

All measurements use ol.sphere (geodesic), so they stay correct in any
map projection without depending on the projection-aware modules.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@leNeo leNeo force-pushed the 19.0-add-geoengine_tools-measure branch from a409180 to ea7b472 Compare June 28, 2026 21:59
@leNeo leNeo merged commit 87e83d0 into 19.0-mig-base_geoengine Jun 28, 2026
4 checks passed
@leNeo leNeo deleted the 19.0-add-geoengine_tools-measure branch June 28, 2026 23:03
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