GEOS: ComponentCoordinateExtracter.h Source File

GEOS 3.5.0

- Main Page
- Related Pages
- Namespaces
- Classes
- Files

- File List

ComponentCoordinateExtracter.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 #ifndef GEOS_GEOM_UTIL_COMPONENTCOORDINATEEXTRACTER_H
17 #define GEOS_GEOM_UTIL_COMPONENTCOORDINATEEXTRACTER_H
18
19 #include <vector>
20
21 #include <geos/geom/GeometryComponentFilter.h>
22 #include <geos/geom/Geometry.h> // to be removed when we have the .inl
23 #include <geos/geom/Coordinate.h> // to be removed when we have the .inl
24 #include <geos/geom/LineString.h> // to be removed when we have the .inl
25 #include <geos/geom/Point.h> // to be removed when we have the .inl
26 //#include <geos/platform.h>
27
28 namespace geos {
29 namespace geom { // geos::geom
30 namespace util { // geos::geom::util
31
38 class ComponentCoordinateExtracter : public GeometryComponentFilter
39 {
40 public:
48 static void getCoordinates(const Geometry &geom, std::vector<const Coordinate*> &ret);
49
54 ComponentCoordinateExtracter( std::vector<const Coordinate*> &newComps);
55
56 void filter_rw( Geometry * geom);
57
58 void filter_ro( const Geometry * geom);
59
60 private:
61
62 Coordinate::ConstVect &comps;
63
64 // Declare type as noncopyable
65 ComponentCoordinateExtracter(const ComponentCoordinateExtracter& other);
66 ComponentCoordinateExtracter& operator=(const ComponentCoordinateExtracter& rhs);
67 };
68
69 } // namespace geos.geom.util
70 } // namespace geos.geom
71 } // namespace geos
72
73 #endif //GEOS_GEOM_UTIL_COMPONENTCOORDINATEEXTRACTER_H
geos::geom::Coordinate::ConstVect
std::vector< const Coordinate * > ConstVect
A vector of const Coordinate pointers.
Definition: Coordinate.h:71
geos::geom::Geometry
Basic implementation of Geometry, constructed and destructed by GeometryFactory.
Definition: Geometry.h:167
geos::geom::util::ComponentCoordinateExtracter
Extracts a single representative Coordinate from each connected component of a Geometry.
Definition: ComponentCoordinateExtracter.h:38
geos::geom::util::ComponentCoordinateExtracter::ComponentCoordinateExtracter
ComponentCoordinateExtracter(std::vector< const Coordinate * > &newComps)
geos
Basic namespace for all GEOS functionalities.
Definition: IndexedNestedRingTester.h:25
geos::geom::util::ComponentCoordinateExtracter::getCoordinates
static void getCoordinates(const Geometry &geom, std::vector< const Coordinate * > &ret)
geos::geom::util::ComponentCoordinateExtracter::filter_rw
void filter_rw(Geometry *geom)
geos::geom::GeometryComponentFilter
Definition: GeometryComponentFilter.h:43