GEOS  3.13.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
28 namespace geos {
29 namespace algorithm {
30 class BoundaryNodeRule;
31 }
32 namespace geom {
33 class Geometry;
34 }
35 }
36 
37 
38 namespace geos {
39 namespace operation { // geos::operation
40 namespace relate { // geos::operation::relate
41 
56 class GEOS_DLL RelateOp: public GeometryGraphOperation {
57 
58 public:
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 
126 private:
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:50
Basic implementation of Geometry, constructed and destructed by GeometryFactory.
Definition: Geometry.h:186
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
RelateOp(const geom::Geometry *g0, const geom::Geometry *g1, const algorithm::BoundaryNodeRule &boundaryNodeRule)
Creates a new Relate operation with a specified Boundary Node Rule.
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)
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: Angle.h:25