GEOS: InteriorPointLine.h Source File

GEOS 3.5.0

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

- File List

InteriorPointLine.h
1 /**********************************************************************
2 *
3 * GEOS - Geometry Engine Open Source
4 * http://geos.osgeo.org
5 *
6 * Copyright (C) 2005-2006 Refractions Research Inc.
7 * Copyright (C) 2001-2002 Vivid Solutions Inc.
8 *
9 * This is free software; you can redistribute and/or modify it under
10 * the terms of the GNU Lesser General Public Licence as published
11 * by the Free Software Foundation.
12 * See the COPYING file for more information.
13 *
14 **********************************************************************
15 *
16 * Last port: algorithm/InteriorPointLine.java r317 (JTS-1.12)
17 *
18 **********************************************************************/
19
20 #ifndef GEOS_ALGORITHM_INTERIORPOINTLINE_H
21 #define GEOS_ALGORITHM_INTERIORPOINTLINE_H
22
23 #include <geos/export.h>
24 #include <geos/geom/Coordinate.h>
25
26 // Forward declarations
27 namespace geos {
28 namespace geom {
29 class Geometry;
30 class CoordinateSequence;
31 }
32 }
33
34
35 namespace geos {
36 namespace algorithm { // geos::algorithm
37
48 class GEOS_DLL InteriorPointLine {
49 public:
50
51 InteriorPointLine(const geom::Geometry *g);
52
53 ~InteriorPointLine();
54
55 //Coordinate* getInteriorPoint() const;
56
57 bool getInteriorPoint(geom::Coordinate& ret) const;
58
59 private:
60
61 bool hasInterior;
62
63 geom::Coordinate centroid;
64
65 double minDistance;
66
67 geom::Coordinate interiorPoint;
68
69 void addInterior(const geom::Geometry *geom);
70
71 void addInterior(const geom::CoordinateSequence *pts);
72
73 void addEndpoints(const geom::Geometry *geom);
74
75 void addEndpoints(const geom::CoordinateSequence *pts);
76
77 void add(const geom::Coordinate& point);
78
79 };
80
81 } // namespace geos::algorithm
82 } // namespace geos
83
84 #endif // GEOS_ALGORITHM_INTERIORPOINTLINE_H
85
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:167
geos::algorithm::InteriorPointLine
Computes a point in the interior of an linear geometry.
Definition: InteriorPointLine.h:48
geos
Basic namespace for all GEOS functionalities.
Definition: IndexedNestedRingTester.h:25
geos::geom::CoordinateSequence
The internal representation of a list of coordinates inside a Geometry.
Definition: CoordinateSequence.h:59