You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[Bug]: The measure tool, the attribute table's Calculate Geometry and network edge lengths are still on the sphere, and disagree with the ellipsoidal geoprocessing tools #939
After #905 (buffers, Tissot's circles, Spatial Join distances on WGS 84) and #928 (the geoprocessing Calculate Geometry on WGS 84), three user-facing measurement paths still compute on the mean sphere (R = 6,371,008.8 m), so they now disagree with the fixed paths:
Path
Where
Still spherical?
gp tool calculateGeometry (analysis/src/tools.rs, #928)
Two of these are the same feature name shown to the user: "Calculate Geometry" in the geoprocessing ribbon gives the WGS 84 area, while the same button in the attribute table gives the sphere area for the same polygon — about 0.26 % apart (0.26 km² on a 100 km² municipality at 46.6°N, per #894's measurements). PR #905's summary explicitly left lengths and areas to #894.
Attribute table → Calculate Geometry (edit.calculateGeometry), area in m².
rustgis-cli run --data … --cmd 'gp.run={"tool":"calculateGeometry", …}'.
The two area fields differ by ~0.26 % in mid-latitudes.
Also: the measure tool's area and length for the same polygon differ from both.
Expected behavior
One measurement, wherever it is taken from. Either shared ellipsoidal length/area helpers (geographiclib-rs is already a dependency and offers PolygonArea; the wgs84_distance_m helper from #905 could grow into full length/area wrappers), or, as a stop-gap, the properties panel and labels say which approximations each number uses.
Where it may come from
haversine_m, geodesic_length_m and geodesic_ring_area_m2 in crates/geom/src/lib.rs still use EARTH_RADIUS_M. edit.calculateGeometry, the measure tool and the network arrived at the ellipsoidal work later than the gp path, so they never switched. Note the network's spherical edge lengths also decide which path is shortest, not just the printed length, so a route may differ from the geodesically optimal one.
Activity