MySQL 8.4.2
Source Code Documentation
hausdorff_distance.h
Go to the documentation of this file.
1#ifndef GIS__HAUSDORFF_DISTANCE_H_INCLUDED
2#define GIS__HAUSDORFF_DISTANCE_H_INCLUDED
3
4// Copyright (c) 2020, 2024, Oracle and/or its affiliates.
5//
6// This program is free software; you can redistribute it and/or modify
7// it under the terms of the GNU General Public License, version 2.0,
8// as published by the Free Software Foundation.
9//
10// This program is designed to work with certain software (including
11// but not limited to OpenSSL) that is licensed under separate terms,
12// as designated in a particular file or component or in included license
13// documentation. The authors of MySQL hereby grant you an additional
14// permission to link the program and your derivative works with the
15// separately licensed software that they have either included with
16// the program or referenced in the documentation.
17//
18// This program is distributed in the hope that it will be useful,
19// but WITHOUT ANY WARRANTY; without even the implied warranty of
20// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
21// GNU General Public License, version 2.0, for more details.
22//
23// You should have received a copy of the GNU General Public License
24// along with this program; if not, write to the Free Software
25// Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
26
27/// @file
28///
29/// This file declares the interface to calculate the discrete Hausdorff
30/// distance between linestrings.
31
32#include "sql/dd/types/spatial_reference_system.h" // dd::Spatial_reference_system
33#include "sql/gis/geometries.h"
34
35namespace gis {
36/// Computes the discrete hausdorff distance between linestrings
37///
38/// @param[in] srs The spatial reference system, common to both geometries.
39/// @param[in] g1 First geometry.
40/// @param[in] g2 Second geometry.
41/// @param[in] func_name Function name used in error reporting.
42/// @param[out] hausdorff_distance The Hausdorff distance between g1 and g2 in
43/// the SRS' linear unit.
44/// @param[out] null True if the return value is NULL.
45///
46/// @retval false Success.
47/// @retval true An error has occurred. The error has been reported with
48/// my_error().
50 const Geometry *g1, const Geometry *g2,
51 const char *func_name, double *hausdorff_distance,
52 bool *null) noexcept;
53
54} // namespace gis
55
56#endif // GIS__HAUSDORFF_DISTANCE_H_INCLUDED
Definition: spatial.h:213
Definition: spatial_reference_system.h:53
This file declares the geometry class hierarchy used by the server as the internal representation of ...
Definition: area.cc:47
bool hausdorff_distance(const dd::Spatial_reference_system *srs, const Geometry *g1, const Geometry *g2, const char *func_name, double *hausdorff_distance, bool *is_null) noexcept
Computes the discrete hausdorff distance between linestrings.
Definition: hausdorff_distance.cc:135