MySQL 8.0.30
Source Code Documentation
is_valid_functor.h
Go to the documentation of this file.
1#ifndef SQL_GIS_IS_VALID_FUNCTOR_H_INCLUDED
2#define SQL_GIS_IS_VALID_FUNCTOR_H_INCLUDED
3
4// Copyright (c) 2017, 2022, 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#include <boost/geometry.hpp>
27
28#include "sql/gis/functor.h"
29
30namespace gis {
31
32class Is_valid : public Unary_functor<bool> {
33 private:
34 boost::geometry::strategy::intersection::geographic_segments<>
36
37 public:
38 Is_valid(double semi_major, double semi_minor);
39 bool operator()(const Geometry &g) const override;
40
41 bool eval(const Cartesian_point &g) const;
42 bool eval(const Cartesian_linestring &g) const;
43 bool eval(const Cartesian_polygon &g) const;
44 bool eval(const Cartesian_multipoint &g) const;
45 bool eval(const Cartesian_multipolygon &g) const;
46 bool eval(const Cartesian_multilinestring &g) const;
47 bool eval(const Cartesian_geometrycollection &g) const;
48 bool eval(const Geographic_point &g) const;
49 bool eval(const Geographic_linestring &g) const;
50 bool eval(const Geographic_polygon &g) const;
51 bool eval(const Geographic_multipoint &g) const;
52 bool eval(const Geographic_multipolygon &g) const;
53 bool eval(const Geographic_multilinestring &g) const;
54 bool eval(const Geographic_geometrycollection &g) const;
55};
56} // namespace gis
57#endif // SQL_GIS_IS_VALID_FUNCTOR_H_INCLUDED
A Cartesian 2d geometry collection.
Definition: geometries_cs.h:374
A Cartesian 2d linestring.
Definition: geometries_cs.h:70
A Cartesian 2d multilinestring.
Definition: geometries_cs.h:601
A Cartesian 2d multipoint.
Definition: geometries_cs.h:500
A Cartesian 2d multipolygon.
Definition: geometries_cs.h:719
A Cartesian 2d point.
Definition: geometries_cs.h:46
A Cartesian 2d polygon.
Definition: geometries_cs.h:268
A geographic (ellipsoidal) 2d geometry collection.
Definition: geometries_cs.h:437
A geographic (ellipsoidal) 2d linestring.
Definition: geometries_cs.h:124
A geographic (ellipsoidal) 2d multilinestring.
Definition: geometries_cs.h:660
A geographic (ellipsoidal) 2d multipoint.
Definition: geometries_cs.h:551
A geographic (ellipsoidal) 2d multipolygon.
Definition: geometries_cs.h:773
A geographic (ellipsoidal) 2d point.
Definition: geometries_cs.h:57
A geographic (ellipsoidal) 2d polygon.
Definition: geometries_cs.h:321
Abstract superclass for all geometric objects.
Definition: geometries.h:99
Definition: is_valid_functor.h:32
bool operator()(const Geometry &g) const override
Definition: is_valid.cc:50
bool eval(const Cartesian_point &g) const
Definition: is_valid.cc:52
boost::geometry::strategy::intersection::geographic_segments m_geographic_ll_la_aa_strategy
Definition: is_valid_functor.h:35
Is_valid(double semi_major, double semi_minor)
Definition: is_valid.cc:46
The base class of all functors that take one geometry argument.
Definition: functor.h:614
This file contains the superclasses for GIS functors.
Definition: area.cc:46