MySQL 8.0.40
Source Code Documentation
line_interpolate.h
Go to the documentation of this file.
1/* Copyright (c) 2020, 2024, Oracle and/or its affiliates.
2
3 This program is free software; you can redistribute it and/or modify
4 it under the terms of the GNU General Public License, version 2.0,
5 as published by the Free Software Foundation.
6
7 This program is designed to work with certain software (including
8 but not limited to OpenSSL) that is licensed under separate terms,
9 as designated in a particular file or component or in included license
10 documentation. The authors of MySQL hereby grant you an additional
11 permission to link the program and your derivative works with the
12 separately licensed software that they have either included with
13 the program or referenced in the documentation.
14
15 This program is distributed in the hope that it will be useful,
16 but WITHOUT ANY WARRANTY; without even the implied warranty of
17 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
18 GNU General Public License, version 2.0, for more details.
19
20 You should have received a copy of the GNU General Public License
21 along with this program; if not, write to the Free Software
22 Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */
23
24/**
25 @file
26
27 Interface for obtaining a point at a given distance on a linestring
28*/
29
30#ifndef SQL_GIS_LINE_INTERPOLATE_H_INCLUDED
31#define SQL_GIS_LINE_INTERPOLATE_H_INCLUDED
32
33#include <memory> // std::unique_ptr
34
35#include "sql/dd/types/spatial_reference_system.h" // dd::Spatial_reference_system
36#include "sql/gis/geometries.h"
37
38namespace gis {
39/// Finds the point in a linestring at a given distance from the starting point.
40///
41/// @param[in] srs The spatial reference system.
42/// @param[in] g Input geometry.
43/// @param[in] interpolation_distance The distance from the starting point.
44/// @param[in] return_multiple_points True if the return geometry should be a
45/// multipoint. False if the return value should be a single point.
46/// @param[in] func_name Function name used in error reporting.
47/// @param[out] result Result. Invalid if `result_null`.
48/// @param[out] result_null Whether result is `NULL` instead of `result`.
49///
50/// @retval false Success.
51/// @retval true An error has occurred. The error has been reported with
52/// my_error().
54 const Geometry *g,
55 const double interpolation_distance,
56 const bool return_multiple_points,
57 const char *func_name,
58 std::unique_ptr<Geometry> *result,
59 bool *result_null) noexcept;
60
61} // namespace gis
62
63#endif // SQL_GIS_LINE_INTERPOLATE_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 line_interpolate_point(const dd::Spatial_reference_system *srs, const Geometry *g, const double interpolation_distance, const bool return_multiple_points, const char *func_name, std::unique_ptr< Geometry > *result, bool *result_null) noexcept
Finds the point in a linestring at a given distance from the starting point.
Definition: line_interpolate.cc:88
Definition: result.h:30