00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020 #ifndef GEOS_NODING_BASICSEGMENTSTRING_H
00021 #define GEOS_NODING_BASICSEGMENTSTRING_H
00022
00023 #include <geos/noding/SegmentString.h>
00024 #include <geos/geom/CoordinateSequence.h>
00025
00026 #include <geos/inline.h>
00027
00028 #include <vector>
00029
00030
00031 namespace geos {
00032 namespace algorithm {
00033
00034 }
00035 }
00036
00037 namespace geos {
00038 namespace noding {
00039
00050 class BasicSegmentString : public SegmentString {
00051
00052 public:
00053
00055
00060 BasicSegmentString(geom::CoordinateSequence *newPts,
00061 const void* newContext)
00062 :
00063 SegmentString(newContext),
00064 pts(newPts)
00065 {}
00066
00067 virtual ~BasicSegmentString()
00068 {}
00069
00071 virtual unsigned int size() const
00072 {
00073 return pts->size();
00074 }
00075
00077 virtual const geom::Coordinate& getCoordinate(unsigned int i) const;
00078
00080 virtual geom::CoordinateSequence* getCoordinates() const;
00081
00083 virtual bool isClosed() const;
00084
00086 virtual std::ostream& print(std::ostream& os) const;
00087
00095 int getSegmentOctant(unsigned int index) const;
00096
00097 private:
00098
00099 geom::CoordinateSequence *pts;
00100
00101 };
00102
00103 }
00104 }
00105
00106 #ifdef GEOS_INLINE
00107 # include "geos/noding/SegmentString.inl"
00108 #endif
00109
00110 #endif // ndef GEOS_NODING_BASICSEGMENTSTRING_H
00111