GEOS  3.9.1dev
InputGeometry.h
Go to the documentation of this file.
1 /**********************************************************************
2  *
3  * GEOS - Geometry Engine Open Source
4  * http://geos.osgeo.org
5  *
6  * Copyright (C) 2020 Paul Ramsey <pramsey@cleverelephant.ca>
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 #pragma once
16 
19 #include <geos/geom/Coordinate.h>
20 #include <geos/geom/Envelope.h>
21 #include <geos/geom/Geometry.h>
22 #include <geos/geom/Location.h>
23 #include <geos/export.h>
24 
25 #include <array>
26 
27 namespace geos { // geos.
28 namespace operation { // geos.operation
29 namespace overlayng { // geos.operation.overlayng
30 
31 
41 using namespace geos::algorithm::locate;
42 using namespace geos::geom;
43 
45 
46 private:
47 
48  // Members
49  std::array<const Geometry*, 2> geom;
50  std::unique_ptr<PointOnGeometryLocator> ptLocatorA;
51  std::unique_ptr<PointOnGeometryLocator> ptLocatorB;
52  std::array<bool, 2> isCollapsed;
53 
54 
55 
56 public:
57 
58  InputGeometry(const Geometry* geomA, const Geometry* geomB);
59 
60  bool isSingle() const;
61  int getDimension(int index) const;
62  const Geometry* getGeometry(int geomIndex) const;
63  const Envelope* getEnvelope(int geomIndex) const;
64  bool isEmpty(int geomIndex) const;
65  bool isArea(int geomIndex) const;
66  int getAreaIndex() const;
67  bool isLine(int geomIndex) const;
68  bool isAllPoints() const;
69  bool hasPoints() const;
70 
78  bool hasEdges(int geomIndex) const;
79 
91  Location locatePointInArea(int geomIndex, const Coordinate& pt);
92 
93  PointOnGeometryLocator* getLocator(int geomIndex);
94  void setCollapsed(int geomIndex, bool isGeomCollapsed);
95 
96 
97 };
98 
99 
100 } // namespace geos.operation.overlayng
101 } // namespace geos.operation
102 } // namespace geos
103 
std::unique_ptr< PointOnGeometryLocator > ptLocatorA
Definition: InputGeometry.h:50
An Envelope defines a rectangulare region of the 2D coordinate plane.
Definition: Envelope.h:58
#define GEOS_DLL
Definition: export.h:28
Coordinate is the lightweight class used to store coordinates.
Definition: Coordinate.h:60
std::array< const Geometry *, 2 > geom
Definition: InputGeometry.h:49
An interface for classes which determine the Location of points in Polygon or MultiPolygon geometries...
Basic implementation of Geometry, constructed and destructed by GeometryFactory.
Definition: Geometry.h:188
Location
Constants representing the location of a point relative to a geometry.
Definition: Location.h:34
Basic namespace for all GEOS functionalities.
std::unique_ptr< PointOnGeometryLocator > ptLocatorB
Definition: InputGeometry.h:51
Classes which determine the Location of points in geometries.