00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016 #ifndef GEOS_GEOM_COORDINATEARRAYSEQUENCE_H
00017 #define GEOS_GEOM_COORDINATEARRAYSEQUENCE_H
00018
00019 #include <geos/export.h>
00020 #include <vector>
00021
00022
00023 #include <geos/geom/CoordinateSequence.h>
00024
00025 #include <geos/inline.h>
00026
00027
00028 namespace geos {
00029 namespace geom {
00030 class Coordinate;
00031 }
00032 }
00033
00034
00035 namespace geos {
00036 namespace geom {
00037
00039 class GEOS_DLL CoordinateArraySequence : public CoordinateSequence {
00040 public:
00041
00042 CoordinateArraySequence(const CoordinateArraySequence &cl);
00043
00044 CoordinateSequence *clone() const;
00045
00046
00047 const Coordinate& getAt(size_t pos) const;
00048
00050 virtual void getAt(size_t i, Coordinate& c) const;
00051
00052
00053 size_t getSize() const;
00054
00055
00056 const std::vector<Coordinate>* toVector() const;
00057
00058
00059 void toVector(std::vector<Coordinate>&) const;
00060
00062 CoordinateArraySequence();
00063
00065 CoordinateArraySequence(std::vector<Coordinate> *coords);
00066
00068 CoordinateArraySequence(size_t n);
00069
00070 ~CoordinateArraySequence();
00071
00072 bool isEmpty() const;
00073
00074 void add(const Coordinate& c);
00075
00076 virtual void add(const Coordinate& c, bool allowRepeated);
00077
00089 virtual void add(size_t i, const Coordinate& coord, bool allowRepeated);
00090
00091 void setAt(const Coordinate& c, size_t pos);
00092
00093 void deleteAt(size_t pos);
00094
00095 std::string toString() const;
00096
00097 void setPoints(const std::vector<Coordinate> &v);
00098
00099 double getOrdinate(size_t index,
00100 size_t ordinateIndex) const;
00101
00102 void setOrdinate(size_t index, size_t ordinateIndex,
00103 double value);
00104
00105 void expandEnvelope(Envelope &env) const;
00106
00107 size_t getDimension() const { return 3; }
00108
00109 void apply_rw(const CoordinateFilter *filter);
00110
00111 void apply_ro(CoordinateFilter *filter) const;
00112
00113 virtual CoordinateSequence& removeRepeatedPoints();
00114
00115 private:
00116 std::vector<Coordinate> *vect;
00117 };
00118
00120 typedef CoordinateArraySequence DefaultCoordinateSequence;
00121
00122 }
00123 }
00124
00125
00126
00127
00128
00129 #endif // ndef GEOS_GEOM_COORDINATEARRAYSEQUENCE_H
00130
00131
00132
00133
00134
00135
00136
00137
00138
00139
00140
00141
00142
00143
00144
00145