GEOS 3.4.2

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

- File List

PreparedPolygon.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 Public Licence as published
10 * by the Free Software Foundation.
11 * See the COPYING file for more information.
12 *
13 *
14 **********************************************************************
15 *
16 * Last port: geom/prep/PreparedPolygon.java rev 1.7 (JTS-1.10)
17 *
18 **********************************************************************/
19
20 #ifndef GEOS_GEOM_PREP_PREPAREDPOLYGON_H
21 #define GEOS_GEOM_PREP_PREPAREDPOLYGON_H
22
23 #include <geos/geom/prep/BasicPreparedGeometry.h> // for inheritance
24 #include <geos/noding/SegmentString.h>
25
26 namespace geos {
27 namespace noding {
28 class FastSegmentSetIntersectionFinder;
29 }
30 namespace algorithm {
31 namespace locate {
32 class PointOnGeometryLocator;
33 }
34 }
35 }
36
37 namespace geos {
38 namespace geom { // geos::geom
39 namespace prep { // geos::geom::prep
40
48 class PreparedPolygon : public BasicPreparedGeometry
49 {
50 private:
51 bool isRectangle;
52 mutable noding::FastSegmentSetIntersectionFinder * segIntFinder;
53 mutable algorithm::locate::PointOnGeometryLocator * ptOnGeomLoc;
54 mutable noding::SegmentString::ConstVect segStrings;
55
56 protected:
57 public:
58 PreparedPolygon( const geom::Geometry * geom);
59 ~PreparedPolygon( );
60
61 noding::FastSegmentSetIntersectionFinder * getIntersectionFinder() const;
62 algorithm::locate::PointOnGeometryLocator * getPointLocator() const;
63
64 bool contains( const geom::Geometry* g) const;
65 bool containsProperly( const geom::Geometry* g) const;
66 bool covers( const geom::Geometry* g) const;
67 bool intersects( const geom::Geometry* g) const;
68
69 };
70
71 } // namespace geos::geom::prep
72 } // namespace geos::geom
73 } // namespace geos
74
75 #endif // GEOS_GEOM_PREP_PREPAREDPOLYGON_H