MySQL  8.0.27
Source Code Documentation
BG_geometry_collection Class Reference

A utility class to flatten any hierarchy of geometry collection into one with no nested geometry collections. More...

#include <item_geofunc.h>

Public Types

typedef std::vector< Geometry * > Geometry_list
 

Public Member Functions

 BG_geometry_collection ()
 
bool is_comp_no_overlapped () const
 
void set_comp_no_overlapped (bool b)
 
gis::srid_t get_srid () const
 
void set_srid (gis::srid_t srid)
 
bool fill (const Geometry *geo, bool break_multi_geom=false)
 
const Geometry_listget_geometries () const
 
Geometry_listget_geometries ()
 
bool all_isolated () const
 
size_t num_isolated () const
 
Gis_geometry_collectionas_geometry_collection (String *geodata) const
 Convert this into a Gis_geometry_collection object. More...
 

Private Member Functions

bool store_geometry (const Geometry *geo, bool break_multi_geom)
 Merge all components as appropriate so that the object contains only components that don't overlap. More...
 
Geometrystore (const Geometry *geo)
 Store a geometry of GEOMETRY format into this collection. More...
 

Private Attributes

bool comp_no_overlapped
 
gis::srid_t m_srid
 
size_t m_num_isolated
 
std::vector< Geometry * > m_geos
 
Inplace_vector< Geometry_bufferm_geobufs
 
Inplace_vector< Stringm_geosdata
 

Detailed Description

A utility class to flatten any hierarchy of geometry collection into one with no nested geometry collections.

All components are stored separately and all their data stored in this class, in order to easily manipulate them.

Member Typedef Documentation

◆ Geometry_list

Constructor & Destructor Documentation

◆ BG_geometry_collection()

BG_geometry_collection::BG_geometry_collection ( )

Member Function Documentation

◆ all_isolated()

bool BG_geometry_collection::all_isolated ( ) const
inline

◆ as_geometry_collection()

Gis_geometry_collection * BG_geometry_collection::as_geometry_collection ( String geodata) const

Convert this into a Gis_geometry_collection object.

Parameters
geodataStores the result object's WKB data.
Returns
The Gis_geometry_collection object created from this object.

◆ fill()

bool BG_geometry_collection::fill ( const Geometry geo,
bool  break_multi_geom = false 
)
inline

◆ get_geometries() [1/2]

Geometry_list& BG_geometry_collection::get_geometries ( )
inline

◆ get_geometries() [2/2]

const Geometry_list& BG_geometry_collection::get_geometries ( ) const
inline

◆ get_srid()

gis::srid_t BG_geometry_collection::get_srid ( ) const
inline

◆ is_comp_no_overlapped()

bool BG_geometry_collection::is_comp_no_overlapped ( ) const
inline

◆ num_isolated()

size_t BG_geometry_collection::num_isolated ( ) const
inline

◆ set_comp_no_overlapped()

void BG_geometry_collection::set_comp_no_overlapped ( bool  b)
inline

◆ set_srid()

void BG_geometry_collection::set_srid ( gis::srid_t  srid)
inline

◆ store()

Geometry * BG_geometry_collection::store ( const Geometry geo)
private

Store a geometry of GEOMETRY format into this collection.

Parameters
geoa geometry object whose data of GEOMETRY format is to be duplicated and stored into this collection. It's not a geometry collection.
Returns
a duplicated Geometry object created from geo.

◆ store_geometry()

bool BG_geometry_collection::store_geometry ( const Geometry geo,
bool  break_multi_geom 
)
private

Merge all components as appropriate so that the object contains only components that don't overlap.

Store a Geometry object into this collection.

Template Parameters
CoordsysCoordinate system type, specified using those defined in boost::geometry::cs.
Parameters
[out]pnull_valuetakes back null_value set during the operation.

If it's a geometry collection, flatten it and store its components into this collection, so that no component is a geometry collection.

Parameters
geoThe Geometry object to put into this collection. We duplicate geo's data rather than directly using it.
break_multi_geomwhether break a multipoint or multilinestring or multipolygon so as to store its components separately into this object.
Returns
true if error occurred, false if no error(successful).

Member Data Documentation

◆ comp_no_overlapped

bool BG_geometry_collection::comp_no_overlapped
private

◆ m_geobufs

Inplace_vector<Geometry_buffer> BG_geometry_collection::m_geobufs
private

◆ m_geos

std::vector<Geometry *> BG_geometry_collection::m_geos
private

◆ m_geosdata

Inplace_vector<String> BG_geometry_collection::m_geosdata
private

◆ m_num_isolated

size_t BG_geometry_collection::m_num_isolated
private

◆ m_srid

gis::srid_t BG_geometry_collection::m_srid
private

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