GEOS  3.9.0dev
GeometryLocation.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.
12  *
13  **********************************************************************
14  *
15  * Last port: operation/distance/GeometryLocation.java rev. 1.7 (JTS-1.10)
16  *
17  **********************************************************************/
18
19 #ifndef GEOS_OP_DISTANCE_GEOMETRYLOCATION_H
20 #define GEOS_OP_DISTANCE_GEOMETRYLOCATION_H
21
22 #include <geos/export.h>
23
24 #include <geos/geom/Coordinate.h> // for composition
25
26 // Forward declarations
27 namespace geos {
28 namespace geom {
29 class Geometry;
30 }
31 }
32
33
34 namespace geos {
35 namespace operation { // geos::operation
36 namespace distance { // geos::operation::distance
37
38
50 class GEOS_DLL GeometryLocation {
51 private:
52  const geom::Geometry* component;
53  size_t segIndex;
54  bool inside_area;
56 public:
64  static const int INSIDE_AREA = -1;
65
75  GeometryLocation(const geom::Geometry* component,
76  size_t segIndex, const geom::Coordinate& pt);
77
85  GeometryLocation(const geom::Geometry* component,
86  const geom::Coordinate& pt);
87
91  const geom::Geometry* getGeometryComponent();
92
101  size_t getSegmentIndex();
102
106  geom::Coordinate& getCoordinate();
107
112  bool isInsideArea();
113
114  std::string toString();
115 };
116
117 } // namespace geos::operation::distance
118 } // namespace geos::operation
119 } // namespace geos
120
121 #endif // GEOS_OP_DISTANCE_GEOMETRYLOCATION_H
122
Coordinate is the lightweight class used to store coordinates.
Definition: Coordinate.h:60
Represents the location of a point on a Geometry.
Definition: GeometryLocation.h:50
Basic implementation of Geometry, constructed and destructed by GeometryFactory.
Definition: Geometry.h:188
Basic namespace for all GEOS functionalities.
Definition: IndexedNestedRingTester.h:26