MySQL 8.0.39
Source Code Documentation
Geometry_grouper< Base_type > Class Template Reference

Retrieve from a geometry collection geometries of the same base type into a multi-xxx geometry object. More...

Inheritance diagram for Geometry_grouper< Base_type >:
[legend]

Public Member Functions

 Geometry_grouper (Group_type *out)
 
 Geometry_grouper (Gis_geometry_collection *out, String *gcbuf)
 
void on_wkb_start (Geometry::wkbByteOrder, Geometry::wkbType geotype, const void *wkb, uint32, bool) override
 Notified when scanner sees the start of a geometry WKB. More...
 
void on_wkb_end (const void *wkb_end) override
 Notified when scanner sees the end of a geometry WKB. More...
 
- Public Member Functions inherited from WKB_scanner_event_handler
virtual ~WKB_scanner_event_handler ()=default
 
virtual bool continue_scan () const
 

Private Types

typedef Gis_wkb_vector< Base_type > Group_type
 

Private Attributes

std::vector< Geometry::wkbTypem_types
 
std::vector< const void * > m_ptrs
 
Group_typem_group
 
Gis_geometry_collectionm_collection
 
Stringm_gcbuf
 
Geometry::wkbType m_target_type
 

Detailed Description

template<typename Base_type>
class Geometry_grouper< Base_type >

Retrieve from a geometry collection geometries of the same base type into a multi-xxx geometry object.

For example, group all points and multipoints into a single multipoint object, where the base type is point.

Template Parameters
Base_typethe base type to group.

Member Typedef Documentation

◆ Group_type

template<typename Base_type >
typedef Gis_wkb_vector<Base_type> Geometry_grouper< Base_type >::Group_type
private

Constructor & Destructor Documentation

◆ Geometry_grouper() [1/2]

template<typename Base_type >
Geometry_grouper< Base_type >::Geometry_grouper ( Group_type out)
inlineexplicit

◆ Geometry_grouper() [2/2]

template<typename Base_type >
Geometry_grouper< Base_type >::Geometry_grouper ( Gis_geometry_collection out,
String gcbuf 
)
inline

Member Function Documentation

◆ on_wkb_end()

template<typename Base_type >
void Geometry_grouper< Base_type >::on_wkb_end ( const void *  wkb)
inlineoverridevirtual

Notified when scanner sees the end of a geometry WKB.

Parameters
wkbthe position of the first byte after the WKB byte string which the scanner just scanned.

Implements WKB_scanner_event_handler.

◆ on_wkb_start()

template<typename Base_type >
void Geometry_grouper< Base_type >::on_wkb_start ( Geometry::wkbByteOrder  bo,
Geometry::wkbType  geotype,
const void *  wkb,
uint32  len,
bool  has_hdr 
)
inlineoverridevirtual

Notified when scanner sees the start of a geometry WKB.

Parameters
bobyte order of the WKB.
geotypegeometry type of the WKB;
wkbWKB byte string, the first byte after the WKB header if any.
lenNO. of bytes of the WKB byte string starting from wkb. There can be many geometries in the [wkb, wkb+len) buffer.
has_hdrwhether there is a WKB header right before 'wkb' in the byte string.

Implements WKB_scanner_event_handler.

Member Data Documentation

◆ m_collection

template<typename Base_type >
Gis_geometry_collection* Geometry_grouper< Base_type >::m_collection
private

◆ m_gcbuf

template<typename Base_type >
String* Geometry_grouper< Base_type >::m_gcbuf
private

◆ m_group

template<typename Base_type >
Group_type* Geometry_grouper< Base_type >::m_group
private

◆ m_ptrs

template<typename Base_type >
std::vector<const void *> Geometry_grouper< Base_type >::m_ptrs
private

◆ m_target_type

template<typename Base_type >
Geometry::wkbType Geometry_grouper< Base_type >::m_target_type
private

◆ m_types

template<typename Base_type >
std::vector<Geometry::wkbType> Geometry_grouper< Base_type >::m_types
private

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