GEOS  3.3.3
MultiPoint.h
1 /**********************************************************************
2  * $Id: MultiPoint.h 3211 2011-02-13 19:54:01Z mloskot $
3  *
4  * GEOS - Geometry Engine Open Source
5  * http://geos.refractions.net
6  *
7  * Copyright (C) 2011 Sandro Santilli <strk@keybit.net>
8  * Copyright (C) 2001-2002 Vivid Solutions Inc.
9  * Copyright (C) 2005 2006 Refractions Research Inc.
10  *
11  * This is free software; you can redistribute and/or modify it under
12  * the terms of the GNU Lesser General Public Licence as published
13  * by the Free Software Foundation.
14  * See the COPYING file for more information.
15  *
16  **********************************************************************
17  *
18  * Last port: geom/MultiPoint.java r320 (JTS-1.12)
19  *
20  **********************************************************************/
21 
22 #ifndef GEOS_GEOS_MULTIPOINT_H
23 #define GEOS_GEOS_MULTIPOINT_H
24 
25 #include <geos/export.h>
26 #include <geos/platform.h>
27 #include <geos/geom/GeometryCollection.h> // for inheritance
28 #include <geos/geom/Puntal.h> // for inheritance
29 #include <geos/geom/Dimension.h> // for Dimension::DimensionType
30 
31 #include <geos/inline.h>
32 
33 #include <string>
34 #include <vector>
35 
36 namespace geos {
37  namespace geom { // geos::geom
38  class Coordinate;
39  class CoordinateArraySequence;
40  }
41 }
42 
43 namespace geos {
44 namespace geom { // geos::geom
45 
46 #ifdef _MSC_VER
47 #pragma warning(push)
48 #pragma warning(disable:4250) // T1 inherits T2 via dominance
49 #endif
50 
56 class GEOS_DLL MultiPoint: public GeometryCollection, public Puntal
57 {
58 
59 public:
60 
61  friend class GeometryFactory;
62 
63  virtual ~MultiPoint();
64 
66  Dimension::DimensionType getDimension() const;
67 
69  int getBoundaryDimension() const;
70 
80  Geometry* getBoundary() const;
81 
82  std::string getGeometryType() const;
83 
84  virtual GeometryTypeId getGeometryTypeId() const;
85 
86  bool equalsExact(const Geometry *other, double tolerance=0) const;
87 
88  Geometry *clone() const { return new MultiPoint(*this); };
89 
90 protected:
91 
110  MultiPoint(std::vector<Geometry *> *newPoints, const GeometryFactory *newFactory);
111 
112  MultiPoint(const MultiPoint &mp): Geometry(mp), GeometryCollection(mp) {}
113 
114  const Coordinate* getCoordinateN(int n) const;
115 };
116 
117 #ifdef _MSC_VER
118 #pragma warning(pop)
119 #endif
120 
121 } // namespace geos::geom
122 } // namespace geos
123 
124 //#ifdef GEOS_INLINE
125 //# include "geos/geom/MultiPoint.inl"
126 //#endif
127 
128 #endif // ndef GEOS_GEOS_MULTIPOINT_H
129 
130 /**********************************************************************
131  * $Log$
132  * Revision 1.4 2006/05/04 15:49:39 strk
133  * updated all Geometry::getDimension() methods to return Dimension::DimensionType (closes bug#93)
134  *
135  * Revision 1.3 2006/04/28 10:55:39 strk
136  * Geometry constructors made protected, to ensure all constructions use GeometryFactory,
137  * which has been made friend of all Geometry derivates. getNumPoints() changed to return
138  * size_t.
139  *
140  * Revision 1.2 2006/03/24 09:52:41 strk
141  * USE_INLINE => GEOS_INLINE
142  *
143  * Revision 1.1 2006/03/09 16:46:49 strk
144  * geos::geom namespace definition, first pass at headers split
145  *
146  **********************************************************************/