MySQL  8.0.22
Source Code Documentation
gis::Coordinate_range_visitor Class Reference

A visitor that checks if coordinates are within range for a spatial reference system. More...

#include <coordinate_range_visitor.h>

Inheritance diagram for gis::Coordinate_range_visitor:
gis::Nop_visitor gis::Geometry_visitor

Public Member Functions

 Coordinate_range_visitor (const dd::Spatial_reference_system *srs)
 Construct a new coordinate range visitor. More...
 
bool longitude_out_of_range () const
 Check if the visitor has detected any out of range longitude values. More...
 
bool latitude_out_of_range () const
 Check if the visitor has detected any out of range latitude values. More...
 
double coordinate_value () const
 Get the coordinate value that is out of range. More...
 
bool visit_enter (Geometry *) override
 Enters a compound geometry. More...
 
bool visit (Point *pt) override
 
- Public Member Functions inherited from gis::Nop_visitor
bool visit_enter (Geometry *) override
 Enters a compound geometry. More...
 
bool visit_enter (Curve *c) override
 
bool visit_enter (Linestring *ls) override
 
bool visit_enter (Linearring *lr) override
 
bool visit_enter (Surface *s) override
 
bool visit_enter (Polygon *py) override
 
bool visit_enter (Geometrycollection *gc) override
 
bool visit_enter (Multipoint *mpt) override
 
bool visit_enter (Multicurve *mc) override
 
bool visit_enter (Multilinestring *mls) override
 
bool visit_enter (Multisurface *ms) override
 
bool visit_enter (Multipolygon *mpy) override
 
bool visit (Geometry *) override
 Visits a geometry. More...
 
bool visit (Point *pt) override
 
bool visit (Curve *c) override
 
bool visit (Linestring *ls) override
 
bool visit (Linearring *lr) override
 
bool visit (Surface *s) override
 
bool visit (Polygon *py) override
 
bool visit (Geometrycollection *gc) override
 
bool visit (Multipoint *mpt) override
 
bool visit (Multicurve *mc) override
 
bool visit (Multilinestring *mls) override
 
bool visit (Multisurface *ms) override
 
bool visit (Multipolygon *mpy) override
 
bool visit_leave (Geometry *) override
 Leaves a compound geometry. More...
 
bool visit_leave (Curve *c) override
 
bool visit_leave (Linestring *ls) override
 
bool visit_leave (Linearring *lr) override
 
bool visit_leave (Surface *s) override
 
bool visit_leave (Polygon *py) override
 
bool visit_leave (Geometrycollection *gc) override
 
bool visit_leave (Multipoint *mpt) override
 
bool visit_leave (Multicurve *mc) override
 
bool visit_leave (Multilinestring *mls) override
 
bool visit_leave (Multisurface *ms) override
 
bool visit_leave (Multipolygon *mpy) override
 
- Public Member Functions inherited from gis::Geometry_visitor
 Geometry_visitor ()
 
virtual ~Geometry_visitor ()
 

Private Attributes

const dd::Spatial_reference_systemm_srs
 Spatial reference system of the geometry. More...
 
bool m_detected_longitude
 Whether an out of range longitude value has been encountered. More...
 
bool m_detected_latitude
 Whether an out of range latitude value has been encountered. More...
 
double m_coordinate
 The coordinate value that is out of range, in SRS unit. More...
 

Detailed Description

A visitor that checks if coordinates are within range for a spatial reference system.

If a coordinate value is found to be out of range, the visitor returns true. Otherwise, it retruns false.

Checking stops on the first value found to be out of range. Cartesian coordinates are always within range.

Constructor & Destructor Documentation

◆ Coordinate_range_visitor()

gis::Coordinate_range_visitor::Coordinate_range_visitor ( const dd::Spatial_reference_system srs)
inline

Construct a new coordinate range visitor.

Parameters
srsThe spatial reference system of the geometry.

Member Function Documentation

◆ coordinate_value()

double gis::Coordinate_range_visitor::coordinate_value ( ) const
inline

Get the coordinate value that is out of range.

Returns
The coordinate value in the SRS unit.

◆ latitude_out_of_range()

bool gis::Coordinate_range_visitor::latitude_out_of_range ( ) const
inline

Check if the visitor has detected any out of range latitude values.

Return values
trueAt least one out of range latitude value.
falseAll latitude values are within range.

◆ longitude_out_of_range()

bool gis::Coordinate_range_visitor::longitude_out_of_range ( ) const
inline

Check if the visitor has detected any out of range longitude values.

Return values
trueAt least one out of range longitude value.
falseAll longitude values are within range.

◆ visit()

bool gis::Coordinate_range_visitor::visit ( Point pt)
inlineoverridevirtual

Implements gis::Geometry_visitor.

◆ visit_enter()

bool gis::Coordinate_range_visitor::visit_enter ( Geometry g)
inlineoverridevirtual

Enters a compound geometry.

This is called on entry to a compound geometry, i.e., all geometries except points.

Parameters
gThe geometry to visit.
Return values
trueDon't descend into children.
falseDescend into children.

Implements gis::Geometry_visitor.

Member Data Documentation

◆ m_coordinate

double gis::Coordinate_range_visitor::m_coordinate
private

The coordinate value that is out of range, in SRS unit.

◆ m_detected_latitude

bool gis::Coordinate_range_visitor::m_detected_latitude
private

Whether an out of range latitude value has been encountered.

◆ m_detected_longitude

bool gis::Coordinate_range_visitor::m_detected_longitude
private

Whether an out of range longitude value has been encountered.

◆ m_srs

const dd::Spatial_reference_system* gis::Coordinate_range_visitor::m_srs
private

Spatial reference system of the geometry.


The documentation for this class was generated from the following file: