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 const std::vector<Coordinate>* toVector() const;
00055
00057 CoordinateArraySequence();
00058
00060 CoordinateArraySequence(std::vector<Coordinate> *coords);
00061
00063 CoordinateArraySequence(size_t n);
00064
00065 ~CoordinateArraySequence();
00066
00067 bool isEmpty() const;
00068
00069 void add(const Coordinate& c);
00070
00071 virtual void add(const Coordinate& c, bool allowRepeated);
00072
00084 virtual void add(size_t i, const Coordinate& coord, bool allowRepeated);
00085
00086 void setAt(const Coordinate& c, size_t pos);
00087
00088 void deleteAt(size_t pos);
00089
00090 std::string toString() const;
00091
00092 void setPoints(const std::vector<Coordinate> &v);
00093
00094 double getOrdinate(size_t index,
00095 size_t ordinateIndex) const;
00096
00097 void setOrdinate(size_t index, size_t ordinateIndex,
00098 double value);
00099
00100 void expandEnvelope(Envelope &env) const;
00101
00102 size_t getDimension() const { return 3; }
00103
00104 void apply_rw(const CoordinateFilter *filter);
00105
00106 void apply_ro(CoordinateFilter *filter) const;
00107
00108 virtual CoordinateSequence& removeRepeatedPoints();
00109
00110 private:
00111 std::vector<Coordinate> *vect;
00112 };
00113
00115 typedef CoordinateArraySequence DefaultCoordinateSequence;
00116
00117 }
00118 }
00119
00120
00121
00122
00123
00124 #endif // ndef GEOS_GEOM_COORDINATEARRAYSEQUENCE_H
00125
00126
00127
00128
00129
00130
00131
00132
00133
00134
00135
00136
00137
00138
00139
00140