GEOS 3.11.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#pragma once
20
21#include <geos/export.h>
22
23#include <geos/geom/Coordinate.h> // for composition
24
25// Forward declarations
26namespace geos {
27namespace geom {
28class Geometry;
29}
30}
31
32
33namespace geos {
34namespace operation { // geos::operation
35namespace distance { // geos::operation::distance
36
37
49class GEOS_DLL GeometryLocation {
50private:
51 const geom::Geometry* component;
52 std::size_t segIndex;
53 bool inside_area;
55public:
63 static const int INSIDE_AREA = -1;
64
75 std::size_t segIndex, const geom::Coordinate& pt);
76
85 const geom::Coordinate& pt);
86
91
100 std::size_t getSegmentIndex();
101
106
112
113 std::string toString();
114};
115
116} // namespace geos::operation::distance
117} // namespace geos::operation
118} // namespace geos
119
Coordinate is the lightweight class used to store coordinates.
Definition: Coordinate.h:58
Basic implementation of Geometry, constructed and destructed by GeometryFactory.
Definition: Geometry.h:186
Represents the location of a point on a Geometry.
Definition: GeometryLocation.h:49
GeometryLocation(const geom::Geometry *component, const geom::Coordinate &pt)
Constructs a GeometryLocation specifying a point inside an area geometry.
GeometryLocation(const geom::Geometry *component, std::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: geos.h:39