MySQL  8.0.23
Source Code Documentation
geometries_cs.h
Go to the documentation of this file.
1 #ifndef SQL_GIS_GEOMETRIES_CS_H_INCLUDED
2 #define SQL_GIS_GEOMETRIES_CS_H_INCLUDED
3 
4 // Copyright (c) 2017, 2018, Oracle and/or its affiliates. All rights reserved.
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 /// @file
27 ///
28 /// This file declares the coordinate system specific subclasses of
29 /// the geometry class hierarchy. The rest of the hierarchy is defined
30 /// in geometries.h.
31 ///
32 /// For most of the server, including geometries.h should be
33 /// enough. This header is only needed if the code needs to access
34 /// coordinate system specific members.
35 ///
36 /// @see geometries.h
37 
38 #include <vector>
39 
40 #include "sql/gis/geometries.h"
41 #include "sql/malloc_allocator.h"
42 
43 namespace gis {
44 
45 /// A Cartesian 2d point.
46 class Cartesian_point : public Point {
47  public:
48  Cartesian_point() = default;
49  Cartesian_point(double x, double y) : Point(x, y) {}
52  }
53 };
54 
55 /// A geographic (ellipsoidal) 2d point.
56 class Geographic_point : public Point {
57  public:
58  Geographic_point() = default;
59  Geographic_point(double x, double y) : Point(x, y) {}
62  }
63 };
64 
65 /// A Cartesian 2d linestring.
67  protected:
68  /// String of points constituting the linestring.
69  ///
70  /// The line starts in the first point, goes through all intermediate points,
71  /// and ends in the last point.
72  std::vector<Cartesian_point, Malloc_allocator<Cartesian_point>> m_points;
73 
74  public:
75  typedef decltype(m_points)::value_type value_type;
76  typedef decltype(m_points)::iterator iterator;
78 
82 
85  }
86  bool accept(Geometry_visitor *v) override;
87  void push_back(const Point &pt) override;
88  void push_back(Point &&pt) override;
89  bool empty() const override;
90  std::size_t size() const override { return m_points.size(); }
91  void resize(std::size_t count) { m_points.resize(count); }
92  void clear() noexcept override { m_points.clear(); }
93 
94  Cartesian_point &back() { return m_points.back(); }
95  const Cartesian_point &back() const { return m_points.back(); }
96 
97  iterator begin() noexcept { return m_points.begin(); }
98  const_iterator begin() const noexcept { return m_points.begin(); }
99 
100  iterator end() noexcept { return m_points.end(); }
101  const_iterator end() const noexcept { return m_points.end(); }
102 
103  Cartesian_point &operator[](std::size_t i) override { return m_points[i]; }
104  const Cartesian_point &operator[](std::size_t i) const override {
105  return m_points[i];
106  }
107 };
108 
109 /// A geographic (ellipsoidal) 2d linestring.
110 ///
111 /// The linestring follows the geodetic between each pair of points.
113  protected:
114  /// String of points constituting the linestring.
115  ///
116  /// The line starts in the first point, goes through all intermediate points,
117  /// and ends in the last point.
118  std::vector<Geographic_point, Malloc_allocator<Geographic_point>> m_points;
119 
120  public:
121  typedef decltype(m_points)::value_type value_type;
122  typedef decltype(m_points)::iterator iterator;
124 
128 
131  }
132  bool accept(Geometry_visitor *v) override;
133  void push_back(const Point &pt) override;
134  void push_back(Point &&pt) override;
135  bool empty() const override;
136  std::size_t size() const override { return m_points.size(); }
137  void resize(std::size_t count) { m_points.resize(count); }
138  void clear() noexcept override { m_points.clear(); }
139 
140  Geographic_point &back() { return m_points.back(); }
141  const Geographic_point &back() const { return m_points.back(); }
142 
143  iterator begin() noexcept { return m_points.begin(); }
144  const_iterator begin() const noexcept { return m_points.begin(); }
145 
146  iterator end() noexcept { return m_points.end(); }
147  const_iterator end() const noexcept { return m_points.end(); }
148 
149  Geographic_point &operator[](std::size_t i) override { return m_points[i]; }
150  const Geographic_point &operator[](std::size_t i) const override {
151  return m_points[i];
152  }
153 };
154 
155 /// A Cartesian 2d linear ring.
157  public:
158  Geometry_type type() const override { return Linearring::type(); }
161  }
162  bool accept(Geometry_visitor *v) override;
163  bool is_empty() const override { return Cartesian_linestring::is_empty(); }
164  void push_back(const gis::Point &pt) override {
166  }
167  void push_back(gis::Point &&pt) override {
168  Cartesian_linestring::push_back(std::forward<Point &&>(pt));
169  }
170  bool empty() const override { return Cartesian_linestring::empty(); }
171  std::size_t size() const override { return Cartesian_linestring::size(); }
172  void clear() noexcept override { Cartesian_linestring::clear(); }
173 
174  Cartesian_point &operator[](std::size_t i) override {
176  }
177  const Cartesian_point &operator[](std::size_t i) const override {
179  }
180 };
181 
182 /// A geographic (ellipsoidal) 2d linear ring.
184  public:
185  Geometry_type type() const override { return Linearring::type(); }
188  }
189  bool accept(Geometry_visitor *v) override;
190  bool is_empty() const override { return Geographic_linestring::is_empty(); }
191  void push_back(const gis::Point &pt) override {
193  }
194  void push_back(gis::Point &&pt) override {
195  Geographic_linestring::push_back(std::forward<Point &&>(pt));
196  }
197  bool empty() const override { return Geographic_linestring::empty(); }
198  std::size_t size() const override { return Geographic_linestring::size(); }
199  void clear() noexcept override { Geographic_linestring::clear(); }
200 
201  Geographic_point &operator[](std::size_t i) override {
203  }
204  const Geographic_point &operator[](std::size_t i) const override {
206  }
207 };
208 
209 /// A Cartesian 2d polygon.
210 class Cartesian_polygon : public Polygon {
211  private:
212  /// Exterior ring.
214 
215  /// Interior rings (holes).
216  std::vector<Cartesian_linearring, Malloc_allocator<Cartesian_linearring>>
218 
219  public:
225  }
226  bool accept(Geometry_visitor *v) override;
227  void push_back(const Linearring &lr) override;
228  void push_back(Linearring &&lr) override;
229  bool empty() const override;
230 
231  /// Get list of interior rings.
232  ///
233  /// This function is used by the interface to Boost.Geometry.
234  ///
235  /// @return The list of interior rings
237 
238  /// Get list of interior rings.
239  ///
240  /// This function is used by the interface to Boost.Geometry.
241  ///
242  /// @return The list of interior rings
243  decltype(m_interior_rings) const &const_interior_rings() const;
244 
245  std::size_t size() const override;
246 
247  /// Get the exterior ring.
248  ///
249  /// This function is used by the interface to Boost.Geometry.
250  ///
251  /// @return The exterior ring.
253  Linearring &exterior_ring() override { return m_exterior_ring; }
254 
255  Linearring &interior_ring(std::size_t n) override;
256 };
257 
258 /// A geographic (ellipsoidal) 2d polygon.
259 class Geographic_polygon : public Polygon {
260  private:
261  /// Exterior ring.
263 
264  /// Interior rings (holes).
265  std::vector<Geographic_linearring, Malloc_allocator<Geographic_linearring>>
267 
268  public:
274  }
275  bool accept(Geometry_visitor *v) override;
276  void push_back(const Linearring &lr) override;
277  void push_back(Linearring &&lr) override;
278  bool empty() const override;
279 
280  /// Get list of interior rings.
281  ///
282  /// This function is used by the interface to Boost.Geometry.
283  ///
284  /// @return The list of interior rings
286 
287  /// Get list of interior rings.
288  ///
289  /// This function is used by the interface to Boost.Geometry.
290  ///
291  /// @return The list of interior rings
292  decltype(m_interior_rings) const &const_interior_rings() const;
293 
294  std::size_t size() const override;
295 
296  /// Get the exterior ring.
297  ///
298  /// This function is used by the interface to Boost.Geometry.
299  ///
300  /// @return The exterior ring.
302  Linearring &exterior_ring() override { return m_exterior_ring; }
303 
304  Linearring &interior_ring(std::size_t n) override;
305 };
306 
307 /// A Cartesian 2d geometry collection.
309  private:
310  /// List of geometries in the collection.
311  std::vector<Geometry *, Malloc_allocator<Geometry *>> m_geometries;
312 
313  public:
314  typedef decltype(m_geometries)::iterator iterator;
316 
318  : m_geometries(
322  : m_geometries(
324  m_geometries = std::move(gc.m_geometries);
325  }
327  for (Geometry *g : m_geometries) {
328  delete g;
329  }
330  }
333  }
334  bool accept(Geometry_visitor *v) override;
335  bool is_empty() const override {
336  for (const auto g : m_geometries) {
337  if (!g->is_empty()) return false;
338  }
339  return true;
340  }
341  void push_back(const Geometry &g) override;
342  void push_back(Geometry &&g) override;
343  bool empty() const override;
344  std::size_t size() const override { return m_geometries.size(); }
345  void resize(std::size_t count) override { m_geometries.resize(count); }
346  void clear() noexcept override { m_geometries.clear(); }
347 
348  iterator begin() noexcept { return m_geometries.begin(); }
349  const_iterator begin() const noexcept { return m_geometries.begin(); }
350 
351  iterator end() noexcept { return m_geometries.end(); }
352  const_iterator end() const noexcept { return m_geometries.end(); }
353 
354  Geometry &operator[](std::size_t i) override { return *m_geometries[i]; }
355  const Geometry &operator[](std::size_t i) const override {
356  return *m_geometries[i];
357  }
358 };
359 
360 /// A geographic (ellipsoidal) 2d geometry collection.
362  private:
363  /// List of geometries in the collection.
364  std::vector<Geometry *, Malloc_allocator<Geometry *>> m_geometries;
365 
366  public:
367  typedef decltype(m_geometries)::iterator iterator;
369 
371  : m_geometries(
375  : m_geometries(
377  m_geometries = std::move(gc.m_geometries);
378  }
380  for (Geometry *g : m_geometries) {
381  delete g;
382  }
383  }
386  }
387  bool accept(Geometry_visitor *v) override;
388  bool is_empty() const override {
389  for (const auto g : m_geometries) {
390  if (!g->is_empty()) return false;
391  }
392  return true;
393  }
394  void push_back(const Geometry &g) override;
395  void push_back(Geometry &&g) override;
396  bool empty() const override;
397  std::size_t size() const override { return m_geometries.size(); }
398  void resize(std::size_t count) override { m_geometries.resize(count); }
399  void clear() noexcept override { m_geometries.clear(); }
400 
401  iterator begin() noexcept { return m_geometries.begin(); }
402  const_iterator begin() const noexcept { return m_geometries.begin(); }
403 
404  iterator end() noexcept { return m_geometries.end(); }
405  const_iterator end() const noexcept { return m_geometries.end(); }
406 
407  Geometry &operator[](std::size_t i) override { return *m_geometries[i]; }
408  const Geometry &operator[](std::size_t i) const override {
409  return *m_geometries[i];
410  }
411 };
412 
413 /// A Cartesian 2d multipoint.
415  private:
416  /// List of points in the collection.
417  std::vector<Cartesian_point, Malloc_allocator<Cartesian_point>> m_points;
418 
419  public:
420  typedef decltype(m_points)::value_type value_type;
421  typedef decltype(m_points)::iterator iterator;
423 
427 
430  }
431  bool accept(Geometry_visitor *v) override;
432  bool is_empty() const override {
433  for (const auto &pt : m_points) {
434  if (!pt.is_empty()) return false;
435  }
436  return true;
437  }
438  void push_back(const Geometry &g) override;
439  void push_back(Geometry &&g) override;
440  bool empty() const override;
441  std::size_t size() const override { return m_points.size(); }
442  void resize(std::size_t count) override { m_points.resize(count); }
443  void clear() noexcept override { m_points.clear(); }
444 
445  iterator begin() noexcept { return m_points.begin(); }
446  const_iterator begin() const noexcept { return m_points.begin(); }
447 
448  iterator end() noexcept { return m_points.end(); }
449  const_iterator end() const noexcept { return m_points.end(); }
450 
451  Cartesian_point &operator[](std::size_t i) override { return m_points[i]; }
452  const Cartesian_point &operator[](std::size_t i) const override {
453  return m_points[i];
454  }
455 };
456 
457 /// A geographic (ellipsoidal) 2d multipoint.
459  private:
460  /// List of points in the collection.
461  std::vector<Geographic_point, Malloc_allocator<Geographic_point>> m_points;
462 
463  public:
464  typedef decltype(m_points)::value_type value_type;
465  typedef decltype(m_points)::iterator iterator;
467 
473  }
474  bool accept(Geometry_visitor *v) override;
475  bool is_empty() const override {
476  for (const auto &pt : m_points) {
477  if (!pt.is_empty()) return false;
478  }
479  return true;
480  }
481  void push_back(const Geometry &g) override;
482  void push_back(Geometry &&g) override;
483  bool empty() const override;
484  std::size_t size() const override { return m_points.size(); }
485  void resize(std::size_t count) override { m_points.resize(count); }
486  void clear() noexcept override { m_points.clear(); }
487 
488  iterator begin() noexcept { return m_points.begin(); }
489  const_iterator begin() const noexcept { return m_points.begin(); }
490 
491  iterator end() noexcept { return m_points.end(); }
492  const_iterator end() const noexcept { return m_points.end(); }
493 
494  Geographic_point &operator[](std::size_t i) override { return m_points[i]; }
495  const Geographic_point &operator[](std::size_t i) const override {
496  return m_points[i];
497  }
498 };
499 
500 /// A Cartesian 2d multilinestring.
502  private:
503  /// List of linestrings in the collection.
504  std::vector<Cartesian_linestring, Malloc_allocator<Cartesian_linestring>>
506 
507  public:
508  typedef decltype(m_linestrings)::value_type value_type;
509  typedef decltype(m_linestrings)::iterator iterator;
511 
515 
518  }
519  bool accept(Geometry_visitor *v) override;
520  bool is_empty() const override {
521  for (const auto &ls : m_linestrings) {
522  if (!ls.is_empty()) return false;
523  }
524  return true;
525  }
526  void push_back(const Geometry &g) override;
527  void push_back(Geometry &&g) override;
528  bool empty() const override;
529  std::size_t size() const override { return m_linestrings.size(); }
530  void resize(std::size_t count) override { m_linestrings.resize(count); }
531  void clear() noexcept override { m_linestrings.clear(); }
532 
534  const Cartesian_linestring &back() const { return m_linestrings.back(); }
535 
536  iterator begin() noexcept { return m_linestrings.begin(); }
537  const_iterator begin() const noexcept { return m_linestrings.begin(); }
538 
539  iterator end() noexcept { return m_linestrings.end(); }
540  const_iterator end() const noexcept { return m_linestrings.end(); }
541 
542  Cartesian_linestring &operator[](std::size_t i) override {
543  return m_linestrings[i];
544  }
545  const Geometry &operator[](std::size_t i) const override {
546  return m_linestrings[i];
547  }
548 };
549 
550 /// A geographic (ellipsoidal) 2d multilinestring.
552  private:
553  /// List of linestrings in the collection.
554  std::vector<Geographic_linestring, Malloc_allocator<Geographic_linestring>>
556 
557  public:
558  typedef decltype(m_linestrings)::value_type value_type;
559  typedef decltype(m_linestrings)::iterator iterator;
561 
565 
568  }
569  bool accept(Geometry_visitor *v) override;
570  bool is_empty() const override {
571  for (const auto &ls : m_linestrings) {
572  if (!ls.is_empty()) return false;
573  }
574  return true;
575  }
576  void push_back(const Geometry &g) override;
577  void push_back(Geometry &&g) override;
578  bool empty() const override;
579  std::size_t size() const override { return m_linestrings.size(); }
580  void resize(std::size_t count) override { m_linestrings.resize(count); }
581  void clear() noexcept override { m_linestrings.clear(); }
582 
584  const Geographic_linestring &back() const { return m_linestrings.back(); }
585 
586  iterator begin() noexcept { return m_linestrings.begin(); }
587  const_iterator begin() const noexcept { return m_linestrings.begin(); }
588 
589  iterator end() noexcept { return m_linestrings.end(); }
590  const_iterator end() const noexcept { return m_linestrings.end(); }
591 
592  Geographic_linestring &operator[](std::size_t i) override {
593  return m_linestrings[i];
594  }
595  const Geometry &operator[](std::size_t i) const override {
596  return m_linestrings[i];
597  }
598 };
599 
600 /// A Cartesian 2d multipolygon.
602  private:
603  /// List of polygons in the collection.
604  std::vector<Cartesian_polygon, Malloc_allocator<Cartesian_polygon>>
606 
607  public:
608  typedef decltype(m_polygons)::value_type value_type;
609  typedef decltype(m_polygons)::iterator iterator;
611 
615 
618  }
619  bool accept(Geometry_visitor *v) override;
620  bool is_empty() const override {
621  for (const auto &py : m_polygons) {
622  if (!py.is_empty()) return false;
623  }
624  return true;
625  }
626  void push_back(const Geometry &g) override;
627  void push_back(Geometry &&g) override;
628  bool empty() const override;
629  std::size_t size() const override { return m_polygons.size(); }
630  void resize(std::size_t count) override { m_polygons.resize(count); }
631  void clear() noexcept override { m_polygons.clear(); }
632 
633  iterator begin() noexcept { return m_polygons.begin(); }
634  const_iterator begin() const noexcept { return m_polygons.begin(); }
635 
636  iterator end() noexcept { return m_polygons.end(); }
637  const_iterator end() const noexcept { return m_polygons.end(); }
638 
639  Cartesian_polygon &operator[](std::size_t i) override {
640  return m_polygons[i];
641  }
642  const Geometry &operator[](std::size_t i) const override {
643  return m_polygons[i];
644  }
645 };
646 
647 /// A geographic (ellipsoidal) 2d multipolygon.
649  private:
650  /// List of polygons in the collection.
651  std::vector<Geographic_polygon, Malloc_allocator<Geographic_polygon>>
653 
654  public:
655  typedef decltype(m_polygons)::value_type value_type;
656  typedef decltype(m_polygons)::iterator iterator;
658 
662 
665  }
666  bool accept(Geometry_visitor *v) override;
667  bool is_empty() const override {
668  for (const auto &py : m_polygons) {
669  if (!py.is_empty()) return false;
670  }
671  return true;
672  }
673  void push_back(const Geometry &g) override;
674  void push_back(Geometry &&g) override;
675  bool empty() const override;
676  std::size_t size() const override { return m_polygons.size(); }
677  void resize(std::size_t count) override { m_polygons.resize(count); }
678  void clear() noexcept override { m_polygons.clear(); }
679 
680  iterator begin() noexcept { return m_polygons.begin(); }
681  const_iterator begin() const noexcept { return m_polygons.begin(); }
682 
683  iterator end() noexcept { return m_polygons.end(); }
684  const_iterator end() const noexcept { return m_polygons.end(); }
685 
686  Geographic_polygon &operator[](std::size_t i) override {
687  return m_polygons[i];
688  }
689  const Geometry &operator[](std::size_t i) const override {
690  return m_polygons[i];
691  }
692 };
693 
694 } // namespace gis
695 
696 #endif // SQL_GIS_GEOMETRIES_CS_H_INCLUDED
gis::Cartesian_multilinestring::iterator
decltype(m_linestrings) typedef ::iterator iterator
Definition: geometries_cs.h:509
gis::Cartesian_geometrycollection::empty
bool empty() const override
Checks if the collection is empty.
Definition: geometries.cc:366
gis::Cartesian_linestring::begin
const_iterator begin() const noexcept
Definition: geometries_cs.h:98
gis::Geographic_point
A geographic (ellipsoidal) 2d point.
Definition: geometries_cs.h:56
gis::Cartesian_polygon::accept
bool accept(Geometry_visitor *v) override
Applies a hierarchical visitor to this geometry.
Definition: geometries.cc:127
gis::Cartesian_linestring::resize
void resize(std::size_t count)
Definition: geometries_cs.h:91
gis::Geographic_multipoint::begin
const_iterator begin() const noexcept
Definition: geometries_cs.h:489
gis::Cartesian_geometrycollection::Cartesian_geometrycollection
Cartesian_geometrycollection()
Definition: geometries_cs.h:317
gis::Cartesian_geometrycollection::resize
void resize(std::size_t count) override
Resizes the geometrycollection to contain a given number of elements.
Definition: geometries_cs.h:345
gis::Geographic_polygon::size
std::size_t size() const override
Returns the size of the polygon.
Definition: geometries.cc:216
gis::Geographic_multipoint::begin
iterator begin() noexcept
Definition: geometries_cs.h:488
gis::Geographic_multipoint::operator[]
const Geographic_point & operator[](std::size_t i) const override
Definition: geometries_cs.h:495
gis::Geographic_multipoint::value_type
decltype(m_points) typedef ::value_type value_type
Definition: geometries_cs.h:464
gis::Cartesian_linestring::back
const Cartesian_point & back() const
Definition: geometries_cs.h:95
gis::Geographic_multilinestring
A geographic (ellipsoidal) 2d multilinestring.
Definition: geometries_cs.h:551
gis::Geographic_multilinestring::coordinate_system
Coordinate_system coordinate_system() const override
Gets the coordinate system.
Definition: geometries_cs.h:566
gis::Geographic_linestring::size
std::size_t size() const override
Returns the size of (number of points in) the linestring.
Definition: geometries_cs.h:136
gis::Cartesian_multipoint::operator[]
const Cartesian_point & operator[](std::size_t i) const override
Definition: geometries_cs.h:452
gis::Geographic_multipolygon::is_empty
bool is_empty() const override
Check if this is an empty geometry.
Definition: geometries_cs.h:667
gis::Geographic_point::Geographic_point
Geographic_point()=default
gis::Geographic_geometrycollection::m_geometries
std::vector< Geometry *, Malloc_allocator< Geometry * > > m_geometries
List of geometries in the collection.
Definition: geometries_cs.h:364
gis::Cartesian_point::Cartesian_point
Cartesian_point()=default
gis::Cartesian_multilinestring::clear
void clear() noexcept override
Removes all geometries from the geometrycollection.
Definition: geometries_cs.h:531
gis::Geographic_multipolygon::begin
const_iterator begin() const noexcept
Definition: geometries_cs.h:681
gis::Cartesian_geometrycollection::iterator
decltype(m_geometries) typedef ::iterator iterator
Definition: geometries_cs.h:314
gis::Geographic_multipolygon::empty
bool empty() const override
Checks if the collection is empty.
Definition: geometries.cc:627
gis::Multilinestring
A colletion of linestrings.
Definition: geometries.h:421
gis::Geographic_multipoint::const_iterator
decltype(m_points) typedef ::const_iterator const_iterator
Definition: geometries_cs.h:466
gis::Linearring
A ring-shaped linestring.
Definition: geometries.h:287
gis::Cartesian_multipolygon::is_empty
bool is_empty() const override
Check if this is an empty geometry.
Definition: geometries_cs.h:620
gis::Cartesian_multilinestring::begin
const_iterator begin() const noexcept
Definition: geometries_cs.h:537
gis::Geographic_polygon::const_interior_rings
decltype(m_interior_rings) const & const_interior_rings() const
Get list of interior rings.
gis::Geographic_geometrycollection::begin
iterator begin() noexcept
Definition: geometries_cs.h:401
gis::Geographic_linestring::accept
bool accept(Geometry_visitor *v) override
Applies a hierarchical visitor to this geometry.
Definition: geometries.cc:85
gis::Geographic_multipoint
A geographic (ellipsoidal) 2d multipoint.
Definition: geometries_cs.h:458
gis::Cartesian_geometrycollection::size
std::size_t size() const override
Returns the size of the geometrycollection.
Definition: geometries_cs.h:344
gis::Cartesian_linearring::coordinate_system
Coordinate_system coordinate_system() const override
Gets the coordinate system.
Definition: geometries_cs.h:159
gis::Geographic_geometrycollection::begin
const_iterator begin() const noexcept
Definition: geometries_cs.h:402
gis::Cartesian_multipoint::begin
iterator begin() noexcept
Definition: geometries_cs.h:445
gis::Cartesian_geometrycollection::accept
bool accept(Geometry_visitor *v) override
Applies a hierarchical visitor to this geometry.
Definition: geometries.cc:285
gis::Cartesian_linestring::operator[]
Cartesian_point & operator[](std::size_t i) override
Definition: geometries_cs.h:103
gis::Geographic_multilinestring::end
iterator end() noexcept
Definition: geometries_cs.h:589
gis::Cartesian_linestring::end
const_iterator end() const noexcept
Definition: geometries_cs.h:101
gis::Cartesian_geometrycollection::end
iterator end() noexcept
Definition: geometries_cs.h:351
gis::Cartesian_linearring::push_back
void push_back(const gis::Point &pt) override
Adds a point to the end of the linestring.
Definition: geometries_cs.h:164
gis::Cartesian_multipoint::value_type
decltype(m_points) typedef ::value_type value_type
Definition: geometries_cs.h:420
gis::Geographic_multipolygon::value_type
decltype(m_polygons) typedef ::value_type value_type
Definition: geometries_cs.h:655
gis::Cartesian_multilinestring::push_back
void push_back(const Geometry &g) override
Adds a geometry to the collection.
Definition: geometries.cc:550
gis::Cartesian_multipoint::operator[]
Cartesian_point & operator[](std::size_t i) override
Definition: geometries_cs.h:451
gis::Cartesian_geometrycollection::begin
const_iterator begin() const noexcept
Definition: geometries_cs.h:349
gis::Geographic_multilinestring::back
Geographic_linestring & back()
Definition: geometries_cs.h:583
gis::Geographic_multipolygon::end
const_iterator end() const noexcept
Definition: geometries_cs.h:684
gis::Cartesian_linearring::operator[]
Cartesian_point & operator[](std::size_t i) override
Definition: geometries_cs.h:174
gis::Geographic_geometrycollection::coordinate_system
Coordinate_system coordinate_system() const override
Gets the coordinate system.
Definition: geometries_cs.h:384
gis::Geographic_multipoint::operator[]
Geographic_point & operator[](std::size_t i) override
Definition: geometries_cs.h:494
gis::Cartesian_point::coordinate_system
Coordinate_system coordinate_system() const override
Gets the coordinate system.
Definition: geometries_cs.h:50
gis::Cartesian_geometrycollection::coordinate_system
Coordinate_system coordinate_system() const override
Gets the coordinate system.
Definition: geometries_cs.h:331
gis::Cartesian_geometrycollection::Cartesian_geometrycollection
Cartesian_geometrycollection(Cartesian_geometrycollection &&gc) noexcept
Definition: geometries_cs.h:321
gis::Geometry_type
Geometry_type
Types of geometry objects.
Definition: geometries.h:52
gis
Definition: area.cc:45
gis::Cartesian_linestring::const_iterator
decltype(m_points) typedef ::const_iterator const_iterator
Definition: geometries_cs.h:77
gis::Cartesian_multilinestring::empty
bool empty() const override
Checks if the collection is empty.
Definition: geometries.cc:560
gis::Cartesian_geometrycollection::operator[]
const Geometry & operator[](std::size_t i) const override
Definition: geometries_cs.h:355
gis::Geographic_polygon::accept
bool accept(Geometry_visitor *v) override
Applies a hierarchical visitor to this geometry.
Definition: geometries.cc:167
gis::Geographic_multilinestring::begin
iterator begin() noexcept
Definition: geometries_cs.h:586
gis::Cartesian_polygon::cartesian_exterior_ring
Cartesian_linearring & cartesian_exterior_ring() const
Get the exterior ring.
Definition: geometries.cc:177
gis::Geographic_geometrycollection::clear
void clear() noexcept override
Removes all geometries from the geometrycollection.
Definition: geometries_cs.h:399
gis::Cartesian_multipoint::resize
void resize(std::size_t count) override
Resizes the geometrycollection to contain a given number of elements.
Definition: geometries_cs.h:442
gis::Cartesian_multilinestring::resize
void resize(std::size_t count) override
Resizes the geometrycollection to contain a given number of elements.
Definition: geometries_cs.h:530
gis::Cartesian_multilinestring::size
std::size_t size() const override
Returns the size of the geometrycollection.
Definition: geometries_cs.h:529
gis::Geographic_geometrycollection::accept
bool accept(Geometry_visitor *v) override
Applies a hierarchical visitor to this geometry.
Definition: geometries.cc:410
gis::Cartesian_linestring::back
Cartesian_point & back()
Definition: geometries_cs.h:94
gis::Geographic_multipoint::accept
bool accept(Geometry_visitor *v) override
Applies a hierarchical visitor to this geometry.
Definition: geometries.cc:517
gis::Geographic_point::Geographic_point
Geographic_point(double x, double y)
Definition: geometries_cs.h:59
gis::Cartesian_multilinestring::value_type
decltype(m_linestrings) typedef ::value_type value_type
Definition: geometries_cs.h:508
gis::Cartesian_multipolygon
A Cartesian 2d multipolygon.
Definition: geometries_cs.h:601
gis::Geographic_multipolygon::accept
bool accept(Geometry_visitor *v) override
Applies a hierarchical visitor to this geometry.
Definition: geometries.cc:607
gis::Geographic_multilinestring::resize
void resize(std::size_t count) override
Resizes the geometrycollection to contain a given number of elements.
Definition: geometries_cs.h:580
gis::Cartesian_geometrycollection
A Cartesian 2d geometry collection.
Definition: geometries_cs.h:308
malloc_allocator.h
gis::Geographic_multipoint::is_empty
bool is_empty() const override
Check if this is an empty geometry.
Definition: geometries_cs.h:475
gis::Geographic_geometrycollection::~Geographic_geometrycollection
~Geographic_geometrycollection() override
Definition: geometries_cs.h:379
gis::Cartesian_multilinestring::m_linestrings
std::vector< Cartesian_linestring, Malloc_allocator< Cartesian_linestring > > m_linestrings
List of linestrings in the collection.
Definition: geometries_cs.h:505
gis::Geographic_multipoint::empty
bool empty() const override
Checks if the collection is empty.
Definition: geometries.cc:537
gis::Geographic_multipolygon
A geographic (ellipsoidal) 2d multipolygon.
Definition: geometries_cs.h:648
gis::Point::y
double y() const
Gets the second coordinate value.
Definition: geometries.cc:47
gis::Cartesian_geometrycollection::const_iterator
decltype(m_geometries) typedef ::const_iterator const_iterator
Definition: geometries_cs.h:315
gis::Cartesian_linestring::operator[]
const Cartesian_point & operator[](std::size_t i) const override
Definition: geometries_cs.h:104
gis::Geographic_multipoint::end
iterator end() noexcept
Definition: geometries_cs.h:491
gis::Cartesian_linestring::size
std::size_t size() const override
Returns the size of (number of points in) the linestring.
Definition: geometries_cs.h:90
gis::Cartesian_linearring::operator[]
const Cartesian_point & operator[](std::size_t i) const override
Definition: geometries_cs.h:177
gis::Cartesian_polygon
A Cartesian 2d polygon.
Definition: geometries_cs.h:210
gis::Geographic_linestring::resize
void resize(std::size_t count)
Definition: geometries_cs.h:137
gis::Cartesian_linearring::push_back
void push_back(gis::Point &&pt) override
Definition: geometries_cs.h:167
gis::Point::x
double x() const
Gets the first coordinate value.
Definition: geometries.cc:45
gis::Geographic_linestring::iterator
decltype(m_points) typedef ::iterator iterator
Definition: geometries_cs.h:122
gis::Cartesian_multilinestring::coordinate_system
Coordinate_system coordinate_system() const override
Gets the coordinate system.
Definition: geometries_cs.h:516
gis::Geographic_multilinestring::Geographic_multilinestring
Geographic_multilinestring()
Definition: geometries_cs.h:562
gis::Cartesian_polygon::m_exterior_ring
Cartesian_linearring m_exterior_ring
Exterior ring.
Definition: geometries_cs.h:213
gis::Geographic_geometrycollection::is_empty
bool is_empty() const override
Check if this is an empty geometry.
Definition: geometries_cs.h:388
gis::Cartesian_multilinestring::operator[]
const Geometry & operator[](std::size_t i) const override
Definition: geometries_cs.h:545
gis::Cartesian_linestring::end
iterator end() noexcept
Definition: geometries_cs.h:100
gis::Geographic_geometrycollection::Geographic_geometrycollection
Geographic_geometrycollection(Geographic_geometrycollection &&gc) noexcept
Definition: geometries_cs.h:374
gis::Geographic_linestring::back
Geographic_point & back()
Definition: geometries_cs.h:140
gis::Geographic_multilinestring::push_back
void push_back(const Geometry &g) override
Adds a geometry to the collection.
Definition: geometries.cc:573
gis::Cartesian_polygon::const_interior_rings
decltype(m_interior_rings) const & const_interior_rings() const
Get list of interior rings.
gis::Geographic_linearring::size
std::size_t size() const override
Returns the size of (number of points in) the linestring.
Definition: geometries_cs.h:198
gis::Geometry
Abstract superclass for all geometric objects.
Definition: geometries.h:99
gis::Geographic_multipoint::end
const_iterator end() const noexcept
Definition: geometries_cs.h:492
gis::Cartesian_multipoint::Cartesian_multipoint
Cartesian_multipoint()
Definition: geometries_cs.h:424
gis::Cartesian_linestring::accept
bool accept(Geometry_visitor *v) override
Applies a hierarchical visitor to this geometry.
Definition: geometries.cc:63
gis::Geographic_linestring::end
iterator end() noexcept
Definition: geometries_cs.h:146
gis::Cartesian_multipoint::clear
void clear() noexcept override
Removes all geometries from the geometrycollection.
Definition: geometries_cs.h:443
n
int n
Definition: xcom_base.cc:445
gis::Linestring
A string of connected line segments.
Definition: geometries.h:247
gis::Cartesian_multipoint::iterator
decltype(m_points) typedef ::iterator iterator
Definition: geometries_cs.h:421
gis::Geographic_linestring::Geographic_linestring
Geographic_linestring()
Definition: geometries_cs.h:125
gis::Geographic_multilinestring::back
const Geographic_linestring & back() const
Definition: geometries_cs.h:584
gis::Geographic_linearring::coordinate_system
Coordinate_system coordinate_system() const override
Gets the coordinate system.
Definition: geometries_cs.h:186
gis::Cartesian_multipolygon::Cartesian_multipolygon
Cartesian_multipolygon()
Definition: geometries_cs.h:612
gis::Cartesian_multipolygon::end
iterator end() noexcept
Definition: geometries_cs.h:636
gis::Cartesian_multipolygon::empty
bool empty() const override
Checks if the collection is empty.
Definition: geometries.cc:605
gis::Geographic_multilinestring::clear
void clear() noexcept override
Removes all geometries from the geometrycollection.
Definition: geometries_cs.h:581
gis::Geographic_multipoint::Geographic_multipoint
Geographic_multipoint()
Definition: geometries_cs.h:468
gis::Coordinate_system
Coordinate_system
Types of coordinate systems.
Definition: geometries.h:68
gis::Multipolygon
A collection of polygons.
Definition: geometries.h:441
gis::Geographic_linestring::clear
void clear() noexcept override
Removes all points from the linestring.
Definition: geometries_cs.h:138
gis::Coordinate_system::kCartesian
@ kCartesian
A Cartesian plane with the same unit in both directions.
gis::Cartesian_polygon::interior_rings
decltype(m_interior_rings) & interior_rings()
Get list of interior rings.
gis::Geographic_multilinestring::iterator
decltype(m_linestrings) typedef ::iterator iterator
Definition: geometries_cs.h:559
gis::Cartesian_multipolygon::begin
const_iterator begin() const noexcept
Definition: geometries_cs.h:634
gis::Cartesian_geometrycollection::clear
void clear() noexcept override
Removes all geometries from the geometrycollection.
Definition: geometries_cs.h:346
gis::Geographic_linestring
A geographic (ellipsoidal) 2d linestring.
Definition: geometries_cs.h:112
gis::Geographic_geometrycollection::iterator
decltype(m_geometries) typedef ::iterator iterator
Definition: geometries_cs.h:367
gis::Cartesian_multipoint::coordinate_system
Coordinate_system coordinate_system() const override
Gets the coordinate system.
Definition: geometries_cs.h:428
gis::Geographic_linearring::operator[]
Geographic_point & operator[](std::size_t i) override
Definition: geometries_cs.h:201
gis::Geographic_multipolygon::iterator
decltype(m_polygons) typedef ::iterator iterator
Definition: geometries_cs.h:656
gis::Cartesian_multipolygon::coordinate_system
Coordinate_system coordinate_system() const override
Gets the coordinate system.
Definition: geometries_cs.h:616
gis::Geographic_multilinestring::end
const_iterator end() const noexcept
Definition: geometries_cs.h:590
gis::Geographic_multipoint::push_back
void push_back(const Geometry &g) override
Adds a geometry to the collection.
Definition: geometries.cc:527
gis::Cartesian_linestring::clear
void clear() noexcept override
Removes all points from the linestring.
Definition: geometries_cs.h:92
gis::Cartesian_linearring::type
Geometry_type type() const override
Gets the geometry type of the object.
Definition: geometries_cs.h:158
gis::Geographic_point::coordinate_system
Coordinate_system coordinate_system() const override
Gets the coordinate system.
Definition: geometries_cs.h:60
gis::Cartesian_polygon::empty
bool empty() const override
Checks if the polygon is empty.
Definition: geometries.cc:153
gis::Cartesian_polygon::interior_ring
Linearring & interior_ring(std::size_t n) override
Returns an interior ring of the polygon.
Definition: geometries.cc:163
gis::Geographic_multipolygon::begin
iterator begin() noexcept
Definition: geometries_cs.h:680
gis::Geographic_linearring::push_back
void push_back(const gis::Point &pt) override
Adds a point to the end of the linestring.
Definition: geometries_cs.h:191
gis::Cartesian_multipolygon::accept
bool accept(Geometry_visitor *v) override
Applies a hierarchical visitor to this geometry.
Definition: geometries.cc:585
gis::Geographic_linearring::empty
bool empty() const override
Checks if the linestring is empty.
Definition: geometries_cs.h:197
gis::Geographic_multipoint::clear
void clear() noexcept override
Removes all geometries from the geometrycollection.
Definition: geometries_cs.h:486
gis::Linestring::type
Geometry_type type() const override
Gets the geometry type of the object.
Definition: geometries.h:249
gis::Cartesian_multipolygon::clear
void clear() noexcept override
Removes all geometries from the geometrycollection.
Definition: geometries_cs.h:631
gis::Geographic_geometrycollection::operator[]
const Geometry & operator[](std::size_t i) const override
Definition: geometries_cs.h:408
gis::Geographic_linestring::end
const_iterator end() const noexcept
Definition: geometries_cs.h:147
gis::Cartesian_multilinestring::back
const Cartesian_linestring & back() const
Definition: geometries_cs.h:534
gis::Cartesian_multilinestring
A Cartesian 2d multilinestring.
Definition: geometries_cs.h:501
gis::Cartesian_multipoint::push_back
void push_back(const Geometry &g) override
Adds a geometry to the collection.
Definition: geometries.cc:505
gis::Geographic_linearring::type
Geometry_type type() const override
Gets the geometry type of the object.
Definition: geometries_cs.h:185
gis::Geographic_polygon::interior_ring
Linearring & interior_ring(std::size_t n) override
Returns an interior ring of the polygon.
Definition: geometries.cc:226
gis::Geometry_visitor
Abstract visitor class to be used on class Geometry and descendants.
Definition: geometry_visitor.h:45
gis::Cartesian_multilinestring::Cartesian_multilinestring
Cartesian_multilinestring()
Definition: geometries_cs.h:512
gis::Geographic_multipolygon::push_back
void push_back(const Geometry &g) override
Adds a geometry to the collection.
Definition: geometries.cc:617
gis::Cartesian_multipolygon::operator[]
const Geometry & operator[](std::size_t i) const override
Definition: geometries_cs.h:642
gis::Geographic_geometrycollection::const_iterator
decltype(m_geometries) typedef ::const_iterator const_iterator
Definition: geometries_cs.h:368
gis::Geographic_geometrycollection::size
std::size_t size() const override
Returns the size of the geometrycollection.
Definition: geometries_cs.h:397
gis::Geographic_multilinestring::const_iterator
decltype(m_linestrings) typedef ::const_iterator const_iterator
Definition: geometries_cs.h:560
gis::Cartesian_polygon::push_back
void push_back(const Linearring &lr) override
Adds a linear ring to the polygon.
Definition: geometries.cc:137
gis::Geographic_multipolygon::Geographic_multipolygon
Geographic_multipolygon()
Definition: geometries_cs.h:659
gis::Geographic_linearring
A geographic (ellipsoidal) 2d linear ring.
Definition: geometries_cs.h:183
gis::Geographic_linestring::m_points
std::vector< Geographic_point, Malloc_allocator< Geographic_point > > m_points
String of points constituting the linestring.
Definition: geometries_cs.h:118
gis::Cartesian_multipoint::accept
bool accept(Geometry_visitor *v) override
Applies a hierarchical visitor to this geometry.
Definition: geometries.cc:495
gis::Cartesian_geometrycollection::is_empty
bool is_empty() const override
Check if this is an empty geometry.
Definition: geometries_cs.h:335
gis::Cartesian_multipoint::end
iterator end() noexcept
Definition: geometries_cs.h:448
gis::Geographic_geometrycollection::push_back
void push_back(const Geometry &g) override
Adds a geometry to the collection.
Definition: geometries.cc:421
gis::Cartesian_multipoint::m_points
std::vector< Cartesian_point, Malloc_allocator< Cartesian_point > > m_points
List of points in the collection.
Definition: geometries_cs.h:417
gis::Cartesian_multipoint::is_empty
bool is_empty() const override
Check if this is an empty geometry.
Definition: geometries_cs.h:432
gis::Geographic_polygon::m_exterior_ring
Geographic_linearring m_exterior_ring
Exterior ring.
Definition: geometries_cs.h:262
gis::Cartesian_linearring::accept
bool accept(Geometry_visitor *v) override
Applies a hierarchical visitor to this geometry.
Definition: geometries.cc:107
gis::Cartesian_geometrycollection::~Cartesian_geometrycollection
~Cartesian_geometrycollection() override
Definition: geometries_cs.h:326
gis::Geographic_geometrycollection
A geographic (ellipsoidal) 2d geometry collection.
Definition: geometries_cs.h:361
gis::Geographic_geometrycollection::end
const_iterator end() const noexcept
Definition: geometries_cs.h:405
gis::Geometrycollection
A collection of geometries.
Definition: geometries.h:360
gis::Cartesian_linestring::coordinate_system
Coordinate_system coordinate_system() const override
Gets the coordinate system.
Definition: geometries_cs.h:83
gis::Geographic_multilinestring::operator[]
const Geometry & operator[](std::size_t i) const override
Definition: geometries_cs.h:595
gis::Cartesian_multipolygon::iterator
decltype(m_polygons) typedef ::iterator iterator
Definition: geometries_cs.h:609
gis::Geographic_multilinestring::begin
const_iterator begin() const noexcept
Definition: geometries_cs.h:587
Malloc_allocator
Malloc_allocator is a C++ STL memory allocator based on my_malloc/my_free.
Definition: malloc_allocator.h:62
gis::Cartesian_polygon::size
std::size_t size() const override
Returns the size of the polygon.
Definition: geometries.cc:157
gis::Geographic_linestring::const_iterator
decltype(m_points) typedef ::const_iterator const_iterator
Definition: geometries_cs.h:123
gis::Geographic_linestring::operator[]
Geographic_point & operator[](std::size_t i) override
Definition: geometries_cs.h:149
gis::Cartesian_linearring
A Cartesian 2d linear ring.
Definition: geometries_cs.h:156
gis::Geographic_geometrycollection::operator[]
Geometry & operator[](std::size_t i) override
Definition: geometries_cs.h:407
gis::Cartesian_geometrycollection::begin
iterator begin() noexcept
Definition: geometries_cs.h:348
gis::Geographic_polygon::empty
bool empty() const override
Checks if the polygon is empty.
Definition: geometries.cc:212
gis::Cartesian_linestring::Cartesian_linestring
Cartesian_linestring()
Definition: geometries_cs.h:79
gis::Cartesian_multipolygon::size
std::size_t size() const override
Returns the size of the geometrycollection.
Definition: geometries_cs.h:629
gis::Geographic_linearring::clear
void clear() noexcept override
Removes all points from the linestring.
Definition: geometries_cs.h:199
gis::Cartesian_multilinestring::end
iterator end() noexcept
Definition: geometries_cs.h:539
gis::Geographic_multilinestring::accept
bool accept(Geometry_visitor *v) override
Applies a hierarchical visitor to this geometry.
Definition: geometries.cc:562
gis::Geographic_linearring::push_back
void push_back(gis::Point &&pt) override
Definition: geometries_cs.h:194
gis::Point
A 2d point.
Definition: geometries.h:145
gis::Multipoint
A collection of points.
Definition: geometries.h:402
gis::Geographic_linestring::push_back
void push_back(const Point &pt) override
Adds a point to the end of the linestring.
Definition: geometries.cc:95
gis::Cartesian_geometrycollection::push_back
void push_back(const Geometry &g) override
Adds a geometry to the collection.
Definition: geometries.cc:296
gis::Geographic_linestring::value_type
decltype(m_points) typedef ::value_type value_type
Definition: geometries_cs.h:121
gis::Geographic_linearring::accept
bool accept(Geometry_visitor *v) override
Applies a hierarchical visitor to this geometry.
Definition: geometries.cc:117
gis::Cartesian_multipolygon::resize
void resize(std::size_t count) override
Resizes the geometrycollection to contain a given number of elements.
Definition: geometries_cs.h:630
gis::Cartesian_geometrycollection::m_geometries
std::vector< Geometry *, Malloc_allocator< Geometry * > > m_geometries
List of geometries in the collection.
Definition: geometries_cs.h:311
gis::Geographic_polygon
A geographic (ellipsoidal) 2d polygon.
Definition: geometries_cs.h:259
gis::Geographic_polygon::geographic_exterior_ring
Geographic_linearring & geographic_exterior_ring() const
Get the exterior ring.
Definition: geometries.cc:222
gis::Cartesian_linearring::clear
void clear() noexcept override
Removes all points from the linestring.
Definition: geometries_cs.h:172
gis::Geographic_polygon::m_interior_rings
std::vector< Geographic_linearring, Malloc_allocator< Geographic_linearring > > m_interior_rings
Interior rings (holes).
Definition: geometries_cs.h:266
geometries.h
gis::Cartesian_polygon::Cartesian_polygon
Cartesian_polygon()
Definition: geometries_cs.h:220
gis::Cartesian_multipolygon::operator[]
Cartesian_polygon & operator[](std::size_t i) override
Definition: geometries_cs.h:639
gis::Geographic_polygon::push_back
void push_back(const Linearring &lr) override
Adds a linear ring to the polygon.
Definition: geometries.cc:196
gis::Cartesian_multipolygon::end
const_iterator end() const noexcept
Definition: geometries_cs.h:637
gis::Geographic_multipoint::iterator
decltype(m_points) typedef ::iterator iterator
Definition: geometries_cs.h:465
gis::Geographic_multipolygon::coordinate_system
Coordinate_system coordinate_system() const override
Gets the coordinate system.
Definition: geometries_cs.h:663
gis::Cartesian_multilinestring::back
Cartesian_linestring & back()
Definition: geometries_cs.h:533
gis::Geographic_linestring::begin
iterator begin() noexcept
Definition: geometries_cs.h:143
gis::Cartesian_point
A Cartesian 2d point.
Definition: geometries_cs.h:46
gis::Geographic_multipolygon::const_iterator
decltype(m_polygons) typedef ::const_iterator const_iterator
Definition: geometries_cs.h:657
gis::Cartesian_multilinestring::operator[]
Cartesian_linestring & operator[](std::size_t i) override
Definition: geometries_cs.h:542
gis::Cartesian_multilinestring::end
const_iterator end() const noexcept
Definition: geometries_cs.h:540
gis::Geographic_multilinestring::value_type
decltype(m_linestrings) typedef ::value_type value_type
Definition: geometries_cs.h:558
gis::Cartesian_polygon::exterior_ring
Linearring & exterior_ring() override
Returns the exterior ring of the polygon.
Definition: geometries_cs.h:253
gis::Geographic_multipoint::size
std::size_t size() const override
Returns the size of the geometrycollection.
Definition: geometries_cs.h:484
gis::Geographic_multipolygon::size
std::size_t size() const override
Returns the size of the geometrycollection.
Definition: geometries_cs.h:676
gis::Cartesian_multilinestring::begin
iterator begin() noexcept
Definition: geometries_cs.h:536
gis::Cartesian_polygon::coordinate_system
Coordinate_system coordinate_system() const override
Gets the coordinate system.
Definition: geometries_cs.h:223
gis::Geographic_multilinestring::size
std::size_t size() const override
Returns the size of the geometrycollection.
Definition: geometries_cs.h:579
gis::Cartesian_multipoint::const_iterator
decltype(m_points) typedef ::const_iterator const_iterator
Definition: geometries_cs.h:422
gis::Cartesian_multilinestring::const_iterator
decltype(m_linestrings) typedef ::const_iterator const_iterator
Definition: geometries_cs.h:510
gis::Cartesian_linestring::value_type
decltype(m_points) typedef ::value_type value_type
Definition: geometries_cs.h:75
gis::Cartesian_multipolygon::m_polygons
std::vector< Cartesian_polygon, Malloc_allocator< Cartesian_polygon > > m_polygons
List of polygons in the collection.
Definition: geometries_cs.h:605
gis::Geographic_multilinestring::empty
bool empty() const override
Checks if the collection is empty.
Definition: geometries.cc:583
gis::Cartesian_multipoint
A Cartesian 2d multipoint.
Definition: geometries_cs.h:414
gis::Geographic_linearring::operator[]
const Geographic_point & operator[](std::size_t i) const override
Definition: geometries_cs.h:204
gis::Cartesian_multipoint::empty
bool empty() const override
Checks if the collection is empty.
Definition: geometries.cc:515
gis::Cartesian_multipolygon::begin
iterator begin() noexcept
Definition: geometries_cs.h:633
gis::Geographic_geometrycollection::empty
bool empty() const override
Checks if the collection is empty.
Definition: geometries.cc:491
count
ssize_t count
Definition: memcached.c:386
gis::Geographic_polygon::Geographic_polygon
Geographic_polygon()
Definition: geometries_cs.h:269
gis::Cartesian_multipolygon::push_back
void push_back(const Geometry &g) override
Adds a geometry to the collection.
Definition: geometries.cc:595
gis::Cartesian_linearring::is_empty
bool is_empty() const override
Check if this is an empty geometry.
Definition: geometries_cs.h:163
gis::Geographic_linestring::coordinate_system
Coordinate_system coordinate_system() const override
Gets the coordinate system.
Definition: geometries_cs.h:129
gis::Geographic_multilinestring::operator[]
Geographic_linestring & operator[](std::size_t i) override
Definition: geometries_cs.h:592
gis::Geographic_multipolygon::m_polygons
std::vector< Geographic_polygon, Malloc_allocator< Geographic_polygon > > m_polygons
List of polygons in the collection.
Definition: geometries_cs.h:652
gis::Cartesian_multilinestring::accept
bool accept(Geometry_visitor *v) override
Applies a hierarchical visitor to this geometry.
Definition: geometries.cc:539
gis::Linestring::is_empty
bool is_empty() const override
Check if this is an empty geometry.
Definition: geometries.h:251
gis::Cartesian_polygon::m_interior_rings
std::vector< Cartesian_linearring, Malloc_allocator< Cartesian_linearring > > m_interior_rings
Interior rings (holes).
Definition: geometries_cs.h:217
gis::Geographic_multipolygon::operator[]
Geographic_polygon & operator[](std::size_t i) override
Definition: geometries_cs.h:686
gis::Geographic_multipolygon::clear
void clear() noexcept override
Removes all geometries from the geometrycollection.
Definition: geometries_cs.h:678
key_memory_Geometry_objects_data
PSI_memory_key key_memory_Geometry_objects_data
Definition: psi_memory_key.cc:45
gis::Cartesian_point::Cartesian_point
Cartesian_point(double x, double y)
Definition: geometries_cs.h:49
gis::Geographic_multipoint::m_points
std::vector< Geographic_point, Malloc_allocator< Geographic_point > > m_points
List of points in the collection.
Definition: geometries_cs.h:461
gis::Cartesian_multipoint::end
const_iterator end() const noexcept
Definition: geometries_cs.h:449
gis::Cartesian_geometrycollection::end
const_iterator end() const noexcept
Definition: geometries_cs.h:352
gis::Geographic_multipolygon::operator[]
const Geometry & operator[](std::size_t i) const override
Definition: geometries_cs.h:689
gis::Geographic_polygon::coordinate_system
Coordinate_system coordinate_system() const override
Gets the coordinate system.
Definition: geometries_cs.h:272
gis::Cartesian_multipolygon::value_type
decltype(m_polygons) typedef ::value_type value_type
Definition: geometries_cs.h:608
gis::Geographic_multilinestring::m_linestrings
std::vector< Geographic_linestring, Malloc_allocator< Geographic_linestring > > m_linestrings
List of linestrings in the collection.
Definition: geometries_cs.h:555
gis::Geographic_geometrycollection::Geographic_geometrycollection
Geographic_geometrycollection()
Definition: geometries_cs.h:370
gis::Geographic_multipoint::coordinate_system
Coordinate_system coordinate_system() const override
Gets the coordinate system.
Definition: geometries_cs.h:471
gis::Coordinate_system::kGeographic
@ kGeographic
An ellipsoidal system with longitude and latitude coordinates, both in the same unit.
gis::Cartesian_linearring::empty
bool empty() const override
Checks if the linestring is empty.
Definition: geometries_cs.h:170
gis::Polygon
A polygon consisting of an outer ring and zero or more interior rings defining holes in the polygon.
Definition: geometries.h:309
gis::Cartesian_multipoint::size
std::size_t size() const override
Returns the size of the geometrycollection.
Definition: geometries_cs.h:441
gis::Cartesian_linestring::m_points
std::vector< Cartesian_point, Malloc_allocator< Cartesian_point > > m_points
String of points constituting the linestring.
Definition: geometries_cs.h:72
gis::Geographic_multipoint::resize
void resize(std::size_t count) override
Resizes the geometrycollection to contain a given number of elements.
Definition: geometries_cs.h:485
gis::Cartesian_multipolygon::const_iterator
decltype(m_polygons) typedef ::const_iterator const_iterator
Definition: geometries_cs.h:610
gis::Geographic_polygon::exterior_ring
Linearring & exterior_ring() override
Returns the exterior ring of the polygon.
Definition: geometries_cs.h:302
gis::Cartesian_multipoint::begin
const_iterator begin() const noexcept
Definition: geometries_cs.h:446
gis::Geographic_geometrycollection::end
iterator end() noexcept
Definition: geometries_cs.h:404
gis::Geographic_multipolygon::end
iterator end() noexcept
Definition: geometries_cs.h:683
gis::Geographic_linestring::back
const Geographic_point & back() const
Definition: geometries_cs.h:141
gis::Cartesian_linestring::push_back
void push_back(const Point &pt) override
Adds a point to the end of the linestring.
Definition: geometries.cc:73
gis::Cartesian_multilinestring::is_empty
bool is_empty() const override
Check if this is an empty geometry.
Definition: geometries_cs.h:520
gis::Geographic_linestring::operator[]
const Geographic_point & operator[](std::size_t i) const override
Definition: geometries_cs.h:150
gis::Geographic_geometrycollection::resize
void resize(std::size_t count) override
Resizes the geometrycollection to contain a given number of elements.
Definition: geometries_cs.h:398
gis::Cartesian_linearring::size
std::size_t size() const override
Returns the size of (number of points in) the linestring.
Definition: geometries_cs.h:171
gis::Geographic_polygon::interior_rings
decltype(m_interior_rings) & interior_rings()
Get list of interior rings.
gis::Geographic_linestring::empty
bool empty() const override
Checks if the linestring is empty.
Definition: geometries.cc:105
gis::Geographic_multipolygon::resize
void resize(std::size_t count) override
Resizes the geometrycollection to contain a given number of elements.
Definition: geometries_cs.h:677
gis::Cartesian_geometrycollection::operator[]
Geometry & operator[](std::size_t i) override
Definition: geometries_cs.h:354
gis::Cartesian_linestring::begin
iterator begin() noexcept
Definition: geometries_cs.h:97
gis::Cartesian_linestring::empty
bool empty() const override
Checks if the linestring is empty.
Definition: geometries.cc:83
gis::Geographic_linestring::begin
const_iterator begin() const noexcept
Definition: geometries_cs.h:144
gis::Cartesian_linestring
A Cartesian 2d linestring.
Definition: geometries_cs.h:66
gis::Cartesian_linestring::iterator
decltype(m_points) typedef ::iterator iterator
Definition: geometries_cs.h:76
gis::Geographic_multilinestring::is_empty
bool is_empty() const override
Check if this is an empty geometry.
Definition: geometries_cs.h:570
gis::Geographic_linearring::is_empty
bool is_empty() const override
Check if this is an empty geometry.
Definition: geometries_cs.h:190