GEOS
3.9.0
include
geos
simplify
TaggedLineSegment.h
1
/**********************************************************************
2
*
3
* GEOS - Geometry Engine Open Source
4
* http://geos.osgeo.org
5
*
6
* Copyright (C) 2006 Refractions Research Inc.
7
*
8
* This is free software; you can redistribute and/or modify it under
9
* the terms of the GNU Lesser General Licence as published
10
* by the Free Software Foundation.
11
* See the COPYING file for more information.
12
*
13
**********************************************************************
14
*
15
* Last port: simplify/TaggedLineSegment.java rev. 1.1 (JTS-1.7)
16
*
17
**********************************************************************
18
*
19
* NOTES: Use of this class by DP simplification algorithms
20
* makes it useless for a TaggedLineSegment to store copies
21
* of coordinates. Using pointers would be good enough here.
22
* We don't do it to avoid having to break inheritance from
23
* LineSegment, which has copies intead. Wheter LineSegment
24
* itself should be refactored can be discussed.
25
* --strk 2006-04-12
26
*
27
**********************************************************************/
28
29
#ifndef GEOS_SIMPLIFY_TAGGEDLINESEGMENT_H
30
#define GEOS_SIMPLIFY_TAGGEDLINESEGMENT_H
31
32
#include <geos/export.h>
33
#include <geos/geom/LineSegment.h>
// for inheritance
34
35
36
// Forward declarations
37
namespace
geos
{
38
namespace
geom {
39
class
Coordinate;
40
class
Geometry;
41
}
42
}
43
44
namespace
geos
{
45
namespace
simplify {
// geos::simplify
46
47
54
class
GEOS_DLL
TaggedLineSegment
:
public
geom::LineSegment
{
55
56
public
:
57
58
TaggedLineSegment
(
const
geom::Coordinate
& p0,
59
const
geom::Coordinate
& p1,
60
const
geom::Geometry
* parent,
61
size_t
index);
62
63
TaggedLineSegment
(
const
geom::Coordinate
& p0,
64
const
geom::Coordinate
& p1);
65
66
TaggedLineSegment
(
const
TaggedLineSegment
& ls);
67
68
const
geom::Geometry
* getParent()
const
;
69
70
size_t
getIndex()
const
;
71
72
private
:
73
74
const
geom::Geometry
* parent;
75
76
size_t
index;
77
78
};
79
80
81
82
}
// namespace geos::simplify
83
}
// namespace geos
84
85
#endif // GEOS_SIMPLIFY_TAGGEDLINESEGMENT_H
geos
Basic namespace for all GEOS functionalities.
Definition:
IndexedNestedRingTester.h:26
geos::geom::Coordinate
Coordinate is the lightweight class used to store coordinates.
Definition:
Coordinate.h:60
geos::geom::Geometry
Basic implementation of Geometry, constructed and destructed by GeometryFactory.
Definition:
Geometry.h:188
geos::simplify::TaggedLineSegment
A geom::LineSegment which is tagged with its location in a geom::Geometry.
Definition:
TaggedLineSegment.h:54
geos::geom::LineSegment
Definition:
LineSegment.h:59
Generated by
1.8.20