MySQL 8.0.29
Source Code Documentation
frechet_distance.h
Go to the documentation of this file.
1#ifndef GIS__FRECHET_DISTANCE_H_INCLUDED
2#define GIS__FRECHET_DISTANCE_H_INCLUDED
3
4// Copyright (c) 2020, 2021, 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 also distributed 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 included with MySQL.
16//
17// This program is distributed in the hope that it will be useful,
18// but WITHOUT ANY WARRANTY; without even the implied warranty of
19// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
20// GNU General Public License, version 2.0, for more details.
21//
22// You should have received a copy of the GNU General Public License
23// along with this program; if not, write to the Free Software
24// Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
25
26/// @file
27///
28/// This file declares the interface to calculate the discrete Frechet distance
29/// between linestrings.
30
31#include "sql/dd/types/spatial_reference_system.h" // dd::Spatial_reference_system
32#include "sql/gis/geometries.h"
33
34namespace gis {
35/// Computes the discrete Frechet distance between linestrings
36///
37/// @param[in] srs The spatial reference system, common to both geometries.
38/// @param[in] g1 First geometry.
39/// @param[in] g2 Second geometry.
40/// @param[in] func_name Function name used in error reporting.
41/// @param[out] frechet_distance The Frechet distance between g1 and g2 in the
42/// SRS' linear unit.
43/// @param[out] null True if the return value is NULL.
44///
45/// @retval false Success.
46/// @retval true An error has occurred. The error has been reported with
47/// my_error().
49 const Geometry *g1, const Geometry *g2,
50 const char *func_name, double *frechet_distance,
51 bool *null) noexcept;
52
53} // namespace gis
54
55#endif // GIS__FRECHET_DISTANCE_H_INCLUDED
Definition: spatial.h:214
Definition: spatial_reference_system.h:52
This file declares the geometry class hierarchy used by the server as the internal representation of ...
Definition: area.cc:46
bool frechet_distance(const dd::Spatial_reference_system *srs, const Geometry *g1, const Geometry *g2, const char *func_name, double *frechet_distance, bool *is_null) noexcept
Computes the discrete Frechet distance between linestrings.
Definition: frechet_distance.cc:73