GEOS
3.12.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
#pragma once
30
31
#include <geos/export.h>
32
#include <geos/geom/LineSegment.h>
// for inheritance
33
34
35
// Forward declarations
36
namespace
geos
{
37
namespace
geom {
38
class
Coordinate;
39
class
Geometry;
40
}
41
}
42
43
namespace
geos
{
44
namespace
simplify {
// geos::simplify
45
46
53
class
GEOS_DLL
TaggedLineSegment
:
public
geom::LineSegment
{
54
55
public
:
56
57
TaggedLineSegment
(
const
geom::Coordinate
& p0,
58
const
geom::Coordinate
& p1,
59
const
geom::Geometry
* parent,
60
std::size_t index);
61
62
TaggedLineSegment
(
const
geom::Coordinate
& p0,
63
const
geom::Coordinate
& p1);
64
65
TaggedLineSegment
(
const
TaggedLineSegment
& ls);
66
67
const
geom::Geometry
* getParent()
const
;
68
69
std::size_t getIndex()
const
;
70
71
private
:
72
73
const
geom::Geometry
* parent;
74
75
std::size_t index;
76
77
};
78
79
80
81
}
// namespace geos::simplify
82
}
// namespace geos
83
geos
Basic namespace for all GEOS functionalities.
Definition:
Angle.h:25
geos::geom::Coordinate
Coordinate is the lightweight class used to store coordinates.
Definition:
Coordinate.h:216
geos::geom::Geometry
Basic implementation of Geometry, constructed and destructed by GeometryFactory.
Definition:
Geometry.h:186
geos::simplify::TaggedLineSegment
A geom::LineSegment which is tagged with its location in a geom::Geometry.
Definition:
TaggedLineSegment.h:53
geos::geom::LineSegment
Definition:
LineSegment.h:61
Generated by
1.8.20