GEOS  3.11.0
CoordinateArrayFilter.h
1 /**********************************************************************
2  *
3  * GEOS - Geometry Engine Open Source
4  * http://geos.osgeo.org
5  *
6  * Copyright (C) 2001-2002 Vivid Solutions Inc.
7  * Copyright (C) 2006 Refractions Research Inc.
8  *
9  * This is free software; you can redistribute and/or modify it under
10  * the terms of the GNU Lesser General Public Licence as published
11  * by the Free Software Foundation.
12  * See the COPYING file for more information.
13  *
14  **********************************************************************/
15 
16 #pragma once
17 
18 #include <geos/export.h>
19 #include <cassert>
20 
21 #include <geos/geom/CoordinateFilter.h>
22 #include <geos/geom/CoordinateSequence.h>
23 #include <geos/geom/Coordinate.h>
24 
25 namespace geos {
26 namespace util { // geos::util
27 
36 private:
37  geom::Coordinate::ConstVect& pts; // target vector reference
38 public:
45  :
46  pts(target)
47  {}
48 
49  virtual
51 
52  virtual void
54  {
55  pts.push_back(coord);
56  }
57 };
58 
59 
60 } // namespace geos.util
61 } // namespace geos
62 
Geometry classes support the concept of applying a coordinate filter to every coordinate in the Geome...
Definition: CoordinateFilter.h:41
Coordinate is the lightweight class used to store coordinates.
Definition: Coordinate.h:58
std::vector< const Coordinate * > ConstVect
A vector of const Coordinate pointers.
Definition: Coordinate.h:69
A CoordinateFilter that adds read-only pointers to every Coordinate in a Geometry to a given vector.
Definition: CoordinateArrayFilter.h:35
CoordinateArrayFilter(geom::Coordinate::ConstVect &target)
Constructs a CoordinateArrayFilter.
Definition: CoordinateArrayFilter.h:44
virtual void filter_ro(const geom::Coordinate *coord)
Performs an operation with coord.
Definition: CoordinateArrayFilter.h:53
Basic namespace for all GEOS functionalities.
Definition: Angle.h:25