GEOS 3.6.2
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
31namespace geos {
32 namespace algorithm {
33 //class LineIntersector;
34 }
35}
36
37namespace geos {
38namespace noding { // geos.noding
39
50class GEOS_DLL BasicSegmentString : public SegmentString {
51
52public:
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
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
97private:
98
100
101};
102
103} // namespace geos.noding
104} // namespace geos
105
106#endif // ndef GEOS_NODING_BASICSEGMENTSTRING_H
107
The internal representation of a list of coordinates inside a Geometry.
Definition CoordinateSequence.h:59
Coordinate is the lightweight class used to store coordinates.
Definition Coordinate.h:60
Definition BasicSegmentString.h:50
BasicSegmentString(geom::CoordinateSequence *newPts, const void *newContext)
Construct a BasicSegmentString.
Definition BasicSegmentString.h:60
virtual const geom::Coordinate & getCoordinate(unsigned int i) const
see dox in SegmentString.h
virtual std::ostream & print(std::ostream &os) const
see dox in SegmentString.h
virtual geom::CoordinateSequence * getCoordinates() const
see dox in SegmentString.h
virtual bool isClosed() const
see dox in SegmentString.h
virtual unsigned int size() const
see dox in SegmentString.h
Definition BasicSegmentString.h:71
int getSegmentOctant(unsigned int index) const
Gets the octant of the segment starting at vertex index.
SegmentString(const void *newContext)
Construct a SegmentString.
Definition SegmentString.h:58
Contains classes and interfaces implementing fundamental computational geometry algorithms.
Definition Angle.h:33
Provides classes for various kinds of spatial indexes.
Definition IndexedNestedRingTester.h:31
Classes to compute nodings for arrangements of line segments and line segment sequences.
Definition PreparedLineString.h:27
Basic namespace for all GEOS functionalities.
Definition IndexedNestedRingTester.h:25