Skip to content
πŸŽ‰ SedonaDB 0.4.0 is out now! πŸ—ΊοΈ Python DataFrame API, R dplyr, Geography support & GPU-accelerated spatial joins. Read the release blog β†’

ST_FrechetDistance

Introduction: Computes and returns discrete Frechet Distance between the given two geometries, based on Computing Discrete Frechet Distance

If any of the geometries is empty, returns 0.0

ST_FrechetDistance

Format: ST_FrechetDistance(g1: Geometry, g2: Geometry)

Return type: Double

Since: v1.5.0

Example:

SELECT ST_FrechetDistance(ST_GeomFromWKT('POINT (0 1)'), ST_GeomFromWKT('LINESTRING (0 0, 1 0, 2 0, 3 0, 4 0, 5 0)'))

Output:

5.0990195135927845