GEOS: InteriorPointLine.h Source File

GEOS 3.3.8

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

- File List

InteriorPointLine.h
1 /**********************************************************************
2 * $Id: InteriorPointLine.h 3164 2010-12-24 14:27:46Z strk $
3 *
4 * GEOS - Geometry Engine Open Source
5 * http://geos.refractions.net
6 *
7 * Copyright (C) 2005-2006 Refractions Research Inc.
8 * Copyright (C) 2001-2002 Vivid Solutions Inc.
9 *
10 * This is free software; you can redistribute and/or modify it under
11 * the terms of the GNU Lesser General Public Licence as published
12 * by the Free Software Foundation.
13 * See the COPYING file for more information.
14 *
15 **********************************************************************
16 *
17 * Last port: algorithm/InteriorPointLine.java r317 (JTS-1.12)
18 *
19 **********************************************************************/
20
21 #ifndef GEOS_ALGORITHM_INTERIORPOINTLINE_H
22 #define GEOS_ALGORITHM_INTERIORPOINTLINE_H
23
24 #include <geos/export.h>
25 #include <geos/geom/Coordinate.h>
26
27 // Forward declarations
28 namespace geos {
29 namespace geom {
30 class Geometry;
31 class CoordinateSequence;
32 }
33 }
34
35
36 namespace geos {
37 namespace algorithm { // geos::algorithm
38
49 class GEOS_DLL InteriorPointLine {
50 public:
51
52 InteriorPointLine(const geom::Geometry *g);
53
54 ~InteriorPointLine();
55
56 //Coordinate* getInteriorPoint() const;
57
58 bool getInteriorPoint(geom::Coordinate& ret) const;
59
60 private:
61
62 bool hasInterior;
63
64 geom::Coordinate centroid;
65
66 double minDistance;
67
68 geom::Coordinate interiorPoint;
69
70 void addInterior(const geom::Geometry *geom);
71
72 void addInterior(const geom::CoordinateSequence *pts);
73
74 void addEndpoints(const geom::Geometry *geom);
75
76 void addEndpoints(const geom::CoordinateSequence *pts);
77
78 void add(const geom::Coordinate& point);
79
80 };
81
82 } // namespace geos::algorithm
83 } // namespace geos
84
85 #endif // GEOS_ALGORITHM_INTERIORPOINTLINE_H
86
87 /**********************************************************************
88 * $Log$
89 * Revision 1.1 2006/03/09 16:46:48 strk
90 * geos::geom namespace definition, first pass at headers split
91 *
92 **********************************************************************/
93