[ADD] geoengine_tools: measure toolbox#4
Merged
Conversation
0310bf8 to
a409180
Compare
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>
a409180 to
ea7b472
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
Adds a read-only measure toolbox to the
GeoengineRenderer(modulegeoengine_tools), available to every user since measuring never alters data. Implemented as apatchon the renderer prototype + a small CSS file (picked up by the existingstatic/src/**/*asset glob — no manifest change).Tools (controls stacked on the right side of the map)
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 fromgeoengine_swisstopo) the native E/N coordinates are shown as well.fa-arrows-h): geodesic length of a drawn line.fa-square-o): geodesic area and perimeter of a drawn polygon.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 avoid0.00 mnoise. Exact minimum gap via vertex-to-closest-point sampling both ways, with a bbox pre-filter.fa-copy/fa-clipboard): clipboard export of measurements.fa-eraser): clear all measurements and restore normal selection.Notes
ol.sphere(geodesic), so they stay correct in any map projection without depending on the projection-aware modules.addSelectedClassToButtonhook; the coordinate readout is an independent toggle.🤖 Generated with Claude Code