AI Glossary / Computer vision and multimodal AI / Intermediate
Geodesic distance
Definition
Geodesic distance is the length of a shortest permitted path between two points within a specified surface or domain. Unlike straight-line distance through the surrounding space, it respects the geometry and any path constraints of that domain. In weighted settings, the path may minimize accumulated cost rather than ordinary physical length.
What it means
Two points can be close in three-dimensional space but far apart along a surface. Opposite folds of a sheet are an example: a straight line can cut through the air between them, while a surface-constrained route must follow the sheet.
The meaning of distance depends on the domain and metric. On a sphere it may be the length of a shortest great-circle arc. On an image grid, a weighted geodesic measure might make crossing strong boundaries expensive. These should not be confused with one universal formula.
A geodesic curve is not necessarily the globally shortest route between its endpoints. The distance refers to the shortest admissible length or its mathematical infimum, while other geodesic paths can exist.
How it works
The problem specifies the domain, allowed paths and how path length or cost is measured. A method then finds or approximates the minimum accumulated cost from one point or source set to another.
For simple surfaces, geometry gives a direct formula. For meshes and sampled domains, algorithms use representations of the surface or solve suitable equations. Some methods compute paths across triangle interiors; an edge-only graph search restricts the available routes and generally gives a different approximation.
The computed result depends on mesh quality, sampling and algorithmic assumptions. Disconnected components have no connecting path within the domain. Weighted costs can encode application preferences, so their numerical distance should not automatically be reported as meters.
Three practical examples
1. Shape analysis: A system compares positions on a three-dimensional surface using distances that follow the shape rather than cutting through it.
2. Image segmentation: A weighted path measure helps describe which pixels are easily connected to a seed without crossing expensive boundaries.
3. Geographic geometry: A mapping application estimates surface distance between locations using an appropriate Earth model, while distinguishing that from a road-network travel distance.
Think of it this way
Think of measuring with a flexible tape laid along a curved object rather than stretching a ruler through the object. The surface constrains the route the tape can take.
The analogy has limits because the tape might follow a route that is not shortest. Weighted image distances also use numerical costs rather than literal tape length, so the domain and metric must remain explicit.
Worked example
On a sphere of radius 10 units, consider two points separated by a central angle of 90 degrees, or π/2 radians. Their shortest surface distance is Rθ = 10 × π/2 = 5π, approximately 15.71 units.
The straight chord through the surrounding space has length 2R sin(θ/2) = 20 sin(45°), approximately 14.14 units. It is shorter because it is not constrained to stay on the sphere.
The longer great-circle route also connects the points, but its length is 15π and it is not the geodesic distance. This example uses an ideal sphere. Real geospatial calculations may require an ellipsoid or another appropriate model, and surface distance is still distinct from the route a vehicle can actually travel.
Illustrative case study
Fictional case: Maple Geometry develops a tool that spreads an edit across a folded mesh. Straight-line proximity accidentally affects a nearby fold that is far away along the surface. The team switches the influence definition to a surface-based distance.
It then checks the result on meshes with different resolutions and on disconnected pieces. An edge-only approximation is compared with a method that allows paths through triangle interiors. The designers choose the approach that meets their accuracy and response-time needs. This case illustrates selecting a meaningful distance, not claiming that one algorithm is universally best.
Common misconceptions and mistakes
Geodesic distance is not always a straight line in displayed coordinates. Flattening or projecting a surface can distort how its shortest paths appear.
A locally geodesic path is not necessarily globally shortest. The distance requires the minimum admissible route.
A shortest path on mesh edges is not automatically the exact shortest path on the mesh surface. Restricting paths to edges changes the search space.
Weighted geodesic distance may represent accumulated cost rather than physical length. Also, changing mesh connectivity can change the available routes even when the points look close in a rendered view.
Business use
Geodesic measures are useful when proximity should respect shape, connectivity or barriers. They can support modeling tools, segmentation and spatial analysis more meaningfully than ordinary Euclidean distance in the wrong space.
Specify the domain, units and weighting before using the values in a business rule. Evaluate approximation error on representative geometry and inspect disconnected or poorly sampled regions. A result labeled “distance” should make clear whether it measures physical length, graph cost or an application-specific quantity.
People also ask
Is geodesic distance always greater than Euclidean distance?
For ordinary length on a surface embedded in Euclidean space, a constrained path cannot be shorter than the straight chord. Other weighted metrics need separate interpretation.
Can there be several shortest paths?
Yes. Some geometries have multiple equally short routes, such as antipodal points on an ideal sphere.
Does every graph distance equal a surface geodesic distance?
No. A graph may approximate a surface or represent an entirely different network. Its edge weights and connectivity define its own path problem.
Check your understanding
Two points on opposite sides of a fold are close through space but far apart along the material. Which distance better describes travel constrained to that material?
Answer: A suitable surface geodesic distance. Straight-line Euclidean distance allows a shortcut away from the surface and therefore answers a different question.
Related terms
- Shortest Paths
- Euclidean distance
- Weighted graph
- intrinsic distance
- shortest path
- geodesic curve
- surface mesh
- distance transform
Learn next
Compare arc and chord distances on a circle or sphere. Then examine a folded mesh and compare straight-line, edge-graph and surface-path estimates. For image applications, experiment with path weights and record how their meaning changes the units and interpretation of the result.
More in Computer vision and multimodal AI
- Gamma encoding - Gamma encoding is the use of a nonlinear transfer curve to represent linear-light image values as stored or transmitted code values.
- Gaussian blur - Gaussian blur smooths an image by replacing each pixel with a weighted combination of neighboring values, using weights shaped like a Gaussian distribution.
- Generalized Hough transform - The generalized Hough transform is a shape-detection method that lets image features vote for possible locations and, in suitable variants, orientations and...
- Geographic information system (GIS) - A geographic information system, or GIS, is a system for managing, analyzing and displaying information linked to geographic locations.
- Geometric model - A geometric model is a mathematical or digital representation of an object's shape, size and spatial structure.
- Geometric transformation
Sources
Primary sources: Keenan Crane, Clarisse Weischedel and Max Wardetzky, heat-method project, https://www.cs.cmu.edu/~kmcrane/Projects/HeatMethod/ ; CGAL, “Triangulated Surface Mesh Shortest Paths,” https://doc.cgal.org/latest/Surface_mesh_shortest_path/index.html . Relevant returned explanations of distance and geodesic-path distinctions were reviewed. The sphere calculation is an original geometric example.
Previous: Geodemographic segmentation Next: Geographic information system (GIS)