GEOS  3.6.1
BasicSegmentString.h
1 /**********************************************************************
2  *
3  * GEOS - Geometry Engine Open Source
4  * http://geos.osgeo.org
5  *
6  * Copyright (C) 2009 Sandro Santilli <strk@keybit.net>
7  *
8  * This is free software; you can redistribute and/or modify it under
9  * the terms of the GNU Lesser General Public Licence as published
10  * by the Free Software Foundation.
11  * See the COPYING file for more information.
12  *
13  **********************************************************************
14  *
15  * Last port: noding/BasicSegmentString.java rev. 1.1 (JTS-1.9)
16  *
17  **********************************************************************/
18 
19 #ifndef GEOS_NODING_BASICSEGMENTSTRING_H
20 #define GEOS_NODING_BASICSEGMENTSTRING_H
21 
22 #include <geos/export.h>
23 #include <geos/noding/SegmentString.h> // for inheritance
24 #include <geos/geom/CoordinateSequence.h> // for inlines (size())
25 
26 #include <geos/inline.h>
27 
28 #include <vector>
29 
30 // Forward declarations
31 namespace geos {
32  namespace algorithm {
33  //class LineIntersector;
34  }
35 }
36 
37 namespace geos {
38 namespace noding { // geos.noding
39 
50 class GEOS_DLL BasicSegmentString : public SegmentString {
51 
52 public:
53 
55  //
61  const void* newContext)
62  :
63  SegmentString(newContext),
64  pts(newPts)
65  {}
66 
67  virtual ~BasicSegmentString()
68  {}
69 
71  virtual unsigned int size() const
72  {
73  return pts->size();
74  }
75 
77  virtual const geom::Coordinate& getCoordinate(unsigned int i) const;
78 
80  virtual geom::CoordinateSequence* getCoordinates() const;
81 
83  virtual bool isClosed() const;
84 
86  virtual std::ostream& print(std::ostream& os) const;
87 
95  int getSegmentOctant(unsigned int index) const;
96 
97 private:
98 
100 
101 };
102 
103 } // namespace geos.noding
104 } // namespace geos
105 
106 #endif // ndef GEOS_NODING_BASICSEGMENTSTRING_H
107 
BasicSegmentString(geom::CoordinateSequence *newPts, const void *newContext)
Construct a BasicSegmentString.
Definition: BasicSegmentString.h:60
Coordinate is the lightweight class used to store coordinates.
Definition: Coordinate.h:60
An interface for classes which represent a sequence of contiguous line segments.
Definition: SegmentString.h:46
Definition: BasicSegmentString.h:50
Basic namespace for all GEOS functionalities.
Definition: IndexedNestedRingTester.h:25
The internal representation of a list of coordinates inside a Geometry.
Definition: CoordinateSequence.h:59
virtual unsigned int size() const
see dox in SegmentString.h
Definition: BasicSegmentString.h:71