# \`evaluate(Euclidean(), ::Point, ::Point)\` fails for simple Meshes points

**URL:** <https://discourse.julialang.org/t/evaluate-euclidean-point-point-fails-for-simple-meshes-points/142988>\
**Category:** General Usage\
**Tags:** question, distances, geostats, meshes\
**Created:** [November 17, 2026, 12:11pm UTC](https://discourse.julialang.org/t/evaluate-euclidean-point-point-fails-for-simple-meshes-points/142988 "2026-11-17T12:11:25Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![TimG](https://avatars.discourse-cdn.com/v4/letter/t/82dd89/32.png) [@TimG](https://discourse.julialang.org/u/TimG)\
**Post date:** [November 17, 2026, 12:11pm UTC](https://discourse.julialang.org/t/evaluate-euclidean-point-point-fails-for-simple-meshes-points/142988/1 "2026-11-17T12:11:25Z")

</div>

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

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

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

```julia

using Meshes

using Distances

p1 = Point(0, 0)

p2 = Point(1, 1)

println(typeof(p1))

println(typeof(p2))

evaluate(Euclidean(), p1, p2)

```

## Output

```julia

Point{𝔼{2}, Cartesian2D{NoDatum, Quantity{Float64, 𝐋, Unitful.FreeUnits{(m,), 𝐋, nothing}}}}

Point{𝔼{2}, Cartesian2D{NoDatum, Quantity{Float64, 𝐋, Unitful.FreeUnits{(m,), 𝐋, nothing}}}}

```

followed by:

```plaintext

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:

```julia

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:

```julia

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:

1. Is `evaluate(Euclidean(), point1, point2)` still intended to work with `Meshes.Point`?

2. If not, what is the recommended way to compute Euclidean distances between two `Point`s in current `Meshes.jl` releases?

3. If it should work, is this a bug in the interaction between `Meshes.jl` and `Distances.jl`?

---

<div class="post-metadata">

**Author:** ![juliohm](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/juliohm/32/215266_2.png) [@juliohm](https://discourse.julialang.org/u/juliohm)\
**Post date:** [November 17, 2026, 12:45pm UTC](https://discourse.julialang.org/t/evaluate-euclidean-point-point-fails-for-simple-meshes-points/142988/2 "2026-11-17T12:45:22Z")

</div>

Hi @TimG, sorry for the breaking change. We refactored our distances and they are now evaluated as functor objects:

> **[Distances · Meshes.jl](https://juliageometry.github.io/MeshesDocs/stable/distances/)**
>
> Documentation for Meshes.jl.

That was necessary to accommodate geodesic distances that are not adherent to the Distances.jl interface. You can create a `EuclideanDistance()` or `GeodesicDistance()` and call it with two points or segments, lines, etc:

```julia
d = EuclideanDistance()

d(p1, p2)

```
