GEOS 3.14.0dev
RelateOp.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/relate/RelateOp.java rev. 1.19 (JTS-1.10)
16 *
17 **********************************************************************/
18
19#pragma once
20
21#include <geos/export.h>
22
23#include <geos/geom/IntersectionMatrix.h>
24#include <geos/operation/GeometryGraphOperation.h> // for inheritance
25#include <geos/operation/relate/RelateComputer.h> // for composition
26
27// Forward declarations
28namespace geos {
29namespace algorithm {
30class BoundaryNodeRule;
31}
32namespace geom {
33class Geometry;
34}
35}
36
37
38namespace geos {
39namespace operation { // geos::operation
40namespace relate { // geos::operation::relate
41
56class GEOS_DLL RelateOp: public GeometryGraphOperation {
57
58public:
59
71 static std::unique_ptr<geom::IntersectionMatrix> relate(
72 const geom::Geometry* a,
73 const geom::Geometry* b);
74
87 static std::unique_ptr<geom::IntersectionMatrix> relate(
88 const geom::Geometry* a,
89 const geom::Geometry* b,
90 const algorithm::BoundaryNodeRule& boundaryNodeRule);
91
100 const geom::Geometry* g1);
101
111 const geom::Geometry* g1,
112 const algorithm::BoundaryNodeRule& boundaryNodeRule);
113
114 ~RelateOp() override = default;
115
124 std::unique_ptr<geom::IntersectionMatrix> getIntersectionMatrix();
125
126private:
127
128 RelateComputer relateComp;
129};
130
131
132} // namespace geos:operation:relate
133} // namespace geos:operation
134} // namespace geos
An interface for rules which determine whether node points which are in boundaries of lineal geometry...
Definition BoundaryNodeRule.h:52
Basic implementation of Geometry, constructed and destructed by GeometryFactory.
Definition Geometry.h:197
The base class for operations that require GeometryGraph.
Definition GeometryGraphOperation.h:51
Computes the topological relationship between two Geometries.
Definition RelateComputer.h:77
Implements the SFS relate() operation on two geom::Geometry objects.
Definition RelateOp.h:56
static std::unique_ptr< geom::IntersectionMatrix > relate(const geom::Geometry *a, const geom::Geometry *b)
Computes the geom::IntersectionMatrix for the spatial relationship between two geom::Geometry objects...
RelateOp(const geom::Geometry *g0, const geom::Geometry *g1, const algorithm::BoundaryNodeRule &boundaryNodeRule)
Creates a new Relate operation with a specified Boundary Node Rule.
RelateOp(const geom::Geometry *g0, const geom::Geometry *g1)
Creates a new Relate operation, using the default (OGC SFS) Boundary Node Rule.
static std::unique_ptr< geom::IntersectionMatrix > relate(const geom::Geometry *a, const geom::Geometry *b, const algorithm::BoundaryNodeRule &boundaryNodeRule)
Computes the geom::IntersectionMatrix for the spatial relationship between two geom::Geometry objects...
std::unique_ptr< geom::IntersectionMatrix > getIntersectionMatrix()
Gets the IntersectionMatrix for the spatial relationship between the input geometries.
Basic namespace for all GEOS functionalities.
Definition geos.h:39