GEOS 3.3.4

- Main Page
- Related Pages
- Namespaces
- Classes
- Files

- File List

TaggedLineSegment.h
1 /**********************************************************************
2 * $Id: TaggedLineSegment.h 2785 2009-12-03 19:55:11Z mloskot $
3 *
4 * GEOS - Geometry Engine Open Source
5 * http://geos.refractions.net
6 *
7 * Copyright (C) 2006 Refractions Research Inc.
8 *
9 * This is free software; you can redistribute and/or modify it under
10 * the terms of the GNU Lesser General Licence as published
11 * by the Free Software Foundation.
12 * See the COPYING file for more information.
13 *
14 **********************************************************************
15 *
16 * Last port: simplify/TaggedLineSegment.java rev. 1.1 (JTS-1.7)
17 *
18 **********************************************************************
19 *
20 * NOTES: Use of this class by DP simplification algorithms
21 * makes it useless for a TaggedLineSegment to store copies
22 * of coordinates. Using pointers would be good enough here.
23 * We don't do it to avoid having to break inheritance from
24 * LineSegment, which has copies intead. Wheter LineSegment
25 * itself should be refactored can be discussed.
26 * --strk 2006-04-12
27 *
28 **********************************************************************/
29
30 #ifndef GEOS_SIMPLIFY_TAGGEDLINESEGMENT_H
31 #define GEOS_SIMPLIFY_TAGGEDLINESEGMENT_H
32
33 #include <geos/export.h>
34 #include <geos/geom/LineSegment.h> // for inheritance
35
36
37 // Forward declarations
38 namespace geos {
39 namespace geom {
40 class Coordinate;
41 class Geometry;
42 }
43 }
44
45 namespace geos {
46 namespace simplify { // geos::simplify
47
48
55 class GEOS_DLL TaggedLineSegment: public geom::LineSegment
56 {
57
58 public:
59
60 TaggedLineSegment(const geom::Coordinate& p0,
61 const geom::Coordinate& p1,
62 const geom::Geometry* parent,
63 unsigned int index);
64
65 TaggedLineSegment(const geom::Coordinate& p0,
66 const geom::Coordinate& p1);
67
68 TaggedLineSegment(const TaggedLineSegment& ls);
69
70 const geom::Geometry* getParent() const;
71
72 unsigned int getIndex() const;
73
74 private:
75
76 const geom::Geometry* parent;
77
78 unsigned int index;
79
80 };
81
82
83
84 } // namespace geos::simplify
85 } // namespace geos
86
87 #endif // GEOS_SIMPLIFY_TAGGEDLINESEGMENT_H
88
89 /**********************************************************************
90 * $Log$
91 * Revision 1.2 2006/04/12 17:19:57 strk
92 * Ported TaggedLineStringSimplifier class, made LineSegment class
93 * polymorphic to fix derivation of TaggedLineSegment
94 *
95 * Revision 1.1 2006/04/12 14:22:12 strk
96 * Initial implementation of TaggedLineSegment and TaggedLineString classes
97 *
98 **********************************************************************/