1#ifndef SQL_GIS_GEOMETRIES_CS_H_INCLUDED
2#define SQL_GIS_GEOMETRIES_CS_H_INCLUDED
77 std::vector<Cartesian_point, Malloc_allocator<Cartesian_point>>
m_points;
95 bool empty()
const override;
131 std::vector<Geographic_point, Malloc_allocator<Geographic_point>>
m_points;
149 bool empty()
const override;
275 std::vector<Cartesian_linearring, Malloc_allocator<Cartesian_linearring>>
288 bool empty()
const override;
308 std::size_t
size()
const override;
328 std::vector<Geographic_linearring, Malloc_allocator<Geographic_linearring>>
341 bool empty()
const override;
361 std::size_t
size()
const override;
404 if (!g->is_empty())
return false;
414 bool empty()
const override;
467 if (!g->is_empty())
return false;
477 bool empty()
const override;
504 std::vector<Cartesian_point, Malloc_allocator<Cartesian_point>>
m_points;
521 if (!pt.is_empty())
return false;
528 bool empty()
const override;
555 std::vector<Geographic_point, Malloc_allocator<Geographic_point>>
m_points;
571 if (!pt.is_empty())
return false;
578 bool empty()
const override;
605 std::vector<Cartesian_linestring, Malloc_allocator<Cartesian_linestring>>
623 if (!ls.is_empty())
return false;
630 bool empty()
const override;
664 std::vector<Geographic_linestring, Malloc_allocator<Geographic_linestring>>
682 if (!ls.is_empty())
return false;
689 bool empty()
const override;
723 std::vector<Cartesian_polygon, Malloc_allocator<Cartesian_polygon>>
741 if (!py.is_empty())
return false;
748 bool empty()
const override;
777 std::vector<Geographic_polygon, Malloc_allocator<Geographic_polygon>>
795 if (!py.is_empty())
return false;
802 bool empty()
const override;
Malloc_allocator is a C++ STL memory allocator based on my_malloc/my_free.
Definition: malloc_allocator.h:63
A Cartesian 2d geometry collection.
Definition: geometries_cs.h:375
void push_back(const Geometry &g) override
Adds a geometry to the collection.
Definition: geometries.cc:337
decltype(m_geometries) ::const_iterator const_iterator
Definition: geometries_cs.h:382
~Cartesian_geometrycollection() override
Definition: geometries_cs.h:393
Geometry & front() override
Returns the first geometry of the collection.
Definition: geometries_cs.h:425
Cartesian_geometrycollection()
Definition: geometries_cs.h:384
void resize(std::size_t count) override
Resizes the geometrycollection to contain a given number of elements.
Definition: geometries_cs.h:416
iterator end() noexcept
Definition: geometries_cs.h:422
const Geometry & front() const override
Definition: geometries_cs.h:426
std::size_t size() const override
Returns the size of the geometrycollection.
Definition: geometries_cs.h:415
iterator begin() noexcept
Definition: geometries_cs.h:419
const_iterator begin() const noexcept
Definition: geometries_cs.h:420
bool is_empty() const override
Check if this is an empty geometry.
Definition: geometries_cs.h:402
const_iterator end() const noexcept
Definition: geometries_cs.h:423
bool accept(Geometry_visitor *v) override
Applies a hierarchical visitor to this geometry.
Definition: geometries.cc:326
Cartesian_geometrycollection(Cartesian_geometrycollection &&gc) noexcept
Definition: geometries_cs.h:388
Coordinate_system coordinate_system() const override
Gets the coordinate system.
Definition: geometries_cs.h:398
Cartesian_geometrycollection * clone() const override
Clone pattern to easily duplicate a Geometrycollection.
Definition: geometries_cs.h:432
const Geometry & operator[](std::size_t i) const override
Definition: geometries_cs.h:429
std::vector< Geometry *, Malloc_allocator< Geometry * > > m_geometries
List of geometries in the collection.
Definition: geometries_cs.h:378
bool empty() const override
Checks if the collection is empty.
Definition: geometries.cc:407
decltype(m_geometries) ::iterator iterator
Definition: geometries_cs.h:381
void clear() noexcept override
Removes all geometries from the geometrycollection.
Definition: geometries_cs.h:417
void pop_front() override
Removes a geometry from the front of the collection.
Definition: geometries_cs.h:408
Geometry & operator[](std::size_t i) override
Definition: geometries_cs.h:428
A Cartesian 2d linear ring.
Definition: geometries_cs.h:177
bool is_empty() const override
Check if this is an empty geometry.
Definition: geometries_cs.h:184
void push_back(const gis::Point &pt) override
Adds a point to the end of the linestring.
Definition: geometries_cs.h:185
const Cartesian_point & front() const override
Definition: geometries_cs.h:210
void pop_front() override
Removes a point from the front of the linestring.
Definition: geometries_cs.h:191
Cartesian_point & front() override
Returns the first point of the linestring.
Definition: geometries_cs.h:209
Cartesian_point & back() override
Returns the last point of the linestring.
Definition: geometries_cs.h:204
const Cartesian_point & operator[](std::size_t i) const override
Definition: geometries_cs.h:217
Coordinate_system coordinate_system() const override
Gets the coordinate system.
Definition: geometries_cs.h:180
Cartesian_linestring * clone() const override
This implementation of clone() uses a broader return type than other implementations.
Definition: geometries_cs.h:200
void clear() noexcept override
Removes all points from the linestring.
Definition: geometries_cs.h:194
bool accept(Geometry_visitor *v) override
Applies a hierarchical visitor to this geometry.
Definition: geometries.cc:132
Geometry_type type() const override
Gets the geometry type of the object.
Definition: geometries_cs.h:179
std::size_t size() const override
Returns the size of (number of points in) the linestring.
Definition: geometries_cs.h:193
bool empty() const override
Checks if the linestring is empty.
Definition: geometries_cs.h:192
void push_back(gis::Point &&pt) override
Definition: geometries_cs.h:188
const Cartesian_point & back() const override
Definition: geometries_cs.h:205
Cartesian_point & operator[](std::size_t i) override
Definition: geometries_cs.h:214
A Cartesian 2d linestring.
Definition: geometries_cs.h:71
bool empty() const override
Checks if the linestring is empty.
Definition: geometries.cc:100
iterator begin() noexcept
Definition: geometries_cs.h:107
std::vector< Cartesian_point, Malloc_allocator< Cartesian_point > > m_points
String of points constituting the linestring.
Definition: geometries_cs.h:77
iterator end() noexcept
Definition: geometries_cs.h:110
void clear() noexcept override
Removes all points from the linestring.
Definition: geometries_cs.h:98
Cartesian_linestring()
Definition: geometries_cs.h:84
const_iterator begin() const noexcept
Definition: geometries_cs.h:108
Cartesian_point & back() override
Returns the last point of the linestring.
Definition: geometries_cs.h:104
std::size_t size() const override
Returns the size of (number of points in) the linestring.
Definition: geometries_cs.h:96
void pop_front() override
Removes a point from the front of the linestring.
Definition: geometries_cs.h:94
void push_back(const Point &pt) override
Adds a point to the end of the linestring.
Definition: geometries.cc:90
decltype(m_points) ::iterator iterator
Definition: geometries_cs.h:81
Cartesian_point & operator[](std::size_t i) override
Definition: geometries_cs.h:116
const Cartesian_point & front() const override
Definition: geometries_cs.h:114
bool accept(Geometry_visitor *v) override
Applies a hierarchical visitor to this geometry.
Definition: geometries.cc:64
Coordinate_system coordinate_system() const override
Gets the coordinate system.
Definition: geometries_cs.h:88
Cartesian_point & front() override
Returns the first point of the linestring.
Definition: geometries_cs.h:113
Cartesian_linestring * clone() const override
Definition: geometries_cs.h:100
const Cartesian_point & operator[](std::size_t i) const override
Definition: geometries_cs.h:117
const_iterator end() const noexcept
Definition: geometries_cs.h:111
const Cartesian_point & back() const override
Definition: geometries_cs.h:105
decltype(m_points) ::const_iterator const_iterator
Definition: geometries_cs.h:82
decltype(m_points) ::value_type value_type
Definition: geometries_cs.h:80
void resize(std::size_t count)
Definition: geometries_cs.h:97
A Cartesian 2d multilinestring.
Definition: geometries_cs.h:602
const_iterator begin() const noexcept
Definition: geometries_cs.h:639
Cartesian_linestring & front() override
Returns the first linestring of the Multilinestring.
Definition: geometries_cs.h:644
const_iterator end() const noexcept
Definition: geometries_cs.h:642
decltype(m_linestrings) ::value_type value_type
Definition: geometries_cs.h:609
std::vector< Cartesian_linestring, Malloc_allocator< Cartesian_linestring > > m_linestrings
List of linestrings in the collection.
Definition: geometries_cs.h:606
decltype(m_linestrings) ::iterator iterator
Definition: geometries_cs.h:610
Cartesian_multilinestring * clone() const override
Clone pattern to easily duplicate a Multilinestring.
Definition: geometries_cs.h:655
std::size_t size() const override
Returns the size of the geometrycollection.
Definition: geometries_cs.h:631
bool is_empty() const override
Check if this is an empty geometry.
Definition: geometries_cs.h:621
void pop_front() override
Removes a geometry from the front of the collection.
Definition: geometries_cs.h:627
Cartesian_multilinestring()
Definition: geometries_cs.h:613
Cartesian_linestring & operator[](std::size_t i) override
Definition: geometries_cs.h:649
void push_back(const Geometry &g) override
Adds a geometry to the collection.
Definition: geometries.cc:600
bool accept(Geometry_visitor *v) override
Applies a hierarchical visitor to this geometry.
Definition: geometries.cc:589
Cartesian_linestring & back()
Definition: geometries_cs.h:635
const Cartesian_linestring & front() const override
Definition: geometries_cs.h:645
bool empty() const override
Checks if the collection is empty.
Definition: geometries.cc:610
Coordinate_system coordinate_system() const override
Gets the coordinate system.
Definition: geometries_cs.h:617
iterator begin() noexcept
Definition: geometries_cs.h:638
void clear() noexcept override
Removes all geometries from the geometrycollection.
Definition: geometries_cs.h:633
const Geometry & operator[](std::size_t i) const override
Definition: geometries_cs.h:652
iterator end() noexcept
Definition: geometries_cs.h:641
decltype(m_linestrings) ::const_iterator const_iterator
Definition: geometries_cs.h:611
void resize(std::size_t count) override
Resizes the geometrycollection to contain a given number of elements.
Definition: geometries_cs.h:632
const Cartesian_linestring & back() const
Definition: geometries_cs.h:636
A Cartesian 2d multipoint.
Definition: geometries_cs.h:501
Coordinate_system coordinate_system() const override
Gets the coordinate system.
Definition: geometries_cs.h:515
const_iterator begin() const noexcept
Definition: geometries_cs.h:534
void pop_front() override
Removes a geometry from the front of the collection.
Definition: geometries_cs.h:525
const Cartesian_point & front() const override
Definition: geometries_cs.h:540
void clear() noexcept override
Removes all geometries from the geometrycollection.
Definition: geometries_cs.h:531
Cartesian_point & front() override
Returns the first point of the Multipoint.
Definition: geometries_cs.h:539
Cartesian_multipoint * clone() const override
Clone pattern to easily duplicate a Multipoint.
Definition: geometries_cs.h:546
const Cartesian_point & operator[](std::size_t i) const override
Definition: geometries_cs.h:543
bool empty() const override
Checks if the collection is empty.
Definition: geometries.cc:556
decltype(m_points) ::iterator iterator
Definition: geometries_cs.h:508
decltype(m_points) ::value_type value_type
Definition: geometries_cs.h:507
decltype(m_points) ::const_iterator const_iterator
Definition: geometries_cs.h:509
void push_back(const Geometry &g) override
Adds a geometry to the collection.
Definition: geometries.cc:546
Cartesian_point & operator[](std::size_t i) override
Definition: geometries_cs.h:542
iterator begin() noexcept
Definition: geometries_cs.h:533
bool accept(Geometry_visitor *v) override
Applies a hierarchical visitor to this geometry.
Definition: geometries.cc:536
iterator end() noexcept
Definition: geometries_cs.h:536
std::vector< Cartesian_point, Malloc_allocator< Cartesian_point > > m_points
List of points in the collection.
Definition: geometries_cs.h:504
bool is_empty() const override
Check if this is an empty geometry.
Definition: geometries_cs.h:519
void resize(std::size_t count) override
Resizes the geometrycollection to contain a given number of elements.
Definition: geometries_cs.h:530
Cartesian_multipoint()
Definition: geometries_cs.h:511
const_iterator end() const noexcept
Definition: geometries_cs.h:537
std::size_t size() const override
Returns the size of the geometrycollection.
Definition: geometries_cs.h:529
A Cartesian 2d multipolygon.
Definition: geometries_cs.h:720
Cartesian_multipolygon * clone() const override
Clone pattern to easily duplicate a Multipolygon.
Definition: geometries_cs.h:768
Coordinate_system coordinate_system() const override
Gets the coordinate system.
Definition: geometries_cs.h:735
bool is_empty() const override
Check if this is an empty geometry.
Definition: geometries_cs.h:739
void push_back(const Geometry &g) override
Adds a geometry to the collection.
Definition: geometries.cc:654
const_iterator begin() const noexcept
Definition: geometries_cs.h:754
void resize(std::size_t count) override
Resizes the geometrycollection to contain a given number of elements.
Definition: geometries_cs.h:750
void clear() noexcept override
Removes all geometries from the geometrycollection.
Definition: geometries_cs.h:751
decltype(m_polygons) ::const_iterator const_iterator
Definition: geometries_cs.h:729
iterator begin() noexcept
Definition: geometries_cs.h:753
decltype(m_polygons) ::iterator iterator
Definition: geometries_cs.h:728
const Geometry & operator[](std::size_t i) const override
Definition: geometries_cs.h:765
std::size_t size() const override
Returns the size of the geometrycollection.
Definition: geometries_cs.h:749
void pop_front() override
Removes a geometry from the front of the collection.
Definition: geometries_cs.h:745
decltype(m_polygons) ::value_type value_type
Definition: geometries_cs.h:727
bool empty() const override
Checks if the collection is empty.
Definition: geometries.cc:664
Cartesian_multipolygon()
Definition: geometries_cs.h:731
const Cartesian_polygon & front() const override
Definition: geometries_cs.h:760
iterator end() noexcept
Definition: geometries_cs.h:756
std::vector< Cartesian_polygon, Malloc_allocator< Cartesian_polygon > > m_polygons
List of polygons in the collection.
Definition: geometries_cs.h:724
const_iterator end() const noexcept
Definition: geometries_cs.h:757
bool accept(Geometry_visitor *v) override
Applies a hierarchical visitor to this geometry.
Definition: geometries.cc:644
Cartesian_polygon & front() override
Returns the first polygon of the Multipolygon.
Definition: geometries_cs.h:759
Cartesian_polygon & operator[](std::size_t i) override
Definition: geometries_cs.h:762
A Cartesian 2d point.
Definition: geometries_cs.h:47
Cartesian_point()=default
Coordinate_system coordinate_system() const override
Gets the coordinate system.
Definition: geometries_cs.h:51
Cartesian_point * clone() const override
Definition: geometries_cs.h:54
Cartesian_point(double x, double y)
Definition: geometries_cs.h:50
A Cartesian 2d polygon.
Definition: geometries_cs.h:269
decltype(m_interior_rings) & interior_rings()
Get list of interior rings.
Linearring & exterior_ring() override
Returns the exterior ring of the polygon.
Definition: geometries_cs.h:316
Cartesian_polygon()
Definition: geometries_cs.h:279
Cartesian_polygon * clone() const override
Definition: geometries_cs.h:290
std::vector< Cartesian_linearring, Malloc_allocator< Cartesian_linearring > > m_interior_rings
Interior rings (holes).
Definition: geometries_cs.h:276
std::size_t size() const override
Returns the size of the polygon.
Definition: geometries.cc:190
Coordinate_system coordinate_system() const override
Gets the coordinate system.
Definition: geometries_cs.h:282
void push_back(const Linearring &lr) override
Adds a linear ring to the polygon.
Definition: geometries.cc:170
Cartesian_linearring & cartesian_exterior_ring() const
Get the exterior ring.
Definition: geometries.cc:210
bool accept(Geometry_visitor *v) override
Applies a hierarchical visitor to this geometry.
Definition: geometries.cc:160
Cartesian_linearring m_exterior_ring
Exterior ring.
Definition: geometries_cs.h:272
bool empty() const override
Checks if the polygon is empty.
Definition: geometries.cc:186
decltype(m_interior_rings) const & const_interior_rings() const
Get list of interior rings.
Linearring & interior_ring(std::size_t n) override
Returns an interior ring of the polygon.
Definition: geometries.cc:196
A geographic (ellipsoidal) 2d geometry collection.
Definition: geometries_cs.h:438
bool accept(Geometry_visitor *v) override
Applies a hierarchical visitor to this geometry.
Definition: geometries.cc:451
const_iterator begin() const noexcept
Definition: geometries_cs.h:483
const Geometry & operator[](std::size_t i) const override
Definition: geometries_cs.h:492
decltype(m_geometries) ::iterator iterator
Definition: geometries_cs.h:444
Coordinate_system coordinate_system() const override
Gets the coordinate system.
Definition: geometries_cs.h:461
const_iterator end() const noexcept
Definition: geometries_cs.h:486
bool is_empty() const override
Check if this is an empty geometry.
Definition: geometries_cs.h:465
void push_back(const Geometry &g) override
Adds a geometry to the collection.
Definition: geometries.cc:462
Geographic_geometrycollection()
Definition: geometries_cs.h:447
void resize(std::size_t count) override
Resizes the geometrycollection to contain a given number of elements.
Definition: geometries_cs.h:479
Geometry & operator[](std::size_t i) override
Definition: geometries_cs.h:491
void clear() noexcept override
Removes all geometries from the geometrycollection.
Definition: geometries_cs.h:480
const Geometry & front() const override
Definition: geometries_cs.h:489
void pop_front() override
Removes a geometry from the front of the collection.
Definition: geometries_cs.h:471
Geographic_geometrycollection * clone() const override
Clone pattern to easily duplicate a Geometrycollection.
Definition: geometries_cs.h:495
Geographic_geometrycollection(Geographic_geometrycollection &&gc) noexcept
Definition: geometries_cs.h:451
~Geographic_geometrycollection() override
Definition: geometries_cs.h:456
std::size_t size() const override
Returns the size of the geometrycollection.
Definition: geometries_cs.h:478
iterator begin() noexcept
Definition: geometries_cs.h:482
std::vector< Geometry *, Malloc_allocator< Geometry * > > m_geometries
List of geometries in the collection.
Definition: geometries_cs.h:441
decltype(m_geometries) ::const_iterator const_iterator
Definition: geometries_cs.h:445
bool empty() const override
Checks if the collection is empty.
Definition: geometries.cc:532
Geometry & front() override
Returns the first geometry of the collection.
Definition: geometries_cs.h:488
iterator end() noexcept
Definition: geometries_cs.h:485
A geographic (ellipsoidal) 2d linear ring.
Definition: geometries_cs.h:223
void push_back(const gis::Point &pt) override
Adds a point to the end of the linestring.
Definition: geometries_cs.h:231
bool empty() const override
Checks if the linestring is empty.
Definition: geometries_cs.h:238
bool accept(Geometry_visitor *v) override
Applies a hierarchical visitor to this geometry.
Definition: geometries.cc:142
Geographic_linestring * clone() const override
This implementation of clone() uses a broader return type than other implementations.
Definition: geometries_cs.h:246
Geographic_point & back() override
Returns the last point of the linestring.
Definition: geometries_cs.h:250
const Geographic_point & front() const override
Definition: geometries_cs.h:256
bool is_empty() const override
Check if this is an empty geometry.
Definition: geometries_cs.h:230
Geographic_point & front() override
Returns the first point of the linestring.
Definition: geometries_cs.h:255
Coordinate_system coordinate_system() const override
Gets the coordinate system.
Definition: geometries_cs.h:226
const Geographic_point & back() const override
Definition: geometries_cs.h:251
Geometry_type type() const override
Gets the geometry type of the object.
Definition: geometries_cs.h:225
void clear() noexcept override
Removes all points from the linestring.
Definition: geometries_cs.h:240
void push_back(gis::Point &&pt) override
Definition: geometries_cs.h:234
std::size_t size() const override
Returns the size of (number of points in) the linestring.
Definition: geometries_cs.h:239
void pop_front() override
Removes a point from the front of the linestring.
Definition: geometries_cs.h:237
const Geographic_point & operator[](std::size_t i) const override
Definition: geometries_cs.h:263
Geographic_point & operator[](std::size_t i) override
Definition: geometries_cs.h:260
A geographic (ellipsoidal) 2d linestring.
Definition: geometries_cs.h:125
Geographic_point & operator[](std::size_t i) override
Definition: geometries_cs.h:170
bool empty() const override
Checks if the linestring is empty.
Definition: geometries.cc:122
bool accept(Geometry_visitor *v) override
Applies a hierarchical visitor to this geometry.
Definition: geometries.cc:102
const_iterator begin() const noexcept
Definition: geometries_cs.h:162
void push_back(const Point &pt) override
Adds a point to the end of the linestring.
Definition: geometries.cc:112
const Geographic_point & back() const override
Definition: geometries_cs.h:159
std::size_t size() const override
Returns the size of (number of points in) the linestring.
Definition: geometries_cs.h:150
void clear() noexcept override
Removes all points from the linestring.
Definition: geometries_cs.h:152
Coordinate_system coordinate_system() const override
Gets the coordinate system.
Definition: geometries_cs.h:142
Geographic_linestring()
Definition: geometries_cs.h:138
Geographic_point & back() override
Returns the last point of the linestring.
Definition: geometries_cs.h:158
Geographic_point & front() override
Returns the first point of the linestring.
Definition: geometries_cs.h:167
decltype(m_points) ::value_type value_type
Definition: geometries_cs.h:134
decltype(m_points) ::const_iterator const_iterator
Definition: geometries_cs.h:136
const_iterator end() const noexcept
Definition: geometries_cs.h:165
const Geographic_point & operator[](std::size_t i) const override
Definition: geometries_cs.h:171
const Geographic_point & front() const override
Definition: geometries_cs.h:168
iterator end() noexcept
Definition: geometries_cs.h:164
Geographic_linestring * clone() const override
Definition: geometries_cs.h:154
decltype(m_points) ::iterator iterator
Definition: geometries_cs.h:135
iterator begin() noexcept
Definition: geometries_cs.h:161
void resize(std::size_t count)
Definition: geometries_cs.h:151
std::vector< Geographic_point, Malloc_allocator< Geographic_point > > m_points
String of points constituting the linestring.
Definition: geometries_cs.h:131
void pop_front() override
Removes a point from the front of the linestring.
Definition: geometries_cs.h:148
A geographic (ellipsoidal) 2d multilinestring.
Definition: geometries_cs.h:661
void resize(std::size_t count) override
Resizes the geometrycollection to contain a given number of elements.
Definition: geometries_cs.h:691
bool is_empty() const override
Check if this is an empty geometry.
Definition: geometries_cs.h:680
const_iterator end() const noexcept
Definition: geometries_cs.h:701
void pop_front() override
Removes a geometry from the front of the collection.
Definition: geometries_cs.h:686
decltype(m_linestrings) ::iterator iterator
Definition: geometries_cs.h:669
const Geographic_linestring & front() const override
Definition: geometries_cs.h:704
decltype(m_linestrings) ::const_iterator const_iterator
Definition: geometries_cs.h:670
void clear() noexcept override
Removes all geometries from the geometrycollection.
Definition: geometries_cs.h:692
std::vector< Geographic_linestring, Malloc_allocator< Geographic_linestring > > m_linestrings
List of linestrings in the collection.
Definition: geometries_cs.h:665
Geographic_linestring & front() override
Returns the first linestring of the Multilinestring.
Definition: geometries_cs.h:703
Geographic_linestring & back()
Definition: geometries_cs.h:694
std::size_t size() const override
Returns the size of the geometrycollection.
Definition: geometries_cs.h:690
Coordinate_system coordinate_system() const override
Gets the coordinate system.
Definition: geometries_cs.h:676
Geographic_linestring & operator[](std::size_t i) override
Definition: geometries_cs.h:708
Geographic_multilinestring * clone() const override
Clone pattern to easily duplicate a Multilinestring.
Definition: geometries_cs.h:714
bool accept(Geometry_visitor *v) override
Applies a hierarchical visitor to this geometry.
Definition: geometries.cc:612
void push_back(const Geometry &g) override
Adds a geometry to the collection.
Definition: geometries.cc:623
Geographic_multilinestring()
Definition: geometries_cs.h:672
const Geographic_linestring & back() const
Definition: geometries_cs.h:695
decltype(m_linestrings) ::value_type value_type
Definition: geometries_cs.h:668
const Geometry & operator[](std::size_t i) const override
Definition: geometries_cs.h:711
iterator end() noexcept
Definition: geometries_cs.h:700
iterator begin() noexcept
Definition: geometries_cs.h:697
bool empty() const override
Checks if the collection is empty.
Definition: geometries.cc:633
const_iterator begin() const noexcept
Definition: geometries_cs.h:698
A geographic (ellipsoidal) 2d multipoint.
Definition: geometries_cs.h:552
iterator end() noexcept
Definition: geometries_cs.h:586
void resize(std::size_t count) override
Resizes the geometrycollection to contain a given number of elements.
Definition: geometries_cs.h:580
bool is_empty() const override
Check if this is an empty geometry.
Definition: geometries_cs.h:569
Geographic_point & front() override
Returns the first point of the Multipoint.
Definition: geometries_cs.h:589
Coordinate_system coordinate_system() const override
Gets the coordinate system.
Definition: geometries_cs.h:565
const Geographic_point & front() const override
Definition: geometries_cs.h:590
Geographic_multipoint()
Definition: geometries_cs.h:562
Geographic_point & operator[](std::size_t i) override
Definition: geometries_cs.h:592
Geographic_multipoint * clone() const override
Clone pattern to easily duplicate a Multipoint.
Definition: geometries_cs.h:596
const Geographic_point & operator[](std::size_t i) const override
Definition: geometries_cs.h:593
bool accept(Geometry_visitor *v) override
Applies a hierarchical visitor to this geometry.
Definition: geometries.cc:558
iterator begin() noexcept
Definition: geometries_cs.h:583
void clear() noexcept override
Removes all geometries from the geometrycollection.
Definition: geometries_cs.h:581
decltype(m_points) ::value_type value_type
Definition: geometries_cs.h:558
void pop_front() override
Removes a geometry from the front of the collection.
Definition: geometries_cs.h:575
const_iterator begin() const noexcept
Definition: geometries_cs.h:584
decltype(m_points) ::const_iterator const_iterator
Definition: geometries_cs.h:560
const_iterator end() const noexcept
Definition: geometries_cs.h:587
bool empty() const override
Checks if the collection is empty.
Definition: geometries.cc:578
std::vector< Geographic_point, Malloc_allocator< Geographic_point > > m_points
List of points in the collection.
Definition: geometries_cs.h:555
decltype(m_points) ::iterator iterator
Definition: geometries_cs.h:559
void push_back(const Geometry &g) override
Adds a geometry to the collection.
Definition: geometries.cc:568
std::size_t size() const override
Returns the size of the geometrycollection.
Definition: geometries_cs.h:579
A geographic (ellipsoidal) 2d multipolygon.
Definition: geometries_cs.h:774
Geographic_multipolygon()
Definition: geometries_cs.h:785
Geographic_polygon & operator[](std::size_t i) override
Definition: geometries_cs.h:818
decltype(m_polygons) ::value_type value_type
Definition: geometries_cs.h:781
void pop_front() override
Removes a geometry from the front of the collection.
Definition: geometries_cs.h:799
bool empty() const override
Checks if the collection is empty.
Definition: geometries.cc:686
Geographic_polygon & front() override
Returns the first polygon of the Multipolygon.
Definition: geometries_cs.h:813
void push_back(const Geometry &g) override
Adds a geometry to the collection.
Definition: geometries.cc:676
iterator end() noexcept
Definition: geometries_cs.h:810
const Geographic_polygon & front() const override
Definition: geometries_cs.h:814
Coordinate_system coordinate_system() const override
Gets the coordinate system.
Definition: geometries_cs.h:789
decltype(m_polygons) ::const_iterator const_iterator
Definition: geometries_cs.h:783
const_iterator end() const noexcept
Definition: geometries_cs.h:811
std::size_t size() const override
Returns the size of the geometrycollection.
Definition: geometries_cs.h:803
Geographic_multipolygon * clone() const override
Clone pattern to easily duplicate a Multipolygon.
Definition: geometries_cs.h:824
iterator begin() noexcept
Definition: geometries_cs.h:807
const_iterator begin() const noexcept
Definition: geometries_cs.h:808
std::vector< Geographic_polygon, Malloc_allocator< Geographic_polygon > > m_polygons
List of polygons in the collection.
Definition: geometries_cs.h:778
const Geometry & operator[](std::size_t i) const override
Definition: geometries_cs.h:821
void resize(std::size_t count) override
Resizes the geometrycollection to contain a given number of elements.
Definition: geometries_cs.h:804
decltype(m_polygons) ::iterator iterator
Definition: geometries_cs.h:782
void clear() noexcept override
Removes all geometries from the geometrycollection.
Definition: geometries_cs.h:805
bool is_empty() const override
Check if this is an empty geometry.
Definition: geometries_cs.h:793
bool accept(Geometry_visitor *v) override
Applies a hierarchical visitor to this geometry.
Definition: geometries.cc:666
A geographic (ellipsoidal) 2d point.
Definition: geometries_cs.h:58
Geographic_point(double x, double y)
Definition: geometries_cs.h:61
Coordinate_system coordinate_system() const override
Gets the coordinate system.
Definition: geometries_cs.h:62
Geographic_point()=default
Geographic_point * clone() const override
Definition: geometries_cs.h:65
A geographic (ellipsoidal) 2d polygon.
Definition: geometries_cs.h:322
decltype(m_interior_rings) & interior_rings()
Get list of interior rings.
decltype(m_interior_rings) const & const_interior_rings() const
Get list of interior rings.
Geographic_linearring & geographic_exterior_ring() const
Get the exterior ring.
Definition: geometries.cc:255
Linearring & exterior_ring() override
Returns the exterior ring of the polygon.
Definition: geometries_cs.h:369
Coordinate_system coordinate_system() const override
Gets the coordinate system.
Definition: geometries_cs.h:335
Geographic_polygon * clone() const override
Definition: geometries_cs.h:343
bool accept(Geometry_visitor *v) override
Applies a hierarchical visitor to this geometry.
Definition: geometries.cc:200
std::size_t size() const override
Returns the size of the polygon.
Definition: geometries.cc:249
std::vector< Geographic_linearring, Malloc_allocator< Geographic_linearring > > m_interior_rings
Interior rings (holes).
Definition: geometries_cs.h:329
Geographic_polygon()
Definition: geometries_cs.h:332
Geographic_linearring m_exterior_ring
Exterior ring.
Definition: geometries_cs.h:325
bool empty() const override
Checks if the polygon is empty.
Definition: geometries.cc:245
void push_back(const Linearring &lr) override
Adds a linear ring to the polygon.
Definition: geometries.cc:229
Linearring & interior_ring(std::size_t n) override
Returns an interior ring of the polygon.
Definition: geometries.cc:259
Abstract visitor class to be used on class Geometry and descendants.
Definition: geometry_visitor.h:46
Abstract superclass for all geometric objects.
Definition: geometries.h:100
A collection of geometries.
Definition: geometries.h:410
A ring-shaped linestring.
Definition: geometries.h:320
A string of connected line segments.
Definition: geometries.h:256
bool is_empty() const override
Check if this is an empty geometry.
Definition: geometries.h:260
Geometry_type type() const override
Gets the geometry type of the object.
Definition: geometries.h:258
A collection of linestrings.
Definition: geometries.h:523
A collection of points.
Definition: geometries.h:484
A collection of polygons.
Definition: geometries.h:564
A 2d point.
Definition: geometries.h:150
double x() const
Gets the first coordinate value.
Definition: geometries.cc:46
double y() const
Gets the second coordinate value.
Definition: geometries.cc:48
A polygon consisting of an outer ring and zero or more interior rings defining holes in the polygon.
Definition: geometries.h:349
This file declares the geometry class hierarchy used by the server as the internal representation of ...
static int count
Definition: myisam_ftdump.cc:43
Coordinate_system
Types of coordinate systems.
Definition: geometries.h:69
@ kCartesian
A Cartesian plane with the same unit in both directions.
@ kGeographic
An ellipsoidal system with longitude and latitude coordinates, both in the same unit.
Geometry_type
Types of geometry objects.
Definition: geometries.h:53
PSI_memory_key key_memory_Geometry_objects_data
Definition: psi_memory_key.cc:48
int n
Definition: xcom_base.cc:509