ST_FrechetDistance()¶
Computes the discrete Frechet distance between two geometries.
Syntax¶
ST_FrechetDistance(geom1, geom2)
Arguments¶
Argument |
Description |
|---|---|
|
First GEOMETRY or GEOMETRY32 value. |
|
Second value from the same geometry family. |
Return Value¶
Returns FLOAT64 for GEOMETRY inputs and FLOAT32 for GEOMETRY32 inputs.
Usage Notes¶
Examples¶
DROP DATABASE IF EXISTS geo_operation_demo;
CREATE DATABASE geo_operation_demo;
USE geo_operation_demo;
SELECT ST_FrechetDistance(ST_GeomFromText('LINESTRING(0 0,10 0)'), ST_GeomFromText('LINESTRING(0 1,10 1)')) AS distance_value;
DROP DATABASE geo_operation_demo;