I’m seeing what appears to be an incompatibility between Meshes.jl and Distances.jl, or possibly a missing method that existed in an earlier release.
Environment
julia> versioninfo()
Julia Version 1.13.3
Commit 67ac47b9cd (2026-10-25 15:28 UTC)
Build Info:
Official https://julialang.org release
Platform Info:
OS: Windows (x86_64-w64-mingw32)
CPU: 8 × Intel(R) Core(TM) Ultra 7 258V
WORD_SIZE: 64
LLVM: libLLVM-20.1.8 (ORCJIT, lunarlake)
GC: Built with stock GC
Threads: 1 default, 1 interactive, 1 GC (on 8 virtual cores)
Environment:
JULIA_EDITOR = code
JULIA_VSCODE_REPL = 1
julia> using Pkg
julia> Pkg.status(["GeoStats", "Meshes", "Distances"])
Status `Project.toml`
[dcc97b0b] GeoStats v0.91.0
[eacbb407] Meshes v0.60.14
Minimal Working Example
using Meshes
using Distances
p1 = Point(0, 0)
p2 = Point(1, 1)
println(typeof(p1))
println(typeof(p2))
evaluate(Euclidean(), p1, p2)
Output
Point{𝔼{2}, Cartesian2D{NoDatum, Quantity{Float64, 𝐋, Unitful.FreeUnits{(m,), 𝐋, nothing}}}}
Point{𝔼{2}, Cartesian2D{NoDatum, Quantity{Float64, 𝐋, Unitful.FreeUnits{(m,), 𝐋, nothing}}}}
followed by:
ERROR: MethodError: no method matching oneunit(::Type{Any})
Stacktrace:
[1] oneunit(::Type{Any})
@ Base .\missing.jl:106
[2] _eval_start(d::Euclidean, ::Type{Any}, ::Type{Any}, ::Nothing)
@ Distances ...\Distances\src\metrics.jl:323
[3] _eval_start(d::Euclidean, ::Type{Any}, ::Type{Any})
@ Distances ...\Distances\src\metrics.jl:321
[4] eval_start(d::Euclidean,
a::Point{...},
b::Point{...})
@ Distances ...\Distances\src\metrics.jl:320
[5] _evaluate
@ Distances ...\Distances\src\metrics.jl:239
[6] evaluate(dist::Euclidean,
a::Point{...},
b::Point{...})
@ Distances ...\Distances\src\generic.jl:47
Expected behaviour
I would expect the Euclidean distance between the two points to be returned:
1.4142135623730951 m
(or whatever the currently supported equivalent API is for point-to-point distance calculations in Meshes).
Context
This surfaced while updating an older codebase that computes distances between centroids and point locations:
centre = centroid(polygon)
d = evaluate(Euclidean(), centre, point)
The same error occurs in the minimal example above, so it does not appear to be related to GeoStats domains, CRS transformations, DataFrames, or user code.
My questions are:
-
Is
evaluate(Euclidean(), point1, point2)still intended to work withMeshes.Point? -
If not, what is the recommended way to compute Euclidean distances between two
Points in currentMeshes.jlreleases? -
If it should work, is this a bug in the interaction between
Meshes.jlandDistances.jl?