GEOS 3.9.1
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.
11 * See the COPYING file for more information.
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
27namespace geos {
28namespace geom {
29class Geometry;
30}
31}
32
33
34namespace geos {
35namespace operation { // geos::operation
36namespace distance { // geos::operation::distance
37
38
50class GEOS_DLL GeometryLocation {
51private:
52 const geom::Geometry* component;
53 size_t segIndex;
54 bool inside_area;
56public:
64 static const int INSIDE_AREA = -1;
65
76 size_t segIndex, const geom::Coordinate& pt);
77
86 const geom::Coordinate& pt);
87
92
102
107
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
Basic implementation of Geometry, constructed and destructed by GeometryFactory.
Definition Geometry.h:188
Represents the location of a point on a Geometry.
Definition GeometryLocation.h:50
GeometryLocation(const geom::Geometry *component, const geom::Coordinate &pt)
Constructs a GeometryLocation specifying a point inside an area geometry.
GeometryLocation(const geom::Geometry *component, size_t segIndex, const geom::Coordinate &pt)
Constructs a GeometryLocation specifying a point on a geometry, as well as the segment that the point...
bool isInsideArea()
Tests whether this location represents a point inside an area geometry.
const geom::Geometry * getGeometryComponent()
Basic namespace for all GEOS functionalities.
Definition IndexedNestedRingTester.h:26