ST_HausdorffDistance(g1, g2 [, unit])

Returns the discrete Hausdorff distance between two geometries,
reflecting how similar the geometries are. The result is a
double-precision number measured in the length unit of the spatial
reference system (SRS) of the geometry arguments, or in the length unit
of the unit argument if that argument is given.

This function implements the discrete Hausdorff distance, which means
it is restricted to distances between the points of the geometries. For
example, given two LineString arguments, only the points explicitly
mentioned in the geometries are considered. Points on the line segments
between these points are not considered.

ST_HausdorffDistance() handles its geometry arguments as described in
the introduction to this section, with these exceptions:

o If the geometry arguments are in the same Cartesian or geographic
  SRS, but are not in a supported combination, an
  ER_NOT_IMPLEMENTED_FOR_CARTESIAN_SRS
  (https://dev.mysql.com/doc/mysql-errors/8.0/en/server-error-reference
  .html#error_er_not_implemented_for_cartesian_srs) or
  ER_NOT_IMPLEMENTED_FOR_GEOGRAPHIC_SRS
  (https://dev.mysql.com/doc/mysql-errors/8.0/en/server-error-reference
  .html#error_er_not_implemented_for_geographic_srs) error occurs,
  depending on the SRS type. These combinations are supported:

  o LineString and LineString

  o Point and MultiPoint

  o LineString and MultiLineString

  o MultiPoint and MultiPoint

  o MultiLineString and MultiLineString

ST_HausdorffDistance() handles its optional unit argument as described
in the introduction to this section.

URL: https://dev.mysql.com/doc/refman/8.0/en/spatial-relation-functions-object-shapes.html

