From f9a3fe7ab8a9254cba38da5bed6d13edcab3e3be Mon Sep 17 00:00:00 2001 From: pramsey Date: Thu, 7 Nov 2024 19:06:36 +0000 Subject: [PATCH] =?UTF-8?q?Deploying=20to=20gh-pages=20from=20@=20libgeos/?= =?UTF-8?q?geos@d7102075476d7034359ac80df9d6612e1e600359=20=F0=9F=9A=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- doxygen/AdjacentEdgeLocator_8h_source.html | 132 +- doxygen/BasicPredicate_8h_source.html | 84 +- doxygen/BasicPreparedGeometry_8h_source.html | 17 +- doxygen/BoundaryChainNoder_8h_source.html | 239 ++-- doxygen/BufferBuilder_8h_source.html | 2 +- doxygen/BufferCurveSetBuilder_8h_source.html | 191 +-- doxygen/CGAlgorithmsDD_8h_source.html | 203 ++- doxygen/ComponentJumpChecker_8h_source.html | 137 +- doxygen/ConcaveHullOfPolygons_8h_source.html | 323 +++-- doxygen/ConcaveHull_8h_source.html | 220 ++- ...trainedDelaunayTriangulator_8h_source.html | 99 +- doxygen/Corner_8h_source.html | 193 ++- ...verageBoundarySegmentFinder_8h_source.html | 96 +- doxygen/CoverageEdge_8h_source.html | 47 +- doxygen/CoverageGapFinder_8h_source.html | 22 +- .../CoveragePolygonValidator_8h_source.html | 408 +++--- doxygen/CoveragePolygon_8h_source.html | 63 +- doxygen/CoverageRingEdges_8h_source.html | 229 ++-- doxygen/CoverageRing_8h_source.html | 173 ++- doxygen/CoverageSimplifier_8h_source.html | 122 +- doxygen/CoverageValidator_8h_source.html | 18 +- doxygen/DimensionLocation_8h_source.html | 73 +- doxygen/EdgeKey_8h_source.html | 161 ++- doxygen/EdgeNodingBuilder_8h_source.html | 207 +-- doxygen/EdgeSegmentIntersector_8h_source.html | 72 +- .../EdgeSegmentOverlapAction_8h_source.html | 62 +- doxygen/HullTri_8h_source.html | 50 +- doxygen/HullTriangulation_8h_source.html | 172 ++- doxygen/IMPatternMatcher_8h_source.html | 90 +- doxygen/IMPredicate_8h_source.html | 116 +- doxygen/IndexedDistanceToPoint_8h_source.html | 59 +- .../IndexedNestedHoleTester_8h_source.html | 58 +- .../IndexedNestedPolygonTester_8h_source.html | 16 +- ...dexedPointInPolygonsLocator_8h_source.html | 26 +- doxygen/InputGeometry_8h_source.html | 87 +- .../IntersectionPointBuilder_8h_source.html | 8 +- doxygen/InvalidSegmentDetector_8h_source.html | 128 +- doxygen/IsValidOp_8h_source.html | 195 +-- doxygen/Label_8h_source.html | 404 +++--- doxygen/LargestEmptyCircle_8h_source.html | 248 ++-- doxygen/LineBuilder_8h_source.html | 11 +- doxygen/LineLimiter_8h_source.html | 90 +- doxygen/LineStringExtracter_8h_source.html | 64 +- doxygen/LinearBoundary_8h_source.html | 102 +- doxygen/LinkedLine_8h_source.html | 86 +- doxygen/LinkedRing_8h_source.html | 28 +- doxygen/MaximumInscribedCircle_8h_source.html | 233 ++-- doxygen/MinimumAreaRectangle_8h_source.html | 146 +- doxygen/NodeSection_8h_source.html | 217 ++- doxygen/NodeSections_8h_source.html | 103 +- doxygen/OffsetCurveBuilder_8h_source.html | 22 +- doxygen/OffsetCurveSection_8h_source.html | 123 +- doxygen/OffsetCurve_8h_source.html | 306 +++-- doxygen/OuterShellsExtracter_8h_source.html | 78 +- doxygen/OverlayEdgeRing_8h_source.html | 119 +- doxygen/OverlayEdge_8h_source.html | 453 ++++--- doxygen/OverlayGraph_8h_source.html | 13 +- doxygen/OverlayLabel_8h_source.html | 539 ++++---- doxygen/OverlayLabeller_8h_source.html | 3 +- doxygen/OverlayMixedPoints_8h_source.html | 135 +- doxygen/OverlayNGRobust_8h_source.html | 143 +- doxygen/OverlayNG_8h_source.html | 254 ++-- doxygen/OverlayPoints_8h_source.html | 117 +- doxygen/OverlayUtil_8h_source.html | 169 +-- doxygen/PolygonEarClipper_8h_source.html | 175 +-- doxygen/PolygonHoleJoiner_8h_source.html | 222 ++- doxygen/PolygonHullSimplifier_8h_source.html | 179 ++- ...PolygonIntersectionAnalyzer_8h_source.html | 159 ++- doxygen/PolygonNodeConverter_8h_source.html | 75 +- doxygen/PolygonNodeTopology_8h_source.html | 106 +- doxygen/PolygonNoder_8h_source.html | 144 +- doxygen/PolygonRingSelfNode_8h_source.html | 77 +- doxygen/PolygonRingTouch_8h_source.html | 55 +- doxygen/PolygonRing_8h_source.html | 182 ++- .../PolygonTopologyAnalyzer_8h_source.html | 13 +- doxygen/PolygonTriangulator_8h_source.html | 93 +- doxygen/PrecisionReducer_8h_source.html | 9 +- doxygen/PrecisionUtil_8h_source.html | 147 +- ...aredLineStringNearestPoints_8h_source.html | 3 +- doxygen/PreparedLineString_8h_source.html | 2 +- doxygen/PreparedPoint_8h_source.html | 2 +- doxygen/PreparedPolygon_8h_source.html | 4 +- doxygen/RelateEdge_8h_source.html | 238 ++-- doxygen/RelateGeometry_8h_source.html | 311 ++--- doxygen/RelateMatrixPredicate_8h_source.html | 91 +- doxygen/RelateNG_8h_source.html | 220 +-- doxygen/RelatePointLocator_8h_source.html | 222 ++- doxygen/RelatePredicate_8h_source.html | 1197 ++++++++--------- doxygen/RelateSegmentString_8h_source.html | 181 ++- doxygen/RingClipper_8h_source.html | 92 +- doxygen/RingHullIndex_8h_source.html | 2 +- doxygen/RingHull_8h_source.html | 285 ++-- .../RobustClipEnvelopeComputer_8h_source.html | 63 +- doxygen/SegmentMCIndex_8h_source.html | 54 +- doxygen/TPVWSimplifier_8h_source.html | 224 ++- .../TaggedLineStringSimplifier_8h_source.html | 168 ++- doxygen/TaggedLineString_8h_source.html | 189 ++- doxygen/TopologyComputer_8h_source.html | 227 ++-- doxygen/TopologyLocation_8h_source.html | 323 +++-- doxygen/TopologyPredicate_8h_source.html | 133 +- doxygen/TriDelaunayImprover_8h_source.html | 99 +- doxygen/TriEdge_8h_source.html | 81 +- doxygen/TriList_8h_source.html | 281 ++-- doxygen/Tri_8h_source.html | 30 +- doxygen/TriangulationBuilder_8h_source.html | 73 +- doxygen/UnaryUnionNG_8h_source.html | 86 +- doxygen/VertexRingCounter_8h_source.html | 81 +- .../VertexSequencePackedRtree_8h_source.html | 134 +- doxygen/algorithm_2Rectangle_8h_source.html | 71 +- doxygen/annotated.html | 37 +- doxygen/classes.html | 2 +- ...ruct_1_1IndexedPointInPolygonsLocator.html | 4 +- ...geos_1_1geomgraph_1_1TopologyLocation.html | 34 +- ...dex_1_1strtree_1_1TemplateSTRtreeImpl.html | 2 +- ...1_1overlayng_1_1InputGeometry-members.html | 74 + ...eration_1_1overlayng_1_1InputGeometry.html | 179 +++ ...operation_1_1overlayng_1_1LineBuilder.html | 2 +- ...peration_1_1overlayng_1_1OverlayLabel.html | 2 - ...operation_1_1overlayng_1_1OverlayUtil.html | 4 +- .../coverage_2CoverageUnion_8h_source.html | 43 +- doxygen/functions_func_h.html | 3 + doxygen/functions_func_l.html | 5 +- doxygen/functions_h.html | 3 + doxygen/functions_l.html | 3 + doxygen/hierarchy.html | 445 +++--- doxygen/namespaces.html | 37 +- ...n_2overlayng_2CoverageUnion_8h_source.html | 55 +- .../operation_2overlayng_2Edge_8h_source.html | 519 ++++--- ...elateng_2EdgeSetIntersector_8h_source.html | 98 +- ...ation_2union_2CoverageUnion_8h_source.html | 42 +- .../overlayng_2MaximalEdgeRing_8h_source.html | 115 +- doxygen/relateng_2RelateNode_8h_source.html | 145 +- 132 files changed, 8817 insertions(+), 8643 deletions(-) create mode 100644 doxygen/classgeos_1_1operation_1_1overlayng_1_1InputGeometry-members.html create mode 100644 doxygen/classgeos_1_1operation_1_1overlayng_1_1InputGeometry.html diff --git a/doxygen/AdjacentEdgeLocator_8h_source.html b/doxygen/AdjacentEdgeLocator_8h_source.html index 5d896f4198..619b2865b8 100644 --- a/doxygen/AdjacentEdgeLocator_8h_source.html +++ b/doxygen/AdjacentEdgeLocator_8h_source.html @@ -79,87 +79,83 @@
30 }
31 namespace geom {
32  class CoordinateXY;
-
33  class Geometry;
-
34  class LinearRing;
-
35  class Polygon;
+
33  class Geometry;
+
34  class LinearRing;
+
35  class Polygon;
36 }
37 }
38 
-
39 
-
40 using geos::geom::CoordinateXY;
-
41 using geos::geom::CoordinateSequence;
-
42 using geos::geom::Geometry;
-
43 using geos::geom::LinearRing;
-
44 using geos::geom::Polygon;
-
45 using geos::geom::Location;
-
46 
-
47 
-
48 
-
49 namespace geos { // geos.
-
50 namespace operation { // geos.operation
-
51 namespace relateng { // geos.operation.relateng
-
52 
-
67 class GEOS_DLL AdjacentEdgeLocator {
-
68 
-
69 public:
-
70 
-
71  AdjacentEdgeLocator(const Geometry* geom)
-
72  {
-
73  init(geom);
-
74  }
-
75 
-
76  Location locate(const CoordinateXY* p);
-
77 
-
82  AdjacentEdgeLocator(const AdjacentEdgeLocator&) = delete;
-
83  AdjacentEdgeLocator& operator=(const AdjacentEdgeLocator&) = delete;
-
84 
+
39 namespace geos { // geos.
+
40 namespace operation { // geos.operation
+
41 namespace relateng { // geos.operation.relateng
+
42 
+
57 class GEOS_DLL AdjacentEdgeLocator {
+
58  using CoordinateXY = geos::geom::CoordinateXY;
+
59  using CoordinateSequence = geos::geom::CoordinateSequence;
+
60  using Geometry = geos::geom::Geometry;
+
61  using LinearRing = geos::geom::LinearRing;
+
62  using Polygon = geos::geom::Polygon;
+
63  using Location = geos::geom::Location;
+
64 
+
65 public:
+
66 
+
67  AdjacentEdgeLocator(const Geometry* geom)
+
68  {
+
69  init(geom);
+
70  }
+
71 
+
72  Location locate(const CoordinateXY* p);
+
73 
+
78  AdjacentEdgeLocator(const AdjacentEdgeLocator&) = delete;
+
79  AdjacentEdgeLocator& operator=(const AdjacentEdgeLocator&) = delete;
+
80 
+
81 
+
82 private:
+
83 
+
84  // Members
85 
-
86 private:
+
86  std::vector<const CoordinateSequence*> ringList;
87 
-
88  // Members
-
89 
-
90  std::vector<const CoordinateSequence*> ringList;
-
91 
-
92  /*
-
93  * When we have to reorient rings, we end up allocating new
-
94  * rings, since we cannot reorient the rings of the input
-
95  * geometry, so this is where we store those "local" rings.
-
96  */
-
97  std::vector<std::unique_ptr<CoordinateSequence>> localRingList;
-
98 
-
99 
-
100  // Methods
-
101 
-
102  void addSections(
-
103  const CoordinateXY* p,
-
104  const CoordinateSequence* ring,
-
105  NodeSections& sections);
-
106 
-
107  NodeSection* createSection(
-
108  const CoordinateXY* p,
-
109  const CoordinateXY* prev,
-
110  const CoordinateXY* next);
+
88  /*
+
89  * When we have to reorient rings, we end up allocating new
+
90  * rings, since we cannot reorient the rings of the input
+
91  * geometry, so this is where we store those "local" rings.
+
92  */
+
93  std::vector<std::unique_ptr<CoordinateSequence>> localRingList;
+
94 
+
95 
+
96  // Methods
+
97 
+
98  void addSections(
+
99  const CoordinateXY* p,
+
100  const CoordinateSequence* ring,
+
101  NodeSections& sections);
+
102 
+
103  NodeSection* createSection(
+
104  const CoordinateXY* p,
+
105  const CoordinateXY* prev,
+
106  const CoordinateXY* next);
+
107 
+
108  void init(const Geometry* geom);
+
109 
+
110  void addRings(const Geometry* geom);
111 
-
112  void init(const Geometry* geom);
+
112  void addRing(const LinearRing* ring, bool requireCW);
113 
-
114  void addRings(const Geometry* geom);
-
115 
-
116  void addRing(const LinearRing* ring, bool requireCW);
-
117 
-
118 
-
119 };
+
114 
+
115 };
+
116 
+
117 } // namespace geos.operation.relateng
+
118 } // namespace geos.operation
+
119 } // namespace geos
120 
-
121 } // namespace geos.operation.relateng
-
122 } // namespace geos.operation
-
123 } // namespace geos
-
124 
The internal representation of a list of coordinates inside a Geometry.
Definition: CoordinateSequence.h:56
Basic implementation of Geometry, constructed and destructed by GeometryFactory.
Definition: Geometry.h:197
Models an OGC SFS LinearRing. A LinearRing is a LineString which is both closed and simple.
Definition: LinearRing.h:54
Represents a linear polygon, which may include holes.
Definition: Polygon.h:61
-
Definition: AdjacentEdgeLocator.h:67
+
Definition: AdjacentEdgeLocator.h:57
AdjacentEdgeLocator(const AdjacentEdgeLocator &)=delete
-
Definition: NodeSection.h:55
+
Definition: NodeSection.h:50
Location
Constants representing the location of a point relative to a geometry.
Definition: Location.h:32
Basic namespace for all GEOS functionalities.
Definition: Angle.h:25
diff --git a/doxygen/BasicPredicate_8h_source.html b/doxygen/BasicPredicate_8h_source.html index cd90877d36..59c41b1ccb 100644 --- a/doxygen/BasicPredicate_8h_source.html +++ b/doxygen/BasicPredicate_8h_source.html @@ -74,70 +74,68 @@
25 // Forward declarations
26 namespace geos {
27 namespace geom {
-
28  class Envelope;
+
28  class Envelope;
29 }
30 }
31 
-
32 
-
33 using geos::geom::Envelope;
-
34 using geos::geom::Location;
+
32 namespace geos { // geos.
+
33 namespace operation { // geos.operation.
+
34 namespace relateng { // geos.operation.relateng
35 
36 
-
37 namespace geos { // geos.
-
38 namespace operation { // geos.operation.
-
39 namespace relateng { // geos.operation.relateng
-
40 
+
37 class GEOS_DLL BasicPredicate : public TopologyPredicate {
+
38 protected:
+
39  using Envelope = geos::geom::Envelope;
+
40  using Location = geos::geom::Location;
41 
-
42 class GEOS_DLL BasicPredicate : public TopologyPredicate {
+
42 private:
43 
-
44 private:
-
45 
-
46  static constexpr int UNKNOWN = -1;
-
47  static constexpr int FALSE = 0;
-
48  static constexpr int TRUE = 1;
+
44  static constexpr int UNKNOWN = -1;
+
45  static constexpr int FALSE = 0;
+
46  static constexpr int TRUE = 1;
+
47 
+
48  int m_value = UNKNOWN;
49 
-
50  int m_value = UNKNOWN;
+
50  static bool isKnown(int val);
51 
-
52  static bool isKnown(int val);
+
52  static bool toBoolean(int val);
53 
-
54  static bool toBoolean(int val);
+
54  static int toValue(bool val);
55 
-
56  static int toValue(bool val);
-
57 
+
56 
+
57 protected:
58 
-
59 protected:
-
60 
-
67  void setValue(bool val);
+
65  void setValue(bool val);
+
66 
+
67  void setValue(int val);
68 
-
69  void setValue(int val);
+
69  void setValueIf(bool val, bool cond);
70 
-
71  void setValueIf(bool val, bool cond);
+
71  void require(bool cond);
72 
-
73  void require(bool cond);
-
74 
-
75  using TopologyPredicate::requireCovers;
-
76  void requireCovers(const Envelope& a, const Envelope& b);
-
77 
+
73  using TopologyPredicate::requireCovers;
+
74  void requireCovers(const Envelope& a, const Envelope& b);
+
75 
+
76 
+
77 public:
78 
-
79 public:
-
80 
-
89  static bool isIntersection(Location locA, Location locB);
+
87  static bool isIntersection(Location locA, Location locB);
+
88 
+
89  std::string name() const override = 0;
90 
-
91  std::string name() const override = 0;
+
91  void finish() override = 0;
92 
-
93  void finish() override = 0;
+
93  bool isKnown() const override;
94 
-
95  bool isKnown() const override;
+
95  bool value() const override;
96 
-
97  bool value() const override;
-
98 
+
97 
+
98 };
99 
-
100 };
-
101 
-
102 } // namespace geos.operation.relateng
-
103 } // namespace geos.operation
-
104 } // namespace geos
-
105 
+
100 } // namespace geos.operation.relateng
+
101 } // namespace geos.operation
+
102 } // namespace geos
+
103 
An Envelope defines a rectangulare region of the 2D coordinate plane.
Definition: Envelope.h:59
Location
Constants representing the location of a point relative to a geometry.
Definition: Location.h:32
Basic namespace for all GEOS functionalities.
Definition: Angle.h:25
diff --git a/doxygen/BasicPreparedGeometry_8h_source.html b/doxygen/BasicPreparedGeometry_8h_source.html index 1cc8050f7f..d8adf30bb1 100644 --- a/doxygen/BasicPreparedGeometry_8h_source.html +++ b/doxygen/BasicPreparedGeometry_8h_source.html @@ -77,8 +77,8 @@
28 
29 namespace geos {
30 namespace geom {
-
31 class Geometry;
-
32 class Coordinate;
+
31 class Geometry;
+
32 class Coordinate;
33 }
34 }
35 
@@ -87,11 +87,11 @@
38 namespace geom { // geos::geom
39 namespace prep { // geos::geom::prep
40 
-
41 using geos::operation::relateng::RelateNG;
+
41 // * \class BasicPreparedGeometry
42 
-
43 // * \class BasicPreparedGeometry
-
44 
-
58 class BasicPreparedGeometry: public PreparedGeometry {
+
56 class BasicPreparedGeometry: public PreparedGeometry {
+
57  using RelateNG = geos::operation::relateng::RelateNG;
+
58 
59 private:
60  const geom::Geometry* baseGeom;
61  std::vector<const CoordinateXY*> representativePts;
@@ -169,9 +169,8 @@
212 } // namespace geos::geom
213 } // namespace geos
214 
-
Coordinate is the lightweight class used to store coordinates.
Definition: Coordinate.h:217
Basic implementation of Geometry, constructed and destructed by GeometryFactory.
Definition: Geometry.h:197
-
A base class for PreparedGeometry subclasses.
Definition: BasicPreparedGeometry.h:58
+
A base class for PreparedGeometry subclasses.
Definition: BasicPreparedGeometry.h:56
const geom::Geometry & getGeometry() const override
Gets the original Geometry which has been prepared.
Definition: BasicPreparedGeometry.h:103
bool covers(const geom::Geometry *g) const override
bool envelopeCovers(const geom::Geometry *g) const
@@ -194,7 +193,7 @@
bool disjoint(const geom::Geometry *g) const override
bool containsProperly(const geom::Geometry *g) const override
An interface for classes which prepare Geometrys in order to optimize the performance of repeated cal...
Definition: PreparedGeometry.h:58
-
Definition: RelateNG.h:93
+
Definition: RelateNG.h:86
static std::unique_ptr< RelateNG > prepare(const Geometry *a)
Basic namespace for all GEOS functionalities.
Definition: Angle.h:25
diff --git a/doxygen/BoundaryChainNoder_8h_source.html b/doxygen/BoundaryChainNoder_8h_source.html index 7ae128f9c9..6783804e6c 100644 --- a/doxygen/BoundaryChainNoder_8h_source.html +++ b/doxygen/BoundaryChainNoder_8h_source.html @@ -73,136 +73,135 @@
24 namespace geos {
25 namespace geom {
26 class CoordinateSequence;
-
27 class Coordinate;
+
27 class Coordinate;
28 }
29 namespace noding {
30 class NodedSegmentString;
31 }
32 }
33 
-
34 using geos::geom::Coordinate;
-
35 
-
36 namespace geos { // geos
-
37 namespace noding { // geos::noding
-
38 
-
57 class GEOS_DLL BoundaryChainNoder : public Noder {
-
58 
-
59 private:
-
60 
-
61  class BoundarySegmentMap {
-
62 
-
63  private:
-
64 
-
65  // Members
-
66  SegmentString* segString;
-
67  std::vector<bool> isBoundary;
-
68 
-
69  static SegmentString* createChain(
-
70  const SegmentString* segString,
-
71  std::size_t startIndex,
-
72  std::size_t endIndex,
-
73  bool constructZ,
-
74  bool constructM);
-
75 
-
76  std::size_t findChainStart(std::size_t index) const;
-
77  std::size_t findChainEnd(std::size_t index) const;
-
78 
-
79  public:
-
80 
-
81  BoundarySegmentMap(SegmentString* ss)
-
82  : segString(ss) {
-
83  isBoundary.resize(ss->size()-1, false);
-
84  };
-
85 
-
86  void setBoundarySegment(std::size_t index);
-
87  void createChains(std::vector<SegmentString*>& chainList, bool constructZ, bool constructM);
-
88  };
-
89 
-
90  class Segment {
-
91  public:
-
92  Segment(const geom::CoordinateSequence& seq,
-
93  BoundarySegmentMap& segMap,
-
94  std::size_t index)
-
95  : m_seq(seq)
-
96  , m_segMap(segMap)
-
97  , m_index(index)
-
98  , m_flip(seq.getAt<geom::CoordinateXY>(index).compareTo(seq.getAt<geom::CoordinateXY>(index + 1)) < 0)
-
99  {}
-
100 
-
101  const geom::CoordinateXY& p0() const {
-
102  return m_seq.getAt<geom::CoordinateXY>(m_flip ? m_index : m_index + 1);
-
103  }
-
104 
-
105  const geom::CoordinateXY& p1() const {
-
106  return m_seq.getAt<geom::CoordinateXY>(m_flip ? m_index + 1 : m_index);
-
107  }
-
108 
-
109  void markInBoundary() const {
-
110  m_segMap.setBoundarySegment(m_index);
-
111  };
-
112 
-
113  bool operator==(const Segment& other) const {
-
114  return p0().equals2D(other.p0()) && p1().equals2D(other.p1());
-
115  }
-
116 
-
117  struct HashCode {
-
118  std::size_t operator()(const Segment& s) const {
-
119  std::size_t h = std::hash<double>{}(s.p0().x);
-
120  h ^= (std::hash<double>{}(s.p0().y) << 1);
-
121  h ^= (std::hash<double>{}(s.p1().x) << 1);
-
122  h ^= (std::hash<double>{}(s.p1().y) << 1);
-
123  return h;
-
124  }
-
125  };
-
126 
-
127  private:
-
128  const geom::CoordinateSequence& m_seq;
-
129  BoundarySegmentMap& m_segMap;
-
130  std::size_t m_index;
-
131  bool m_flip;
-
132  };
-
133 
-
134 public:
-
135  using SegmentSet = std::unordered_set<Segment, Segment::HashCode>;
-
136 
-
137  BoundaryChainNoder() : chainList(nullptr), m_constructZ(false), m_constructM(false) {};
-
138 
-
139  // Noder virtual methods
-
140  std::vector<SegmentString*>* getNodedSubstrings() const override;
-
141  void computeNodes(std::vector<SegmentString*>* inputSegStrings) override;
+
34 namespace geos { // geos
+
35 namespace noding { // geos::noding
+
36 
+
55 class GEOS_DLL BoundaryChainNoder : public Noder {
+
56  using Coordinate = geos::geom::Coordinate;
+
57 
+
58 private:
+
59 
+
60  class BoundarySegmentMap {
+
61 
+
62  private:
+
63 
+
64  // Members
+
65  SegmentString* segString;
+
66  std::vector<bool> isBoundary;
+
67 
+
68  static SegmentString* createChain(
+
69  const SegmentString* segString,
+
70  std::size_t startIndex,
+
71  std::size_t endIndex,
+
72  bool constructZ,
+
73  bool constructM);
+
74 
+
75  std::size_t findChainStart(std::size_t index) const;
+
76  std::size_t findChainEnd(std::size_t index) const;
+
77 
+
78  public:
+
79 
+
80  BoundarySegmentMap(SegmentString* ss)
+
81  : segString(ss) {
+
82  isBoundary.resize(ss->size()-1, false);
+
83  };
+
84 
+
85  void setBoundarySegment(std::size_t index);
+
86  void createChains(std::vector<SegmentString*>& chainList, bool constructZ, bool constructM);
+
87  };
+
88 
+
89  class Segment {
+
90  public:
+
91  Segment(const geom::CoordinateSequence& seq,
+
92  BoundarySegmentMap& segMap,
+
93  std::size_t index)
+
94  : m_seq(seq)
+
95  , m_segMap(segMap)
+
96  , m_index(index)
+
97  , m_flip(seq.getAt<geom::CoordinateXY>(index).compareTo(seq.getAt<geom::CoordinateXY>(index + 1)) < 0)
+
98  {}
+
99 
+
100  const geom::CoordinateXY& p0() const {
+
101  return m_seq.getAt<geom::CoordinateXY>(m_flip ? m_index : m_index + 1);
+
102  }
+
103 
+
104  const geom::CoordinateXY& p1() const {
+
105  return m_seq.getAt<geom::CoordinateXY>(m_flip ? m_index + 1 : m_index);
+
106  }
+
107 
+
108  void markInBoundary() const {
+
109  m_segMap.setBoundarySegment(m_index);
+
110  };
+
111 
+
112  bool operator==(const Segment& other) const {
+
113  return p0().equals2D(other.p0()) && p1().equals2D(other.p1());
+
114  }
+
115 
+
116  struct HashCode {
+
117  std::size_t operator()(const Segment& s) const {
+
118  std::size_t h = std::hash<double>{}(s.p0().x);
+
119  h ^= (std::hash<double>{}(s.p0().y) << 1);
+
120  h ^= (std::hash<double>{}(s.p1().x) << 1);
+
121  h ^= (std::hash<double>{}(s.p1().y) << 1);
+
122  return h;
+
123  }
+
124  };
+
125 
+
126  private:
+
127  const geom::CoordinateSequence& m_seq;
+
128  BoundarySegmentMap& m_segMap;
+
129  std::size_t m_index;
+
130  bool m_flip;
+
131  };
+
132 
+
133 public:
+
134  using SegmentSet = std::unordered_set<Segment, Segment::HashCode>;
+
135 
+
136  BoundaryChainNoder() : chainList(nullptr), m_constructZ(false), m_constructM(false) {};
+
137 
+
138  // Noder virtual methods
+
139  std::vector<SegmentString*>* getNodedSubstrings() const override;
+
140  void computeNodes(std::vector<SegmentString*>* inputSegStrings) override;
+
141 
142 
-
143 
-
144 private:
-
145 
-
146  // Members
-
147  std::vector<SegmentString*>* chainList;
-
148  bool m_constructZ;
-
149  bool m_constructM;
-
150 
-
151  // Methods
-
152  void addSegments(std::vector<SegmentString*>* segStrings,
-
153  SegmentSet& segSet,
-
154  std::vector<BoundarySegmentMap>& includedSegs);
-
155 
-
156  static void addSegments(SegmentString* segString,
-
157  BoundarySegmentMap& segInclude,
-
158  SegmentSet& segSet);
-
159 
-
160  static void markBoundarySegments(SegmentSet& segSet);
-
161 
-
162  std::vector<SegmentString*>* extractChains(std::vector<BoundarySegmentMap>& sections) const;
-
163 
-
164  static bool segSetContains(SegmentSet& segSet, Segment& seg);
-
165 
-
166 };
-
167 
-
168 } // namespace geos::noding
-
169 } // namespace geos
+
143 private:
+
144 
+
145  // Members
+
146  std::vector<SegmentString*>* chainList;
+
147  bool m_constructZ;
+
148  bool m_constructM;
+
149 
+
150  // Methods
+
151  void addSegments(std::vector<SegmentString*>* segStrings,
+
152  SegmentSet& segSet,
+
153  std::vector<BoundarySegmentMap>& includedSegs);
+
154 
+
155  static void addSegments(SegmentString* segString,
+
156  BoundarySegmentMap& segInclude,
+
157  SegmentSet& segSet);
+
158 
+
159  static void markBoundarySegments(SegmentSet& segSet);
+
160 
+
161  std::vector<SegmentString*>* extractChains(std::vector<BoundarySegmentMap>& sections) const;
+
162 
+
163  static bool segSetContains(SegmentSet& segSet, Segment& seg);
+
164 
+
165 };
+
166 
+
167 } // namespace geos::noding
+
168 } // namespace geos
+
169 
170 
-
171 
The internal representation of a list of coordinates inside a Geometry.
Definition: CoordinateSequence.h:56
Coordinate is the lightweight class used to store coordinates.
Definition: Coordinate.h:217
-
Definition: BoundaryChainNoder.h:57
+
Definition: BoundaryChainNoder.h:55
std::vector< SegmentString * > * getNodedSubstrings() const override
Returns a collection of fully noded SegmentStrings. The SegmentStrings have the same context as their...
void computeNodes(std::vector< SegmentString * > *inputSegStrings) override
Computes the noding for a collection of SegmentStrings.
Computes all intersections between segments in a set of SegmentString.
Definition: Noder.h:46
diff --git a/doxygen/BufferBuilder_8h_source.html b/doxygen/BufferBuilder_8h_source.html index 6d3e21709e..66e9f62cab 100644 --- a/doxygen/BufferBuilder_8h_source.html +++ b/doxygen/BufferBuilder_8h_source.html @@ -85,7 +85,7 @@
36 // Forward declarations
37 namespace geos {
38 namespace geom {
-
39 class PrecisionModel;
+
39 class PrecisionModel;
40 class Geometry;
41 class GeometryFactory;
42 }
diff --git a/doxygen/BufferCurveSetBuilder_8h_source.html b/doxygen/BufferCurveSetBuilder_8h_source.html index f5eb698f38..6465e4d048 100644 --- a/doxygen/BufferCurveSetBuilder_8h_source.html +++ b/doxygen/BufferCurveSetBuilder_8h_source.html @@ -83,8 +83,8 @@
34 namespace geos {
35 namespace geom {
36 class Geometry;
-
37 class CoordinateSequence;
-
38 class PrecisionModel;
+
37 class CoordinateSequence;
+
38 class PrecisionModel;
39 class GeometryCollection;
40 class Point;
41 class LineString;
@@ -109,96 +109,97 @@
60 namespace buffer { // geos.operation.buffer
61 
72 class GEOS_DLL BufferCurveSetBuilder {
-
73 
-
74 private:
-
75 
-
76  static constexpr int MAX_INVERTED_RING_SIZE = 9;
-
77  static constexpr int INVERTED_CURVE_VERTEX_FACTOR = 4;
-
78  static constexpr double NEARNESS_FACTOR = 0.99;
-
79 
-
80  // To keep track of newly-created Labels.
-
81  // Labels will be released by object dtor
-
82  std::vector<geomgraph::Label*> newLabels;
-
83  const geom::Geometry& inputGeom;
-
84  double distance;
-
85  OffsetCurveBuilder curveBuilder;
-
86 
-
90  std::vector<noding::SegmentString*> curveList;
-
91  bool isInvertOrientation = false;
-
92 
-
105  void addCurve(geom::CoordinateSequence* coord, geom::Location leftLoc,
-
106  geom::Location rightLoc);
-
107 
-
108  void add(const geom::Geometry& g);
-
109 
-
110  void addCollection(const geom::GeometryCollection* gc);
-
111 
-
115  void addPoint(const geom::Point* p);
-
116 
-
117  void addLineString(const geom::LineString* line);
-
118 
-
119  void addPolygon(const geom::Polygon* p);
-
120 
-
121  void addRingBothSides(const geom::CoordinateSequence* coord, double p_distance);
-
122 
-
141  void addRingSide(const geom::CoordinateSequence* coord,
-
142  double offsetDistance, int side, geom::Location cwLeftLoc,
-
143  geom::Location cwRightLoc);
-
144 
-
167  static bool isRingCurveInverted(
-
168  const geom::CoordinateSequence* inputPts, double dist,
-
169  const geom::CoordinateSequence* curvePts);
-
170 
-
182  static bool hasPointOnBuffer(
-
183  const CoordinateSequence* inputRing, double dist,
-
184  const CoordinateSequence* curveRing);
-
185 
-
195  bool isErodedCompletely(const geom::LinearRing* ringCoord,
-
196  double bufferDistance);
-
197 
-
216  bool isTriangleErodedCompletely(const geom::CoordinateSequence* triCoords,
-
217  double bufferDistance);
-
218 
-
219  // Declare type as noncopyable
-
220  BufferCurveSetBuilder(const BufferCurveSetBuilder& other) = delete;
-
221  BufferCurveSetBuilder& operator=(const BufferCurveSetBuilder& rhs) = delete;
-
222 
-
236  bool isRingCCW(const geom::CoordinateSequence* coords) const;
-
237 
-
238 public:
-
239 
-
241  BufferCurveSetBuilder(
-
242  const geom::Geometry& newInputGeom,
-
243  double newDistance,
-
244  const geom::PrecisionModel* newPm,
-
245  const BufferParameters& newBufParams)
-
246  : inputGeom(newInputGeom)
-
247  , distance(newDistance)
-
248  , curveBuilder(newPm, newBufParams)
-
249  , curveList()
-
250  , isInvertOrientation(false)
-
251  {};
-
252 
-
254  ~BufferCurveSetBuilder();
-
255 
-
264  std::vector<noding::SegmentString*>& getCurves();
-
265 
-
273  void addCurves(const std::vector<geom::CoordinateSequence*>& lineList,
-
274  geom::Location leftLoc, geom::Location rightLoc);
-
275 
-
284  void setInvertOrientation(bool p_isInvertOrientation) {
-
285  isInvertOrientation = p_isInvertOrientation;
-
286  }
-
287 
-
288 };
-
289 
-
290 } // namespace geos::operation::buffer
-
291 } // namespace geos::operation
-
292 } // namespace geos
-
293 
-
294 #ifdef _MSC_VER
-
295 #pragma warning(pop)
-
296 #endif
+
73  using CoordinateSequence = geos::geom::CoordinateSequence;
+
74 
+
75 private:
+
76 
+
77  static constexpr int MAX_INVERTED_RING_SIZE = 9;
+
78  static constexpr int INVERTED_CURVE_VERTEX_FACTOR = 4;
+
79  static constexpr double NEARNESS_FACTOR = 0.99;
+
80 
+
81  // To keep track of newly-created Labels.
+
82  // Labels will be released by object dtor
+
83  std::vector<geomgraph::Label*> newLabels;
+
84  const geom::Geometry& inputGeom;
+
85  double distance;
+
86  OffsetCurveBuilder curveBuilder;
+
87 
+
91  std::vector<noding::SegmentString*> curveList;
+
92  bool isInvertOrientation = false;
+
93 
+
106  void addCurve(geom::CoordinateSequence* coord, geom::Location leftLoc,
+
107  geom::Location rightLoc);
+
108 
+
109  void add(const geom::Geometry& g);
+
110 
+
111  void addCollection(const geom::GeometryCollection* gc);
+
112 
+
116  void addPoint(const geom::Point* p);
+
117 
+
118  void addLineString(const geom::LineString* line);
+
119 
+
120  void addPolygon(const geom::Polygon* p);
+
121 
+
122  void addRingBothSides(const geom::CoordinateSequence* coord, double p_distance);
+
123 
+
142  void addRingSide(const geom::CoordinateSequence* coord,
+
143  double offsetDistance, int side, geom::Location cwLeftLoc,
+
144  geom::Location cwRightLoc);
+
145 
+
168  static bool isRingCurveInverted(
+
169  const geom::CoordinateSequence* inputPts, double dist,
+
170  const geom::CoordinateSequence* curvePts);
+
171 
+
183  static bool hasPointOnBuffer(
+
184  const CoordinateSequence* inputRing, double dist,
+
185  const CoordinateSequence* curveRing);
+
186 
+
196  bool isErodedCompletely(const geom::LinearRing* ringCoord,
+
197  double bufferDistance);
+
198 
+
217  bool isTriangleErodedCompletely(const geom::CoordinateSequence* triCoords,
+
218  double bufferDistance);
+
219 
+
220  // Declare type as noncopyable
+
221  BufferCurveSetBuilder(const BufferCurveSetBuilder& other) = delete;
+
222  BufferCurveSetBuilder& operator=(const BufferCurveSetBuilder& rhs) = delete;
+
223 
+
237  bool isRingCCW(const geom::CoordinateSequence* coords) const;
+
238 
+
239 public:
+
240 
+
242  BufferCurveSetBuilder(
+
243  const geom::Geometry& newInputGeom,
+
244  double newDistance,
+
245  const geom::PrecisionModel* newPm,
+
246  const BufferParameters& newBufParams)
+
247  : inputGeom(newInputGeom)
+
248  , distance(newDistance)
+
249  , curveBuilder(newPm, newBufParams)
+
250  , curveList()
+
251  , isInvertOrientation(false)
+
252  {};
+
253 
+
255  ~BufferCurveSetBuilder();
+
256 
+
265  std::vector<noding::SegmentString*>& getCurves();
+
266 
+
274  void addCurves(const std::vector<geom::CoordinateSequence*>& lineList,
+
275  geom::Location leftLoc, geom::Location rightLoc);
+
276 
+
285  void setInvertOrientation(bool p_isInvertOrientation) {
+
286  isInvertOrientation = p_isInvertOrientation;
+
287  }
+
288 
+
289 };
+
290 
+
291 } // namespace geos::operation::buffer
+
292 } // namespace geos::operation
+
293 } // namespace geos
+
294 
+
295 #ifdef _MSC_VER
+
296 #pragma warning(pop)
+
297 #endif
The internal representation of a list of coordinates inside a Geometry.
Definition: CoordinateSequence.h:56
Represents a collection of heterogeneous Geometry objects.
Definition: GeometryCollection.h:51
Basic implementation of Geometry, constructed and destructed by GeometryFactory.
Definition: Geometry.h:197
@@ -208,13 +209,13 @@
Represents a linear polygon, which may include holes.
Definition: Polygon.h:61
Specifies the precision model of the Coordinate in a Geometry.
Definition: PrecisionModel.h:88
Creates all the raw offset curves for a buffer of a Geometry.
Definition: BufferCurveSetBuilder.h:72
-
BufferCurveSetBuilder(const geom::Geometry &newInputGeom, double newDistance, const geom::PrecisionModel *newPm, const BufferParameters &newBufParams)
Constructor.
Definition: BufferCurveSetBuilder.h:241
+
BufferCurveSetBuilder(const geom::Geometry &newInputGeom, double newDistance, const geom::PrecisionModel *newPm, const BufferParameters &newBufParams)
Constructor.
Definition: BufferCurveSetBuilder.h:242
std::vector< noding::SegmentString * > & getCurves()
Computes the set of raw offset curves for the buffer.
~BufferCurveSetBuilder()
Destructor.
void addCurves(const std::vector< geom::CoordinateSequence * > &lineList, geom::Location leftLoc, geom::Location rightLoc)
Add raw curves for a set of CoordinateSequences.
-
void setInvertOrientation(bool p_isInvertOrientation)
Definition: BufferCurveSetBuilder.h:284
+
void setInvertOrientation(bool p_isInvertOrientation)
Definition: BufferCurveSetBuilder.h:285
Contains the parameters which describe how a buffer should be constructed.
Definition: BufferParameters.h:56
-
Computes the raw offset curve for a single Geometry component (ring, line or point).
Definition: OffsetCurveBuilder.h:68
+
Computes the raw offset curve for a single Geometry component (ring, line or point).
Definition: OffsetCurveBuilder.h:65
Location
Constants representing the location of a point relative to a geometry.
Definition: Location.h:32
Basic namespace for all GEOS functionalities.
Definition: Angle.h:25
diff --git a/doxygen/CGAlgorithmsDD_8h_source.html b/doxygen/CGAlgorithmsDD_8h_source.html index 8280d994f3..feeabdf345 100644 --- a/doxygen/CGAlgorithmsDD_8h_source.html +++ b/doxygen/CGAlgorithmsDD_8h_source.html @@ -78,111 +78,110 @@
29 }
30 }
31 
-
32 using namespace geos::math;
-
33 
-
34 namespace geos {
-
35 namespace algorithm { // geos::algorithm
-
36 
-
38 class GEOS_DLL CGAlgorithmsDD {
-
39 
-
40 public:
-
41 
-
42  enum {
-
43  CLOCKWISE = -1,
-
44  COLLINEAR = 0,
-
45  COUNTERCLOCKWISE = 1
-
46  };
-
47 
-
48  enum {
-
49  RIGHT = -1,
-
50  LEFT = 1,
-
51  STRAIGHT = 0,
-
52  FAILURE = 2
-
53  };
-
54 
-
67  static int orientationIndex(const geom::CoordinateXY& p1,
-
68  const geom::CoordinateXY& p2,
-
69  const geom::CoordinateXY& q);
+
32 namespace geos {
+
33 namespace algorithm { // geos::algorithm
+
34 
+
36 class GEOS_DLL CGAlgorithmsDD {
+
37  using DD = geos::math::DD;
+
38 
+
39 public:
+
40 
+
41  enum {
+
42  CLOCKWISE = -1,
+
43  COLLINEAR = 0,
+
44  COUNTERCLOCKWISE = 1
+
45  };
+
46 
+
47  enum {
+
48  RIGHT = -1,
+
49  LEFT = 1,
+
50  STRAIGHT = 0,
+
51  FAILURE = 2
+
52  };
+
53 
+
66  static int orientationIndex(const geom::CoordinateXY& p1,
+
67  const geom::CoordinateXY& p2,
+
68  const geom::CoordinateXY& q);
+
69 
70 
-
71 
-
72  static int orientationIndex(double p1x, double p1y,
-
73  double p2x, double p2y,
-
74  double qx, double qy);
-
75 
-
90  static inline int orientationIndexFilter(
-
91  double pax, double pay,
-
92  double pbx, double pby,
-
93  double pcx, double pcy)
-
94  {
-
99  double constexpr DP_SAFE_EPSILON = 1e-15;
-
100 
-
101  double detsum;
-
102  double const detleft = (pax - pcx) * (pby - pcy);
-
103  double const detright = (pay - pcy) * (pbx - pcx);
-
104  double const det = detleft - detright;
-
105 
-
106  if(detleft > 0.0) {
-
107  if(detright <= 0.0) {
-
108  return orientation(det);
-
109  }
-
110  else {
-
111  detsum = detleft + detright;
-
112  }
-
113  }
-
114  else if(detleft < 0.0) {
-
115  if(detright >= 0.0) {
-
116  return orientation(det);
-
117  }
-
118  else {
-
119  detsum = -detleft - detright;
-
120  }
-
121  }
-
122  else {
-
123  return orientation(det);
-
124  }
-
125 
-
126  double const errbound = DP_SAFE_EPSILON * detsum;
-
127  if((det >= errbound) || (-det >= errbound)) {
-
128  return orientation(det);
-
129  }
-
130  return CGAlgorithmsDD::FAILURE;
-
131  };
-
132 
-
133  static int
-
134  orientation(double x)
-
135  {
-
136  if(x < 0) {
-
137  return CGAlgorithmsDD::RIGHT;
-
138  }
-
139  if(x > 0) {
-
140  return CGAlgorithmsDD::LEFT;
-
141  }
-
142  return CGAlgorithmsDD::STRAIGHT;
-
143  };
-
144 
-
154  static geom::CoordinateXY intersection(const geom::CoordinateXY& p1, const geom::CoordinateXY& p2,
-
155  const geom::CoordinateXY& q1, const geom::CoordinateXY& q2);
-
156 
-
157  static int signOfDet2x2(double dx1, double dy1, double dx2, double dy2);
-
158 
-
159  static DD detDD(double x1, double y1, double x2, double y2);
-
160  static DD detDD(const DD& x1, const DD& y1, const DD& x2, const DD& y2);
-
161 
-
181  static geom::CoordinateXY circumcentreDD(const geom::CoordinateXY& a, const geom::CoordinateXY& b, const geom::CoordinateXY& c);
-
182 
-
183 protected:
-
184 
-
185  static int signOfDet2x2(const DD& x1, const DD& y1, const DD& x2, const DD& y2);
-
186 
-
187 };
-
188 
-
189 } // namespace geos::algorithm
-
190 } // namespace geos
+
71  static int orientationIndex(double p1x, double p1y,
+
72  double p2x, double p2y,
+
73  double qx, double qy);
+
74 
+
89  static inline int orientationIndexFilter(
+
90  double pax, double pay,
+
91  double pbx, double pby,
+
92  double pcx, double pcy)
+
93  {
+
98  double constexpr DP_SAFE_EPSILON = 1e-15;
+
99 
+
100  double detsum;
+
101  double const detleft = (pax - pcx) * (pby - pcy);
+
102  double const detright = (pay - pcy) * (pbx - pcx);
+
103  double const det = detleft - detright;
+
104 
+
105  if(detleft > 0.0) {
+
106  if(detright <= 0.0) {
+
107  return orientation(det);
+
108  }
+
109  else {
+
110  detsum = detleft + detright;
+
111  }
+
112  }
+
113  else if(detleft < 0.0) {
+
114  if(detright >= 0.0) {
+
115  return orientation(det);
+
116  }
+
117  else {
+
118  detsum = -detleft - detright;
+
119  }
+
120  }
+
121  else {
+
122  return orientation(det);
+
123  }
+
124 
+
125  double const errbound = DP_SAFE_EPSILON * detsum;
+
126  if((det >= errbound) || (-det >= errbound)) {
+
127  return orientation(det);
+
128  }
+
129  return CGAlgorithmsDD::FAILURE;
+
130  };
+
131 
+
132  static int
+
133  orientation(double x)
+
134  {
+
135  if(x < 0) {
+
136  return CGAlgorithmsDD::RIGHT;
+
137  }
+
138  if(x > 0) {
+
139  return CGAlgorithmsDD::LEFT;
+
140  }
+
141  return CGAlgorithmsDD::STRAIGHT;
+
142  };
+
143 
+
153  static geom::CoordinateXY intersection(const geom::CoordinateXY& p1, const geom::CoordinateXY& p2,
+
154  const geom::CoordinateXY& q1, const geom::CoordinateXY& q2);
+
155 
+
156  static int signOfDet2x2(double dx1, double dy1, double dx2, double dy2);
+
157 
+
158  static DD detDD(double x1, double y1, double x2, double y2);
+
159  static DD detDD(const DD& x1, const DD& y1, const DD& x2, const DD& y2);
+
160 
+
180  static geom::CoordinateXY circumcentreDD(const geom::CoordinateXY& a, const geom::CoordinateXY& b, const geom::CoordinateXY& c);
+
181 
+
182 protected:
+
183 
+
184  static int signOfDet2x2(const DD& x1, const DD& y1, const DD& x2, const DD& y2);
+
185 
+
186 };
+
187 
+
188 } // namespace geos::algorithm
+
189 } // namespace geos
+
190 
191 
192 
-
193 
-
Implements basic computational geometry algorithms using extended precision float-point arithmetic.
Definition: CGAlgorithmsDD.h:38
-
static int orientationIndexFilter(double pax, double pay, double pbx, double pby, double pcx, double pcy)
Definition: CGAlgorithmsDD.h:90
+
Implements basic computational geometry algorithms using extended precision float-point arithmetic.
Definition: CGAlgorithmsDD.h:36
+
static int orientationIndexFilter(double pax, double pay, double pbx, double pby, double pcx, double pcy)
Definition: CGAlgorithmsDD.h:89
static int orientationIndex(const geom::CoordinateXY &p1, const geom::CoordinateXY &p2, const geom::CoordinateXY &q)
Returns the index of the direction of the point q relative to a vector specified by p1-p2.
static geom::CoordinateXY circumcentreDD(const geom::CoordinateXY &a, const geom::CoordinateXY &b, const geom::CoordinateXY &c)
Computes the circumcentre of a triangle.
static geom::CoordinateXY intersection(const geom::CoordinateXY &p1, const geom::CoordinateXY &p2, const geom::CoordinateXY &q1, const geom::CoordinateXY &q2)
diff --git a/doxygen/ComponentJumpChecker_8h_source.html b/doxygen/ComponentJumpChecker_8h_source.html index 40b6ca816d..bce10ec0f0 100644 --- a/doxygen/ComponentJumpChecker_8h_source.html +++ b/doxygen/ComponentJumpChecker_8h_source.html @@ -73,88 +73,87 @@
24 // Forward declarations
25 namespace geos {
26 namespace geom {
-
27 class Coordinate;
+
27 class Coordinate;
28 class CoordinateSequence;
-
29 class Envelope;
-
30 class LineSegment;
+
29 class Envelope;
+
30 class LineSegment;
31 }
32 namespace simplify {
33 class TaggedLineString;
34 }
35 }
36 
-
37 using geos::geom::Coordinate;
-
38 using geos::geom::Envelope;
-
39 using geos::geom::LineSegment;
+
37 namespace geos {
+
38 namespace simplify { // geos::simplify
+
39 
40 
-
41 namespace geos {
-
42 namespace simplify { // geos::simplify
-
43 
-
44 
-
45 class GEOS_DLL ComponentJumpChecker {
-
46 
-
47 private:
-
48 
-
49  const std::vector<TaggedLineString*>& components;
-
50 
-
51  static bool hasJumpAtComponent(
-
52  const Coordinate& compPt,
-
53  const TaggedLineString* line,
-
54  std::size_t start, std::size_t end,
-
55  const LineSegment& seg);
-
56 
-
57  static bool hasJumpAtComponent(
-
58  const Coordinate& compPt,
-
59  const LineSegment* seg1, const LineSegment* seg2,
-
60  const LineSegment& seg);
-
61 
-
62  static std::size_t crossingCount(
-
63  const Coordinate& compPt,
-
64  const LineSegment& seg);
-
65 
-
66  static std::size_t crossingCount(
-
67  const Coordinate& compPt,
-
68  const LineSegment* seg1, const LineSegment* seg2);
-
69 
-
70  std::size_t static crossingCount(
-
71  const Coordinate& compPt,
-
72  const TaggedLineString* line,
-
73  std::size_t start, std::size_t end);
-
74 
-
75  static Envelope computeEnvelope(
-
76  const LineSegment* seg1, const LineSegment* seg2);
-
77 
-
78  static Envelope computeEnvelope(
-
79  const TaggedLineString* line,
-
80  std::size_t start, std::size_t end);
+
41 class GEOS_DLL ComponentJumpChecker {
+
42  using Coordinate = geos::geom::Coordinate;
+
43  using Envelope = geos::geom::Envelope;
+
44  using LineSegment = geos::geom::LineSegment;
+
45 
+
46 private:
+
47 
+
48  const std::vector<TaggedLineString*>& components;
+
49 
+
50  static bool hasJumpAtComponent(
+
51  const Coordinate& compPt,
+
52  const TaggedLineString* line,
+
53  std::size_t start, std::size_t end,
+
54  const LineSegment& seg);
+
55 
+
56  static bool hasJumpAtComponent(
+
57  const Coordinate& compPt,
+
58  const LineSegment* seg1, const LineSegment* seg2,
+
59  const LineSegment& seg);
+
60 
+
61  static std::size_t crossingCount(
+
62  const Coordinate& compPt,
+
63  const LineSegment& seg);
+
64 
+
65  static std::size_t crossingCount(
+
66  const Coordinate& compPt,
+
67  const LineSegment* seg1, const LineSegment* seg2);
+
68 
+
69  std::size_t static crossingCount(
+
70  const Coordinate& compPt,
+
71  const TaggedLineString* line,
+
72  std::size_t start, std::size_t end);
+
73 
+
74  static Envelope computeEnvelope(
+
75  const LineSegment* seg1, const LineSegment* seg2);
+
76 
+
77  static Envelope computeEnvelope(
+
78  const TaggedLineString* line,
+
79  std::size_t start, std::size_t end);
+
80 
81 
-
82 
-
83 public:
-
84 
-
85  ComponentJumpChecker(const std::vector<TaggedLineString*>& taggedLines)
-
86  : components(taggedLines)
-
87  {}
-
88 
-
89  bool hasJump(
-
90  const TaggedLineString* line,
-
91  std::size_t start, std::size_t end,
-
92  const LineSegment& seg) const;
-
93 
-
106  bool hasJump(
-
107  const TaggedLineString* line,
-
108  const LineSegment* seg1,
-
109  const LineSegment* seg2,
-
110  const LineSegment& seg) const;
-
111 
-
112 };
-
113 
-
114 } // namespace geos::simplify
-
115 } // namespace geos
+
82 public:
+
83 
+
84  ComponentJumpChecker(const std::vector<TaggedLineString*>& taggedLines)
+
85  : components(taggedLines)
+
86  {}
+
87 
+
88  bool hasJump(
+
89  const TaggedLineString* line,
+
90  std::size_t start, std::size_t end,
+
91  const LineSegment& seg) const;
+
92 
+
105  bool hasJump(
+
106  const TaggedLineString* line,
+
107  const LineSegment* seg1,
+
108  const LineSegment* seg2,
+
109  const LineSegment& seg) const;
+
110 
+
111 };
+
112 
+
113 } // namespace geos::simplify
+
114 } // namespace geos
+
115 
116 
117 
118 
119 
-
120 
Coordinate is the lightweight class used to store coordinates.
Definition: Coordinate.h:217
An Envelope defines a rectangulare region of the 2D coordinate plane.
Definition: Envelope.h:59
Definition: LineSegment.h:61
diff --git a/doxygen/ConcaveHullOfPolygons_8h_source.html b/doxygen/ConcaveHullOfPolygons_8h_source.html index 28d689ec8c..5a2bbf7d69 100644 --- a/doxygen/ConcaveHullOfPolygons_8h_source.html +++ b/doxygen/ConcaveHullOfPolygons_8h_source.html @@ -64,173 +64,170 @@
15 #pragma once
16 
17 #include <geos/triangulate/tri/TriList.h>
-
18 
-
19 #include <set>
-
20 #include <deque>
-
21 #include <map>
-
22 
-
23 namespace geos {
-
24 namespace geom {
-
25 class Coordinate;
-
26 class CoordinateSequence;
-
27 class Envelope;
-
28 class Geometry;
-
29 class GeometryCollection;
-
30 class GeometryFactory;
-
31 class LinearRing;
-
32 class Polygon;
-
33 }
-
34 namespace triangulate {
-
35 namespace tri {
-
36 class Tri;
-
37 }
+
18 #include <geos/triangulate/tri/Tri.h>
+
19 
+
20 #include <set>
+
21 #include <deque>
+
22 #include <map>
+
23 
+
24 namespace geos {
+
25 namespace geom {
+
26 class Coordinate;
+
27 class CoordinateSequence;
+
28 class Envelope;
+
29 class Geometry;
+
30 class GeometryCollection;
+
31 class GeometryFactory;
+
32 class LinearRing;
+
33 class Polygon;
+
34 }
+
35 namespace triangulate {
+
36 namespace tri {
+
37 class Tri;
38 }
39 }
-
40 
-
41 #include <geos/triangulate/tri/Tri.h>
-
42 
-
43 
-
44 using geos::geom::Coordinate;
-
45 using geos::geom::CoordinateSequence;
-
46 using geos::geom::Envelope;
-
47 using geos::geom::Geometry;
-
48 using geos::geom::GeometryCollection;
-
49 using geos::geom::GeometryFactory;
-
50 using geos::geom::LinearRing;
-
51 using geos::geom::Polygon;
-
52 using geos::triangulate::tri::Tri;
-
53 using geos::triangulate::tri::TriList;
-
54 
-
55 
-
56 namespace geos {
-
57 namespace algorithm { // geos::algorithm
-
58 namespace hull { // geos::algorithm::hull
-
59 
-
60 
-
97 class GEOS_DLL ConcaveHullOfPolygons {
-
98 
-
99 private:
-
100 
-
101  /* Members */
-
102 
-
103  static constexpr int FRAME_EXPAND_FACTOR = 4;
-
104 
-
105  const Geometry* inputPolygons;
-
106  const GeometryFactory* geomFactory;
-
107  double maxEdgeLength;
-
108  double maxEdgeLengthRatio;
-
109  bool isHolesAllowed;
-
110  bool isTight;
-
111 
-
112  std::set<Tri*> hullTris;
-
113  std::deque<Tri*> borderTriQue;
-
114  std::vector<const LinearRing*> polygonRings;
-
115  TriList<Tri> triList;
-
116 
-
121  std::map<Tri*, TriIndex> borderEdgeMap;
-
122 
-
123  /* Methods */
-
124 
-
125  std::unique_ptr<Geometry> createEmptyHull();
-
126 
-
127  void buildHullTris();
-
128 
-
140  std::unique_ptr<Polygon> createFrame(
-
141  const Envelope* polygonsEnv);
-
142 
-
143  double computeTargetEdgeLength(
-
144  TriList<Tri>& triList,
-
145  const CoordinateSequence* frameCorners,
-
146  double edgeLengthRatio) const;
-
147 
-
148  bool isFrameTri(
-
149  const Tri* tri,
-
150  const CoordinateSequence* frameCorners) const;
-
151 
-
152  void removeFrameCornerTris(
-
153  TriList<Tri>& tris,
-
154  const CoordinateSequence* frameCorners);
-
155 
-
164  TriIndex vertexIndex(
-
165  const Tri* tri,
-
166  const CoordinateSequence* pts) const;
-
167 
-
168  void removeBorderTris();
-
169 
-
170  void removeHoleTris();
-
171 
-
172  Tri* findHoleSeedTri() const;
-
173 
-
174  bool isHoleSeedTri(const Tri* tri) const;
-
175 
-
176  bool isBorderTri(const Tri* tri) const;
-
177 
-
178  bool isRemovable(const Tri* tri) const;
-
179 
-
189  bool isTouchingSinglePolygon(const Tri* tri) const;
-
190 
-
191  void addBorderTris(Tri* tri);
-
192 
-
205  void addBorderTri(Tri* tri, TriIndex index);
-
206 
-
207  void removeBorderTri(Tri* tri);
-
208 
-
209  bool hasAllVertices(const LinearRing* ring, const Tri* tri) const;
-
210 
-
211  bool hasVertex(const LinearRing* ring, const Coordinate& v) const;
-
212 
-
213  void envelope(const Tri* tri, Envelope& env) const;
+
40 }
+
41 
+
42 namespace geos {
+
43 namespace algorithm { // geos::algorithm
+
44 namespace hull { // geos::algorithm::hull
+
45 
+
46 
+
83 class GEOS_DLL ConcaveHullOfPolygons {
+
84  using Coordinate = geos::geom::Coordinate;
+
85  using CoordinateSequence = geos::geom::CoordinateSequence;
+
86  using Envelope = geos::geom::Envelope;
+
87  using Geometry = geos::geom::Geometry;
+
88  using GeometryCollection = geos::geom::GeometryCollection;
+
89  using GeometryFactory = geos::geom::GeometryFactory;
+
90  using LinearRing = geos::geom::LinearRing;
+
91  using Polygon = geos::geom::Polygon;
+
92  using Tri = geos::triangulate::tri::Tri;
+
93  template<typename TriType>
+
94  using TriList = geos::triangulate::tri::TriList<TriType>;
+
95 
+
96 private:
+
97 
+
98  /* Members */
+
99 
+
100  static constexpr int FRAME_EXPAND_FACTOR = 4;
+
101 
+
102  const Geometry* inputPolygons;
+
103  const GeometryFactory* geomFactory;
+
104  double maxEdgeLength;
+
105  double maxEdgeLengthRatio;
+
106  bool isHolesAllowed;
+
107  bool isTight;
+
108 
+
109  std::set<Tri*> hullTris;
+
110  std::deque<Tri*> borderTriQue;
+
111  std::vector<const LinearRing*> polygonRings;
+
112  TriList<Tri> triList;
+
113 
+
118  std::map<Tri*, TriIndex> borderEdgeMap;
+
119 
+
120  /* Methods */
+
121 
+
122  std::unique_ptr<Geometry> createEmptyHull();
+
123 
+
124  void buildHullTris();
+
125 
+
137  std::unique_ptr<Polygon> createFrame(
+
138  const Envelope* polygonsEnv);
+
139 
+
140  double computeTargetEdgeLength(
+
141  TriList<Tri>& triList,
+
142  const CoordinateSequence* frameCorners,
+
143  double edgeLengthRatio) const;
+
144 
+
145  bool isFrameTri(
+
146  const Tri* tri,
+
147  const CoordinateSequence* frameCorners) const;
+
148 
+
149  void removeFrameCornerTris(
+
150  TriList<Tri>& tris,
+
151  const CoordinateSequence* frameCorners);
+
152 
+
161  TriIndex vertexIndex(
+
162  const Tri* tri,
+
163  const CoordinateSequence* pts) const;
+
164 
+
165  void removeBorderTris();
+
166 
+
167  void removeHoleTris();
+
168 
+
169  Tri* findHoleSeedTri() const;
+
170 
+
171  bool isHoleSeedTri(const Tri* tri) const;
+
172 
+
173  bool isBorderTri(const Tri* tri) const;
+
174 
+
175  bool isRemovable(const Tri* tri) const;
+
176 
+
186  bool isTouchingSinglePolygon(const Tri* tri) const;
+
187 
+
188  void addBorderTris(Tri* tri);
+
189 
+
202  void addBorderTri(Tri* tri, TriIndex index);
+
203 
+
204  void removeBorderTri(Tri* tri);
+
205 
+
206  bool hasAllVertices(const LinearRing* ring, const Tri* tri) const;
+
207 
+
208  bool hasVertex(const LinearRing* ring, const Coordinate& v) const;
+
209 
+
210  void envelope(const Tri* tri, Envelope& env) const;
+
211 
+
212  std::unique_ptr<Geometry> createHullGeometry(bool isIncludeInput);
+
213 
214 
-
215  std::unique_ptr<Geometry> createHullGeometry(bool isIncludeInput);
+
215 public:
216 
-
217 
-
218 public:
-
219 
-
228  static std::unique_ptr<Geometry>
-
229  concaveHullByLength(const Geometry* polygons, double maxLength);
-
230 
-
243  static std::unique_ptr<Geometry>
-
244  concaveHullByLength(
-
245  const Geometry* polygons, double maxLength,
-
246  bool isTight, bool isHolesAllowed);
-
247 
-
256  static std::unique_ptr<Geometry>
-
257  concaveHullByLengthRatio(const Geometry* polygons, double lengthRatio);
-
258 
-
271  static std::unique_ptr<Geometry>
-
272  concaveHullByLengthRatio(
-
273  const Geometry* polygons, double lengthRatio,
-
274  bool isTight, bool isHolesAllowed);
-
275 
-
284  static std::unique_ptr<Geometry>
-
285  concaveFillByLength(const Geometry* polygons, double maxLength);
-
286 
-
295  static std::unique_ptr<Geometry>
-
296  concaveFillByLengthRatio(const Geometry* polygons, double lengthRatio);
-
297 
-
303  ConcaveHullOfPolygons(const Geometry* geom);
-
304 
-
318  void setMaximumEdgeLength(double edgeLength);
-
319 
-
334  void setMaximumEdgeLengthRatio(double edgeLengthRatio);
-
335 
-
341  void setHolesAllowed(bool p_isHolesAllowed);
-
342 
-
349  void setTight(bool p_isTight);
-
350 
-
356  std::unique_ptr<Geometry> getHull();
-
357 
-
364  std::unique_ptr<Geometry> getFill();
+
225  static std::unique_ptr<Geometry>
+
226  concaveHullByLength(const Geometry* polygons, double maxLength);
+
227 
+
240  static std::unique_ptr<Geometry>
+
241  concaveHullByLength(
+
242  const Geometry* polygons, double maxLength,
+
243  bool isTight, bool isHolesAllowed);
+
244 
+
253  static std::unique_ptr<Geometry>
+
254  concaveHullByLengthRatio(const Geometry* polygons, double lengthRatio);
+
255 
+
268  static std::unique_ptr<Geometry>
+
269  concaveHullByLengthRatio(
+
270  const Geometry* polygons, double lengthRatio,
+
271  bool isTight, bool isHolesAllowed);
+
272 
+
281  static std::unique_ptr<Geometry>
+
282  concaveFillByLength(const Geometry* polygons, double maxLength);
+
283 
+
292  static std::unique_ptr<Geometry>
+
293  concaveFillByLengthRatio(const Geometry* polygons, double lengthRatio);
+
294 
+
300  ConcaveHullOfPolygons(const Geometry* geom);
+
301 
+
315  void setMaximumEdgeLength(double edgeLength);
+
316 
+
331  void setMaximumEdgeLengthRatio(double edgeLengthRatio);
+
332 
+
338  void setHolesAllowed(bool p_isHolesAllowed);
+
339 
+
346  void setTight(bool p_isTight);
+
347 
+
353  std::unique_ptr<Geometry> getHull();
+
354 
+
361  std::unique_ptr<Geometry> getFill();
+
362 
+
363 
+
364 };
365 
366 
-
367 };
-
368 
-
369 
-
370 
-
371 } // geos::algorithm::hull
-
372 } // geos::algorithm
-
373 } // geos
-
Definition: ConcaveHullOfPolygons.h:97
+
367 
+
368 } // geos::algorithm::hull
+
369 } // geos::algorithm
+
370 } // geos
+
Definition: ConcaveHullOfPolygons.h:83
void setTight(bool p_isTight)
std::unique_ptr< Geometry > getHull()
static std::unique_ptr< Geometry > concaveHullByLength(const Geometry *polygons, double maxLength, bool isTight, bool isHolesAllowed)
@@ -252,8 +249,8 @@
Basic implementation of Geometry, constructed and destructed by GeometryFactory.
Definition: Geometry.h:197
Models an OGC SFS LinearRing. A LinearRing is a LineString which is both closed and simple.
Definition: LinearRing.h:54
Represents a linear polygon, which may include holes.
Definition: Polygon.h:61
-
Definition: TriList.h:54
-
Definition: Tri.h:49
+
Definition: TriList.h:50
+
Definition: Tri.h:45
Basic namespace for all GEOS functionalities.
Definition: Angle.h:25
diff --git a/doxygen/ConcaveHull_8h_source.html b/doxygen/ConcaveHull_8h_source.html index 15152dfe16..ec1f373001 100644 --- a/doxygen/ConcaveHull_8h_source.html +++ b/doxygen/ConcaveHull_8h_source.html @@ -74,9 +74,9 @@
25 
26 namespace geos {
27 namespace geom {
-
28 class Coordinate;
-
29 class Geometry;
-
30 class GeometryFactory;
+
28 class Coordinate;
+
29 class Geometry;
+
30 class GeometryFactory;
31 }
32 namespace triangulate {
33 namespace quadedge {
@@ -86,115 +86,114 @@
37 }
38 }
39 
-
40 using geos::geom::Coordinate;
-
41 using geos::geom::Geometry;
-
42 using geos::geom::GeometryFactory;
-
43 using geos::geom::Triangle;
-
44 using geos::triangulate::quadedge::QuadEdge;
-
45 using geos::triangulate::quadedge::QuadEdgeSubdivision;
-
46 using geos::triangulate::quadedge::TriangleVisitor;
-
47 using geos::triangulate::tri::Tri;
-
48 using geos::triangulate::tri::TriList;
-
49 
-
50 namespace geos {
-
51 namespace algorithm { // geos::algorithm
-
52 namespace hull { // geos::algorithm::hull
-
53 
-
54 
-
55 typedef std::priority_queue<HullTri*, std::vector<HullTri*>, HullTri::HullTriCompare> HullTriQueue;
-
56 
-
57 
-
95 class GEOS_DLL ConcaveHull {
-
96 
-
97 public:
-
98 
-
99  ConcaveHull(const Geometry* geom);
-
100 
-
113  static double uniformEdgeLength(const Geometry* geom);
-
114 
-
123  static std::unique_ptr<Geometry> concaveHullByLength(
-
124  const Geometry* geom, double maxLength);
-
125 
-
126  static std::unique_ptr<Geometry> concaveHullByLength(
-
127  const Geometry* geom, double maxLength, bool isHolesAllowed);
-
128 
-
140  static std::unique_ptr<Geometry> concaveHullByLengthRatio(
-
141  const Geometry* geom, double lengthRatio);
-
142 
-
156  static std::unique_ptr<Geometry> concaveHullByLengthRatio(
-
157  const Geometry* geom,
-
158  double lengthRatio,
-
159  bool isHolesAllowed);
-
160 
-
170  static std::unique_ptr<Geometry> alphaShape(
-
171  const Geometry* geom,
-
172  double alpha,
-
173  bool isHolesAllowed);
-
174 
-
190  void setMaximumEdgeLength(double edgeLength);
-
191 
-
203  void setMaximumEdgeLengthRatio(double edgeLengthRatio);
-
204 
-
210  void setHolesAllowed(bool holesAllowed);
-
211 
-
219  void setAlpha(double newAlpha);
-
220 
-
226  std::unique_ptr<Geometry> getHull();
+
40 namespace geos {
+
41 namespace algorithm { // geos::algorithm
+
42 namespace hull { // geos::algorithm::hull
+
43 
+
44 
+
45 typedef std::priority_queue<HullTri*, std::vector<HullTri*>, HullTri::HullTriCompare> HullTriQueue;
+
46 
+
47 
+
85 class GEOS_DLL ConcaveHull {
+
86  using Coordinate = geos::geom::Coordinate;
+
87  using Geometry = geos::geom::Geometry;
+
88  using GeometryFactory = geos::geom::GeometryFactory;
+
89  using Triangle = geos::geom::Triangle;
+
90  using QuadEdge = geos::triangulate::quadedge::QuadEdge;
+
91  using QuadEdgeSubdivision = geos::triangulate::quadedge::QuadEdgeSubdivision;
+
92  using Tri = geos::triangulate::tri::Tri;
+
93  template<typename TriType>
+
94  using TriList = geos::triangulate::tri::TriList<TriType>;
+
95 
+
96 public:
+
97 
+
98  ConcaveHull(const Geometry* geom);
+
99 
+
112  static double uniformEdgeLength(const Geometry* geom);
+
113 
+
122  static std::unique_ptr<Geometry> concaveHullByLength(
+
123  const Geometry* geom, double maxLength);
+
124 
+
125  static std::unique_ptr<Geometry> concaveHullByLength(
+
126  const Geometry* geom, double maxLength, bool isHolesAllowed);
+
127 
+
139  static std::unique_ptr<Geometry> concaveHullByLengthRatio(
+
140  const Geometry* geom, double lengthRatio);
+
141 
+
155  static std::unique_ptr<Geometry> concaveHullByLengthRatio(
+
156  const Geometry* geom,
+
157  double lengthRatio,
+
158  bool isHolesAllowed);
+
159 
+
169  static std::unique_ptr<Geometry> alphaShape(
+
170  const Geometry* geom,
+
171  double alpha,
+
172  bool isHolesAllowed);
+
173 
+
189  void setMaximumEdgeLength(double edgeLength);
+
190 
+
202  void setMaximumEdgeLengthRatio(double edgeLengthRatio);
+
203 
+
209  void setHolesAllowed(bool holesAllowed);
+
210 
+
218  void setAlpha(double newAlpha);
+
219 
+
225  std::unique_ptr<Geometry> getHull();
+
226 
227 
-
228 
-
229 private:
-
230 
-
231  // Constants
-
232  static constexpr int PARAM_EDGE_LENGTH = 1;
-
233  static constexpr int PARAM_ALPHA = 2;
-
234 
-
235  // Members
-
236  const Geometry* inputGeometry;
-
237  double maxEdgeLengthRatio;
-
238  double alpha;
-
239  bool isHolesAllowed;
-
240  int criteriaType;
-
241  double maxSizeInHull;
-
242  const GeometryFactory* geomFactory;
-
243 
-
244  // Methods
-
245  static double computeTargetEdgeLength(
-
246  TriList<HullTri>& triList,
-
247  double edgeLengthFactor);
-
248 
-
249  void computeHull(TriList<HullTri>& triList);
-
250  void computeHullBorder(TriList<HullTri>& triList);
-
251  void createBorderQueue(HullTriQueue& queue, TriList<HullTri>& triList);
-
252 
-
263  void addBorderTri(HullTri* tri, HullTriQueue& queue);
-
264  void computeHullHoles(TriList<HullTri>& triList);
-
265  void setSize(HullTri* tri);
+
228 private:
+
229 
+
230  // Constants
+
231  static constexpr int PARAM_EDGE_LENGTH = 1;
+
232  static constexpr int PARAM_ALPHA = 2;
+
233 
+
234  // Members
+
235  const Geometry* inputGeometry;
+
236  double maxEdgeLengthRatio;
+
237  double alpha;
+
238  bool isHolesAllowed;
+
239  int criteriaType;
+
240  double maxSizeInHull;
+
241  const GeometryFactory* geomFactory;
+
242 
+
243  // Methods
+
244  static double computeTargetEdgeLength(
+
245  TriList<HullTri>& triList,
+
246  double edgeLengthFactor);
+
247 
+
248  void computeHull(TriList<HullTri>& triList);
+
249  void computeHullBorder(TriList<HullTri>& triList);
+
250  void createBorderQueue(HullTriQueue& queue, TriList<HullTri>& triList);
+
251 
+
262  void addBorderTri(HullTri* tri, HullTriQueue& queue);
+
263  void computeHullHoles(TriList<HullTri>& triList);
+
264  void setSize(HullTri* tri);
+
265 
266 
-
267 
-
280  static std::vector<HullTri*> findCandidateHoles(
-
281  TriList<HullTri>& triList, double maxSizeInHull);
-
282 
-
283  void removeHole(TriList<HullTri>& triList, HullTri* triHole);
-
284  void setSize(TriList<HullTri>& triList);
-
285 
-
293  bool isInHull(const HullTri* tri) const;
-
294 
-
295  bool isRemovableBorder(const HullTri* tri) const;
-
296  bool isRemovableHole(const HullTri* tri) const;
-
297 
-
298  std::unique_ptr<Geometry> toGeometry(
-
299  TriList<HullTri>& triList,
-
300  const GeometryFactory* factory);
+
279  static std::vector<HullTri*> findCandidateHoles(
+
280  TriList<HullTri>& triList, double maxSizeInHull);
+
281 
+
282  void removeHole(TriList<HullTri>& triList, HullTri* triHole);
+
283  void setSize(TriList<HullTri>& triList);
+
284 
+
292  bool isInHull(const HullTri* tri) const;
+
293 
+
294  bool isRemovableBorder(const HullTri* tri) const;
+
295  bool isRemovableHole(const HullTri* tri) const;
+
296 
+
297  std::unique_ptr<Geometry> toGeometry(
+
298  TriList<HullTri>& triList,
+
299  const GeometryFactory* factory);
+
300 
301 
-
302 
-
303 };
+
302 };
+
303 
304 
-
305 
-
306 } // geos::algorithm::hull
-
307 } // geos::algorithm
-
308 } // geos
-
309 
-
Definition: ConcaveHull.h:95
+
305 } // geos::algorithm::hull
+
306 } // geos::algorithm
+
307 } // geos
+
308 
+
Definition: ConcaveHull.h:85
std::unique_ptr< Geometry > getHull()
static std::unique_ptr< Geometry > concaveHullByLengthRatio(const Geometry *geom, double lengthRatio, bool isHolesAllowed)
static std::unique_ptr< Geometry > concaveHullByLengthRatio(const Geometry *geom, double lengthRatio)
@@ -211,9 +210,8 @@
Represents a planar triangle, and provides methods for calculating various properties of triangles.
Definition: Triangle.h:28
A class that contains the QuadEdges representing a planar subdivision that models a triangulation.
Definition: QuadEdgeSubdivision.h:78
A class that represents the edge data structure which implements the quadedge algebra.
Definition: QuadEdge.h:53
-
An interface for algorithms which process the triangles in a QuadEdgeSubdivision.
Definition: TriangleVisitor.h:33
-
Definition: TriList.h:54
-
Definition: Tri.h:49
+
Definition: TriList.h:50
+
Definition: Tri.h:45
Basic namespace for all GEOS functionalities.
Definition: Angle.h:25
diff --git a/doxygen/ConstrainedDelaunayTriangulator_8h_source.html b/doxygen/ConstrainedDelaunayTriangulator_8h_source.html index 10a670eb10..2389cfdd36 100644 --- a/doxygen/ConstrainedDelaunayTriangulator_8h_source.html +++ b/doxygen/ConstrainedDelaunayTriangulator_8h_source.html @@ -69,67 +69,66 @@
20 // Forward declarations
21 namespace geos {
22 namespace geom {
-
23 class Geometry;
-
24 class GeometryFactory;
-
25 class Polygon;
+
23 class Geometry;
+
24 class GeometryFactory;
+
25 class Polygon;
26 }
27 }
28 
-
29 using geos::geom::Geometry;
-
30 using geos::geom::GeometryFactory;
-
31 using geos::geom::Polygon;
-
32 using geos::triangulate::tri::TriList;
-
33 using geos::triangulate::tri::Tri;
-
34 
-
35 
-
36 namespace geos {
-
37 namespace triangulate {
-
38 namespace polygon {
-
39 
-
40 
-
50 class GEOS_DLL ConstrainedDelaunayTriangulator {
-
51 
-
52 private:
-
53 
-
54  // Members
-
55  const Geometry* inputGeom;
-
56  const GeometryFactory* geomFact;
-
57 
-
58  std::unique_ptr<Geometry> compute() const;
-
59 
-
60  static std::unique_ptr<Geometry> toGeometry(
-
61  const geom::GeometryFactory* geomFact,
-
62  const std::vector<std::unique_ptr<TriList<Tri>>>& allTriLists);
+
29 namespace geos {
+
30 namespace triangulate {
+
31 namespace polygon {
+
32 
+
33 
+
43 class GEOS_DLL ConstrainedDelaunayTriangulator {
+
44  using Geometry = geos::geom::Geometry;
+
45  using GeometryFactory = geos::geom::GeometryFactory;
+
46  using Polygon = geos::geom::Polygon;
+
47  template<typename TriType>
+
48  using TriList = geos::triangulate::tri::TriList<TriType>;
+
49  using Tri = geos::triangulate::tri::Tri;
+
50 
+
51 private:
+
52 
+
53  // Members
+
54  const Geometry* inputGeom;
+
55  const GeometryFactory* geomFact;
+
56 
+
57  std::unique_ptr<Geometry> compute() const;
+
58 
+
59  static std::unique_ptr<Geometry> toGeometry(
+
60  const geom::GeometryFactory* geomFact,
+
61  const std::vector<std::unique_ptr<TriList<Tri>>>& allTriLists);
+
62 
63 
-
64 
-
65 public:
-
66 
-
72  ConstrainedDelaunayTriangulator(const Geometry* p_inputGeom)
-
73  : inputGeom(p_inputGeom)
-
74  , geomFact(p_inputGeom->getFactory())
-
75  {}
-
76 
-
83  static std::unique_ptr<Geometry> triangulate(const Geometry* geom);
-
84 
-
92  static void triangulatePolygon(const Polygon* poly, TriList<Tri>& triList);
-
93 
-
94 };
+
64 public:
+
65 
+
71  ConstrainedDelaunayTriangulator(const Geometry* p_inputGeom)
+
72  : inputGeom(p_inputGeom)
+
73  , geomFact(p_inputGeom->getFactory())
+
74  {}
+
75 
+
82  static std::unique_ptr<Geometry> triangulate(const Geometry* geom);
+
83 
+
91  static void triangulatePolygon(const Polygon* poly, TriList<Tri>& triList);
+
92 
+
93 };
+
94 
95 
96 
-
97 
-
98 } // namespace geos.triangulate.polygon
-
99 } // namespace geos.triangulate
-
100 } // namespace geos
-
101 
+
97 } // namespace geos.triangulate.polygon
+
98 } // namespace geos.triangulate
+
99 } // namespace geos
+
100 
Supplies a set of utility methods for building Geometry objects from CoordinateSequence or other Geom...
Definition: GeometryFactory.h:70
Basic implementation of Geometry, constructed and destructed by GeometryFactory.
Definition: Geometry.h:197
Represents a linear polygon, which may include holes.
Definition: Polygon.h:61
-
Definition: ConstrainedDelaunayTriangulator.h:50
+
Definition: ConstrainedDelaunayTriangulator.h:43
static std::unique_ptr< Geometry > triangulate(const Geometry *geom)
-
ConstrainedDelaunayTriangulator(const Geometry *p_inputGeom)
Definition: ConstrainedDelaunayTriangulator.h:72
+
ConstrainedDelaunayTriangulator(const Geometry *p_inputGeom)
Definition: ConstrainedDelaunayTriangulator.h:71
static void triangulatePolygon(const Polygon *poly, TriList< Tri > &triList)
-
Definition: TriList.h:54
-
Definition: Tri.h:49
+
Definition: TriList.h:50
+
Definition: Tri.h:45
Basic namespace for all GEOS functionalities.
Definition: Angle.h:25
diff --git a/doxygen/Corner_8h_source.html b/doxygen/Corner_8h_source.html index a7bad984a2..b75f666a32 100644 --- a/doxygen/Corner_8h_source.html +++ b/doxygen/Corner_8h_source.html @@ -76,114 +76,111 @@
27 class LinkedLine;
28 }
29 namespace geom {
-
30 class Coordinate;
-
31 class LineString;
+
30 class Coordinate;
+
31 class LineString;
32 }
33 }
34 
-
35 
-
36 using geos::geom::Coordinate;
-
37 using geos::geom::Envelope;
-
38 using geos::geom::LineString;
-
39 using geos::simplify::LinkedLine;
-
40 
-
41 
-
42 namespace geos {
-
43 namespace coverage { // geos::coverage
-
44 
+
35 namespace geos {
+
36 namespace coverage { // geos::coverage
+
37 
+
38 
+
39 class Corner
+
40 {
+
41  using Coordinate = geos::geom::Coordinate;
+
42  using Envelope = geos::geom::Envelope;
+
43  using LineString = geos::geom::LineString;
+
44  using LinkedLine = geos::simplify::LinkedLine;
45 
-
46 class Corner
-
47 {
-
48 
-
49 public:
-
50 
-
51  Corner(const LinkedLine* edge, std::size_t i);
-
52 
-
53  bool isVertex(std::size_t index) const;
-
54 
-
55  inline std::size_t getIndex() const {
-
56  return m_index;
-
57  }
-
58 
-
59  inline double getArea() const {
-
60  return m_area;
-
61  };
+
46 public:
+
47 
+
48  Corner(const LinkedLine* edge, std::size_t i);
+
49 
+
50  bool isVertex(std::size_t index) const;
+
51 
+
52  inline std::size_t getIndex() const {
+
53  return m_index;
+
54  }
+
55 
+
56  inline double getArea() const {
+
57  return m_area;
+
58  };
+
59 
+
60  const Coordinate& prev() const;
+
61  const Coordinate& next() const;
62 
-
63  const Coordinate& prev() const;
-
64  const Coordinate& next() const;
-
65 
-
66  Envelope envelope() const;
-
67 
-
68  bool isVertex(const Coordinate& v) const;
-
69  bool isBaseline(const Coordinate& p0, const Coordinate& p1) const;
-
70  bool intersects(const Coordinate& v) const;
-
71  bool isRemoved() const;
-
72 
-
73  const Coordinate& getCoordinate() {
-
74  return m_edge->getCoordinate(m_index);
-
75  }
-
76 
-
77  std::unique_ptr<LineString> toLineString() const;
-
78 
-
79  inline int compareTo(const Corner& rhs) const {
-
80  double area_lhs = getArea();
-
81  double area_rhs = rhs.getArea();
-
82 
-
83  if (area_lhs == area_rhs) {
-
84  std::size_t index_lhs = getIndex();
-
85  std::size_t index_rhs = rhs.getIndex();
-
86  if (index_lhs == index_rhs) return 0;
-
87  else return index_lhs < index_rhs ? -1 : 1;
-
88  }
-
89  else
-
90  return area_lhs < area_rhs ? -1 : 1;
-
91  }
-
92 
-
93  bool operator< (const Corner& rhs) const {
-
94  return compareTo(rhs) < 0;
-
95  };
-
96 
-
97  bool operator> (const Corner& rhs) const {
-
98  return compareTo(rhs) > 0;
-
99  };
-
100 
-
101  bool operator==(const Corner& rhs) const {
-
102  return compareTo(rhs) == 0;
-
103  };
-
104 
-
105  struct Greater {
-
106  inline bool operator()(const Corner & a, const Corner & b) const {
-
107  return a.compareTo(b) > 0;
-
108  }
-
109  };
-
110 
-
111  // Order using greater for compatibility with the Java PriorityQueue
-
112  // implementation, which returns the smallest item off the top of the
-
113  // queue
-
114  using PriorityQueue = std::priority_queue<Corner, std::vector<Corner>, Corner::Greater>;
+
63  Envelope envelope() const;
+
64 
+
65  bool isVertex(const Coordinate& v) const;
+
66  bool isBaseline(const Coordinate& p0, const Coordinate& p1) const;
+
67  bool intersects(const Coordinate& v) const;
+
68  bool isRemoved() const;
+
69 
+
70  const Coordinate& getCoordinate() {
+
71  return m_edge->getCoordinate(m_index);
+
72  }
+
73 
+
74  std::unique_ptr<LineString> toLineString() const;
+
75 
+
76  inline int compareTo(const Corner& rhs) const {
+
77  double area_lhs = getArea();
+
78  double area_rhs = rhs.getArea();
+
79 
+
80  if (area_lhs == area_rhs) {
+
81  std::size_t index_lhs = getIndex();
+
82  std::size_t index_rhs = rhs.getIndex();
+
83  if (index_lhs == index_rhs) return 0;
+
84  else return index_lhs < index_rhs ? -1 : 1;
+
85  }
+
86  else
+
87  return area_lhs < area_rhs ? -1 : 1;
+
88  }
+
89 
+
90  bool operator< (const Corner& rhs) const {
+
91  return compareTo(rhs) < 0;
+
92  };
+
93 
+
94  bool operator> (const Corner& rhs) const {
+
95  return compareTo(rhs) > 0;
+
96  };
+
97 
+
98  bool operator==(const Corner& rhs) const {
+
99  return compareTo(rhs) == 0;
+
100  };
+
101 
+
102  struct Greater {
+
103  inline bool operator()(const Corner & a, const Corner & b) const {
+
104  return a.compareTo(b) > 0;
+
105  }
+
106  };
+
107 
+
108  // Order using greater for compatibility with the Java PriorityQueue
+
109  // implementation, which returns the smallest item off the top of the
+
110  // queue
+
111  using PriorityQueue = std::priority_queue<Corner, std::vector<Corner>, Corner::Greater>;
+
112 
+
113 
+
114 private:
115 
-
116 
-
117 private:
-
118 
-
119  // members
-
120  const LinkedLine* m_edge;
-
121  std::size_t m_index;
-
122  std::size_t m_prev;
-
123  std::size_t m_next;
-
124  double m_area;
+
116  // members
+
117  const LinkedLine* m_edge;
+
118  std::size_t m_index;
+
119  std::size_t m_prev;
+
120  std::size_t m_next;
+
121  double m_area;
+
122 
+
123  // methods
+
124  static double area(const LinkedLine& edge, std::size_t index);
125 
-
126  // methods
-
127  static double area(const LinkedLine& edge, std::size_t index);
+
126 }; // Corner
+
127 
128 
-
129 }; // Corner
-
130 
+
129 
+
130 GEOS_DLL std::ostream& operator<< (std::ostream& os, const Corner& c);
131 
132 
-
133 GEOS_DLL std::ostream& operator<< (std::ostream& os, const Corner& c);
-
134 
-
135 
-
136 } // geos::coverage
-
137 } // geos
+
133 } // geos::coverage
+
134 } // geos
Coordinate is the lightweight class used to store coordinates.
Definition: Coordinate.h:217
An Envelope defines a rectangulare region of the 2D coordinate plane.
Definition: Envelope.h:59
Definition: LineString.h:66
diff --git a/doxygen/CoverageBoundarySegmentFinder_8h_source.html b/doxygen/CoverageBoundarySegmentFinder_8h_source.html index 93fd4744c0..60ba068aa3 100644 --- a/doxygen/CoverageBoundarySegmentFinder_8h_source.html +++ b/doxygen/CoverageBoundarySegmentFinder_8h_source.html @@ -72,64 +72,62 @@
23 
24 namespace geos {
25 namespace geom {
-
26 class CoordinateSequence;
-
27 class Geometry;
+
26 class CoordinateSequence;
+
27 class Geometry;
28 }
29 }
30 
-
31 using geos::geom::Coordinate;
-
32 using geos::geom::CoordinateSequence;
-
33 using geos::geom::CoordinateSequenceFilter;
-
34 using geos::geom::Geometry;
-
35 using geos::geom::LineSegment;
-
36 
-
37 namespace geos {
-
38 namespace coverage { // geos::coverage
-
39 
-
40 class CoverageBoundarySegmentFinder : public CoordinateSequenceFilter
-
41 {
-
42 
+
31 namespace geos {
+
32 namespace coverage { // geos::coverage
+
33 
+
34 class CoverageBoundarySegmentFinder : public geos::geom::CoordinateSequenceFilter
+
35 {
+
36  using Coordinate = geos::geom::Coordinate;
+
37  using CoordinateSequence = geos::geom::CoordinateSequence;
+
38  using CoordinateSequenceFilter = geos::geom::CoordinateSequenceFilter;
+
39  using Geometry = geos::geom::Geometry;
+
40  using LineSegment = geos::geom::LineSegment;
+
41 
+
42 public:
43 
-
44 public:
-
45 
-
46  CoverageBoundarySegmentFinder(LineSegment::UnorderedSet& segs)
-
47  : m_boundarySegs(segs)
-
48  {};
-
49 
-
50  bool isGeometryChanged() const override {
-
51  return false;
-
52  }
-
53 
-
54  bool isDone() const override {
-
55  return false;
-
56  }
+
44  CoverageBoundarySegmentFinder(LineSegment::UnorderedSet& segs)
+
45  : m_boundarySegs(segs)
+
46  {};
+
47 
+
48  bool isGeometryChanged() const override {
+
49  return false;
+
50  }
+
51 
+
52  bool isDone() const override {
+
53  return false;
+
54  }
+
55 
+
56  void filter_ro(const CoordinateSequence& seq, std::size_t i) override;
57 
-
58  void filter_ro(const CoordinateSequence& seq, std::size_t i) override;
-
59 
-
60 
-
61  static LineSegment::UnorderedSet
-
62  findBoundarySegments(const std::vector<const Geometry*>& geoms);
-
63 
-
64  static bool isBoundarySegment(
-
65  const LineSegment::UnorderedSet& boundarySegs,
-
66  const CoordinateSequence* seq,
-
67  std::size_t i);
+
58 
+
59  static LineSegment::UnorderedSet
+
60  findBoundarySegments(const std::vector<const Geometry*>& geoms);
+
61 
+
62  static bool isBoundarySegment(
+
63  const LineSegment::UnorderedSet& boundarySegs,
+
64  const CoordinateSequence* seq,
+
65  std::size_t i);
+
66 
+
67 private:
68 
-
69 private:
-
70 
-
71  static LineSegment
-
72  createSegment(const CoordinateSequence& seq, std::size_t i);
-
73 
+
69  static LineSegment
+
70  createSegment(const CoordinateSequence& seq, std::size_t i);
+
71 
+
72 
+
73  LineSegment::UnorderedSet& m_boundarySegs;
74 
-
75  LineSegment::UnorderedSet& m_boundarySegs;
-
76 
+
75 
+
76 }; // CoverageBoundarySegmentFinder
77 
-
78 }; // CoverageBoundarySegmentFinder
+
78 
79 
-
80 
-
81 
-
82 } // geos::coverage
-
83 } // geos
+
80 } // geos::coverage
+
81 } // geos
Interface for classes which provide operations that can be applied to the coordinates in a Coordinate...
Definition: CoordinateSequenceFilter.h:56
The internal representation of a list of coordinates inside a Geometry.
Definition: CoordinateSequence.h:56
Coordinate is the lightweight class used to store coordinates.
Definition: Coordinate.h:217
diff --git a/doxygen/CoverageEdge_8h_source.html b/doxygen/CoverageEdge_8h_source.html index c0f98c53a9..cbbb762581 100644 --- a/doxygen/CoverageEdge_8h_source.html +++ b/doxygen/CoverageEdge_8h_source.html @@ -73,26 +73,26 @@
24 // Forward declarations
25 namespace geos {
26 namespace geom {
-
27 class Coordinate;
-
28 class LinearRing;
-
29 class LineString;
-
30 class MultiLineString;
-
31 class GeometryFactory;
+
27 class Coordinate;
+
28 class LinearRing;
+
29 class LineString;
+
30 class MultiLineString;
+
31 class GeometryFactory;
32 }
33 }
34 
-
35 using geos::geom::Coordinate;
-
36 using geos::geom::CoordinateSequence;
-
37 using geos::geom::GeometryFactory;
-
38 using geos::geom::LinearRing;
-
39 using geos::geom::LineString;
-
40 using geos::geom::LineSegment;
-
41 using geos::geom::MultiLineString;
-
42 
-
43 namespace geos { // geos.
-
44 namespace coverage { // geos.coverage
-
45 
-
54 class GEOS_DLL CoverageEdge {
+
35 namespace geos { // geos.
+
36 namespace coverage { // geos.coverage
+
37 
+
46 class GEOS_DLL CoverageEdge {
+
47  using Coordinate = geos::geom::Coordinate;
+
48  using CoordinateSequence = geos::geom::CoordinateSequence;
+
49  using GeometryFactory = geos::geom::GeometryFactory;
+
50  using LinearRing = geos::geom::LinearRing;
+
51  using LineString = geos::geom::LineString;
+
52  using LineSegment = geos::geom::LineSegment;
+
53  using MultiLineString = geos::geom::MultiLineString;
+
54 
55 
56 private:
57 
@@ -163,22 +163,22 @@
144  return m_isFreeRing;
145  }
146 
-
147  void setCoordinates(const CoordinateSequence* pts)
+
147  void setCoordinates(const CoordinateSequence* pts)
148  {
-
149  m_pts = pts->clone();
+
149  m_pts = pts->clone();
150  }
151 
-
152  const CoordinateSequence* getCoordinates() const
+
152  const CoordinateSequence* getCoordinates() const
153  {
154  return m_pts.get();
155  }
156 
-
157  const Coordinate& getEndCoordinate() const
+
157  const Coordinate& getEndCoordinate() const
158  {
159  return m_pts->getAt(m_pts->size() - 1);
160  }
161 
-
162  const Coordinate& getStartCoordinate() const
+
162  const Coordinate& getStartCoordinate() const
163  {
164  return m_pts->getAt(0);
165  }
@@ -188,7 +188,7 @@
169 
170 } // namespace geos.coverage
171 } // namespace geos
-
Definition: CoverageEdge.h:54
+
Definition: CoverageEdge.h:46
static LineSegment key(const CoordinateSequence &ring)
bool isFreeRing() const
Definition: CoverageEdge.h:142
static LineSegment key(const CoordinateSequence &ring, std::size_t start, std::size_t end)
@@ -199,7 +199,6 @@
Definition: LineString.h:66
Models an OGC SFS LinearRing. A LinearRing is a LineString which is both closed and simple.
Definition: LinearRing.h:54
Models a collection of LineStrings.
Definition: MultiLineString.h:49
-
std::unique_ptr< CoordinateSequence > clone() const
Returns a heap-allocated deep copy of this CoordinateSequence.
Basic namespace for all GEOS functionalities.
Definition: Angle.h:25
diff --git a/doxygen/CoverageGapFinder_8h_source.html b/doxygen/CoverageGapFinder_8h_source.html index a5bbd7860e..ce7160a86a 100644 --- a/doxygen/CoverageGapFinder_8h_source.html +++ b/doxygen/CoverageGapFinder_8h_source.html @@ -71,19 +71,19 @@
22 // Forward declarations
23 namespace geos {
24 namespace geom {
-
25 class Geometry;
-
26 class LinearRing;
+
25 class Geometry;
+
26 class LinearRing;
27 }
28 }
29 
-
30 using geos::geom::Geometry;
-
31 using geos::geom::LinearRing;
-
32 
-
33 
-
34 namespace geos { // geos
-
35 namespace coverage { // geos::coverage
-
36 
-
52 class GEOS_DLL CoverageGapFinder {
+
30 
+
31 
+
32 namespace geos { // geos
+
33 namespace coverage { // geos::coverage
+
34 
+
50 class GEOS_DLL CoverageGapFinder {
+
51  using Geometry = geos::geom::Geometry;
+
52  using LinearRing = geos::geom::LinearRing;
53 
54 private:
55 
@@ -118,7 +118,7 @@
104 
105 
106 
-
Definition: CoverageGapFinder.h:52
+
Definition: CoverageGapFinder.h:50
static std::unique_ptr< Geometry > findGaps(std::vector< const Geometry * > &coverage, double gapWidth)
CoverageGapFinder(std::vector< const Geometry * > &coverage)
Definition: CoverageGapFinder.h:68
std::unique_ptr< Geometry > findGaps(double gapWidth)
diff --git a/doxygen/CoveragePolygonValidator_8h_source.html b/doxygen/CoveragePolygonValidator_8h_source.html index 77278a2261..faa8ab3e6a 100644 --- a/doxygen/CoveragePolygonValidator_8h_source.html +++ b/doxygen/CoveragePolygonValidator_8h_source.html @@ -75,222 +75,226 @@
26 // Forward declarations
27 namespace geos {
28 namespace geom {
-
29 class Coordinate;
-
30 class Envelope;
-
31 class Geometry;
-
32 class GeometryFactory;
+
29 class Coordinate;
+
30 class Envelope;
+
31 class Geometry;
+
32 class GeometryFactory;
33 }
34 }
35 
-
36 using geos::geom::Coordinate;
-
37 using geos::geom::Envelope;
-
38 using geos::geom::Geometry;
-
39 using geos::geom::GeometryFactory;
-
40 using geos::geom::LineSegment;
-
41 using geos::algorithm::locate::IndexedPointInAreaLocator;
-
42 
-
43 namespace geos { // geos
-
44 namespace coverage { // geos::coverage
-
45 
-
46 
-
98 class GEOS_DLL CoveragePolygonValidator {
-
99 
-
100 private:
-
101 
-
111  class CoverageRingSegment : public LineSegment
-
112  {
-
113  public:
-
114 
-
115  // Members
-
116  CoverageRing* ringForward;
-
117  std::size_t indexForward;
-
118  CoverageRing* ringOpp;
-
119  std::size_t indexOpp;
-
120 
-
121  CoverageRingSegment(
-
122  const Coordinate& p_p0, const Coordinate& p_p1,
-
123  CoverageRing* p_ring, std::size_t p_index)
-
124  : LineSegment(p_p0, p_p1)
-
125  , ringForward(nullptr)
-
126  , indexForward(0)
-
127  , ringOpp(nullptr)
-
128  , indexOpp(0)
-
129  {
-
130  if (p_p1.compareTo(p_p0) < 0) {
-
131  reverse();
-
132  ringOpp = p_ring;
-
133  indexOpp = p_index;
-
134  }
-
135  else {
-
136  ringForward = p_ring;
-
137  indexForward = p_index;
-
138  }
-
139  };
-
140 
-
141  void match(const CoverageRingSegment* seg) {
-
142  bool isInvalid = checkInvalid(seg);
-
143  if (isInvalid) {
-
144  return;
-
145  }
-
146  //-- record the match
-
147  if (ringForward == nullptr) {
-
148  ringForward = seg->ringForward;
-
149  indexForward = seg->indexForward;
-
150  }
-
151  else {
-
152  ringOpp = seg->ringOpp;
-
153  indexOpp = seg->indexOpp;
-
154  }
-
155  //-- mark ring segments as matched
-
156  ringForward->markMatched(indexForward);
-
157  ringOpp->markMatched(indexOpp);
-
158  }
-
159 
-
160  bool checkInvalid(const CoverageRingSegment* seg) const {
-
161  if (ringForward != nullptr && seg->ringForward != nullptr) {
-
162  ringForward->markInvalid(indexForward);
-
163  seg->ringForward->markInvalid(seg->indexForward);
-
164  return true;
-
165  }
-
166  if (ringOpp != nullptr && seg->ringOpp != nullptr) {
-
167  ringOpp->markInvalid(indexOpp);
-
168  seg->ringOpp->markInvalid(seg->indexOpp);
-
169  return true;
-
170  }
-
171  return false;
-
172  }
-
173 
-
174  struct CoverageRingSegHash {
-
175  std::size_t
-
176  operator() (CoverageRingSegment const* s) const {
-
177  std::size_t h = std::hash<double>{}(s->p0.x);
-
178  h ^= (std::hash<double>{}(s->p0.y) << 1);
-
179  h ^= (std::hash<double>{}(s->p1.x) << 1);
-
180  return h ^ (std::hash<double>{}(s->p1.y) << 1);
-
181  }
-
182  };
-
183 
-
184  struct CoverageRingSegEq {
-
185  bool
-
186  operator() (CoverageRingSegment const* lhs, CoverageRingSegment const* rhs) const {
-
187  return lhs->p0.x == rhs->p0.x
-
188  && lhs->p0.y == rhs->p0.y
-
189  && lhs->p1.x == rhs->p1.x
-
190  && lhs->p1.y == rhs->p1.y;
-
191  }
-
192  };
-
193 
-
194  };
-
195 
-
196  // Members
-
197  const Geometry* targetGeom;
-
198  std::vector<const Geometry*> adjGeoms;
-
199  //std::vector<const Polygon*> m_adjPolygons;
-
200  const GeometryFactory* geomFactory;
-
201  double gapWidth = 0.0;
-
202  std::vector<std::unique_ptr<CoveragePolygon>> m_adjCovPolygons;
-
203  std::deque<CoverageRing> coverageRingStore;
-
204  std::vector<std::unique_ptr<CoordinateSequence>> localCoordinateSequences;
-
205  std::deque<CoverageRingSegment> coverageRingSegmentStore;
-
206 
-
207  typedef std::unordered_map<CoverageRingSegment*, CoverageRingSegment*, CoverageRingSegment::CoverageRingSegHash, CoverageRingSegment::CoverageRingSegEq> CoverageRingSegmentMap;
-
208 
-
209  // Declare type as noncopyable
-
210  CoveragePolygonValidator(const CoveragePolygonValidator& other) = delete;
-
211  CoveragePolygonValidator& operator=(const CoveragePolygonValidator& rhs) = delete;
-
212 
-
213 public:
-
214 
-
223  static std::unique_ptr<Geometry> validate(
-
224  const Geometry* targetPolygon,
-
225  std::vector<const Geometry*>& adjPolygons);
-
226 
-
240  static std::unique_ptr<Geometry> validate(
-
241  const Geometry* targetPolygon,
-
242  std::vector<const Geometry*>& adjPolygons,
-
243  double gapWidth);
-
244 
-
255  CoveragePolygonValidator(
-
256  const Geometry* targetPolygon,
-
257  std::vector<const Geometry*>& adjPolygons);
-
258 
-
264  void setGapWidth(double p_gapWidth);
-
265 
-
272  std::unique_ptr<Geometry> validate();
-
273 
-
274 private:
-
275 
-
276  static std::vector<std::unique_ptr<CoveragePolygon>>
-
277  toCoveragePolygons(const std::vector<const Polygon*> polygons);
-
278  static std::vector<const Polygon*> extractPolygons(std::vector<const Geometry*>& geoms);
-
279 
-
280  /* private */
-
281  std::unique_ptr<Geometry> createEmptyResult();
+
36 
+
37 namespace geos { // geos
+
38 namespace coverage { // geos::coverage
+
39 
+
40 
+
92 class GEOS_DLL CoveragePolygonValidator {
+
93  using Coordinate = geos::geom::Coordinate;
+
94  using CoordinateSequence = geos::geom::CoordinateSequence;
+
95  using Envelope = geos::geom::Envelope;
+
96  using Polygon = geos::geom::Polygon;
+
97  using LinearRing = geos::geom::LinearRing;
+
98  using Geometry = geos::geom::Geometry;
+
99  using GeometryFactory = geos::geom::GeometryFactory;
+
100  using LineSegment = geos::geom::LineSegment;
+
101  using IndexedPointInAreaLocator = geos::algorithm::locate::IndexedPointInAreaLocator;
+
102 
+
103 private:
+
104 
+
114  class CoverageRingSegment : public LineSegment
+
115  {
+
116  public:
+
117 
+
118  // Members
+
119  CoverageRing* ringForward;
+
120  std::size_t indexForward;
+
121  CoverageRing* ringOpp;
+
122  std::size_t indexOpp;
+
123 
+
124  CoverageRingSegment(
+
125  const Coordinate& p_p0, const Coordinate& p_p1,
+
126  CoverageRing* p_ring, std::size_t p_index)
+
127  : LineSegment(p_p0, p_p1)
+
128  , ringForward(nullptr)
+
129  , indexForward(0)
+
130  , ringOpp(nullptr)
+
131  , indexOpp(0)
+
132  {
+
133  if (p_p1.compareTo(p_p0) < 0) {
+
134  reverse();
+
135  ringOpp = p_ring;
+
136  indexOpp = p_index;
+
137  }
+
138  else {
+
139  ringForward = p_ring;
+
140  indexForward = p_index;
+
141  }
+
142  };
+
143 
+
144  void match(const CoverageRingSegment* seg) {
+
145  bool isInvalid = checkInvalid(seg);
+
146  if (isInvalid) {
+
147  return;
+
148  }
+
149  //-- record the match
+
150  if (ringForward == nullptr) {
+
151  ringForward = seg->ringForward;
+
152  indexForward = seg->indexForward;
+
153  }
+
154  else {
+
155  ringOpp = seg->ringOpp;
+
156  indexOpp = seg->indexOpp;
+
157  }
+
158  //-- mark ring segments as matched
+
159  ringForward->markMatched(indexForward);
+
160  ringOpp->markMatched(indexOpp);
+
161  }
+
162 
+
163  bool checkInvalid(const CoverageRingSegment* seg) const {
+
164  if (ringForward != nullptr && seg->ringForward != nullptr) {
+
165  ringForward->markInvalid(indexForward);
+
166  seg->ringForward->markInvalid(seg->indexForward);
+
167  return true;
+
168  }
+
169  if (ringOpp != nullptr && seg->ringOpp != nullptr) {
+
170  ringOpp->markInvalid(indexOpp);
+
171  seg->ringOpp->markInvalid(seg->indexOpp);
+
172  return true;
+
173  }
+
174  return false;
+
175  }
+
176 
+
177  struct CoverageRingSegHash {
+
178  std::size_t
+
179  operator() (CoverageRingSegment const* s) const {
+
180  std::size_t h = std::hash<double>{}(s->p0.x);
+
181  h ^= (std::hash<double>{}(s->p0.y) << 1);
+
182  h ^= (std::hash<double>{}(s->p1.x) << 1);
+
183  return h ^ (std::hash<double>{}(s->p1.y) << 1);
+
184  }
+
185  };
+
186 
+
187  struct CoverageRingSegEq {
+
188  bool
+
189  operator() (CoverageRingSegment const* lhs, CoverageRingSegment const* rhs) const {
+
190  return lhs->p0.x == rhs->p0.x
+
191  && lhs->p0.y == rhs->p0.y
+
192  && lhs->p1.x == rhs->p1.x
+
193  && lhs->p1.y == rhs->p1.y;
+
194  }
+
195  };
+
196 
+
197  };
+
198 
+
199  // Members
+
200  const Geometry* targetGeom;
+
201  std::vector<const Geometry*> adjGeoms;
+
202  //std::vector<const Polygon*> m_adjPolygons;
+
203  const GeometryFactory* geomFactory;
+
204  double gapWidth = 0.0;
+
205  std::vector<std::unique_ptr<CoveragePolygon>> m_adjCovPolygons;
+
206  std::deque<CoverageRing> coverageRingStore;
+
207  std::vector<std::unique_ptr<CoordinateSequence>> localCoordinateSequences;
+
208  std::deque<CoverageRingSegment> coverageRingSegmentStore;
+
209 
+
210  typedef std::unordered_map<CoverageRingSegment*, CoverageRingSegment*, CoverageRingSegment::CoverageRingSegHash, CoverageRingSegment::CoverageRingSegEq> CoverageRingSegmentMap;
+
211 
+
212  // Declare type as noncopyable
+
213  CoveragePolygonValidator(const CoveragePolygonValidator& other) = delete;
+
214  CoveragePolygonValidator& operator=(const CoveragePolygonValidator& rhs) = delete;
+
215 
+
216 public:
+
217 
+
226  static std::unique_ptr<Geometry> validate(
+
227  const Geometry* targetPolygon,
+
228  std::vector<const Geometry*>& adjPolygons);
+
229 
+
243  static std::unique_ptr<Geometry> validate(
+
244  const Geometry* targetPolygon,
+
245  std::vector<const Geometry*>& adjPolygons,
+
246  double gapWidth);
+
247 
+
258  CoveragePolygonValidator(
+
259  const Geometry* targetPolygon,
+
260  std::vector<const Geometry*>& adjPolygons);
+
261 
+
267  void setGapWidth(double p_gapWidth);
+
268 
+
275  std::unique_ptr<Geometry> validate();
+
276 
+
277 private:
+
278 
+
279  static std::vector<std::unique_ptr<CoveragePolygon>>
+
280  toCoveragePolygons(const std::vector<const Polygon*> polygons);
+
281  static std::vector<const Polygon*> extractPolygons(std::vector<const Geometry*>& geoms);
282 
-
300  void markMatchedSegments(
-
301  std::vector<CoverageRing*>& targetRings,
-
302  std::vector<CoverageRing*>& adjRings,
-
303  const Envelope& targetEnv);
-
304 
-
314  void markMatchedSegments(
-
315  std::vector<CoverageRing*>& rings,
-
316  const Envelope& envLimit,
-
317  CoverageRingSegmentMap& segmentMap);
-
318 
-
319  CoverageRingSegment* createCoverageRingSegment(
-
320  CoverageRing* ring, std::size_t index);
+
283  /* private */
+
284  std::unique_ptr<Geometry> createEmptyResult();
+
285 
+
303  void markMatchedSegments(
+
304  std::vector<CoverageRing*>& targetRings,
+
305  std::vector<CoverageRing*>& adjRings,
+
306  const Envelope& targetEnv);
+
307 
+
317  void markMatchedSegments(
+
318  std::vector<CoverageRing*>& rings,
+
319  const Envelope& envLimit,
+
320  CoverageRingSegmentMap& segmentMap);
321 
-
331  void markInvalidInteractingSegments(
-
332  std::vector<CoverageRing*>& targetRings,
-
333  std::vector<CoverageRing*>& adjRings,
-
334  double distanceTolerance);
-
335 
-
343  void markInvalidInteriorSegments(
-
344  std::vector<CoverageRing*>& targetRings,
-
345  std::vector<std::unique_ptr<CoveragePolygon>>& adjCovPolygons);
-
346 
-
347  void markInvalidInteriorSection(
-
348  CoverageRing& ring,
-
349  std::size_t iStart,
-
350  std::size_t iEnd,
-
351  std::vector<std::unique_ptr<CoveragePolygon>>& adjCovPolygons );
-
352 
-
353  void markInvalidInteriorSegment(
-
354  CoverageRing& ring, std::size_t i, CoveragePolygon* adjPoly);
+
322  CoverageRingSegment* createCoverageRingSegment(
+
323  CoverageRing* ring, std::size_t index);
+
324 
+
334  void markInvalidInteractingSegments(
+
335  std::vector<CoverageRing*>& targetRings,
+
336  std::vector<CoverageRing*>& adjRings,
+
337  double distanceTolerance);
+
338 
+
346  void markInvalidInteriorSegments(
+
347  std::vector<CoverageRing*>& targetRings,
+
348  std::vector<std::unique_ptr<CoveragePolygon>>& adjCovPolygons);
+
349 
+
350  void markInvalidInteriorSection(
+
351  CoverageRing& ring,
+
352  std::size_t iStart,
+
353  std::size_t iEnd,
+
354  std::vector<std::unique_ptr<CoveragePolygon>>& adjCovPolygons );
355 
-
356  void checkTargetRings(
-
357  std::vector<CoverageRing*>& targetRings,
-
358  std::vector<CoverageRing*>& adjRngs,
-
359  const Envelope& targetEnv);
-
360 
-
361  std::unique_ptr<Geometry> createInvalidLines(std::vector<CoverageRing*>& rings);
-
362 
-
363  std::vector<CoverageRing*> createRings(const Geometry* geom);
-
364 
-
365  std::vector<CoverageRing*> createRings(std::vector<const Polygon*>& polygons);
-
366 
-
367  void createRings(const Polygon* poly, std::vector<CoverageRing*>& rings);
-
368 
-
369  void addRing(
-
370  const LinearRing* ring,
-
371  bool isShell,
-
372  std::vector<CoverageRing*>& rings);
-
373 
-
374  CoverageRing* createRing(const LinearRing* ring, bool isShell);
-
375 
+
356  void markInvalidInteriorSegment(
+
357  CoverageRing& ring, std::size_t i, CoveragePolygon* adjPoly);
+
358 
+
359  void checkTargetRings(
+
360  std::vector<CoverageRing*>& targetRings,
+
361  std::vector<CoverageRing*>& adjRngs,
+
362  const Envelope& targetEnv);
+
363 
+
364  std::unique_ptr<Geometry> createInvalidLines(std::vector<CoverageRing*>& rings);
+
365 
+
366  std::vector<CoverageRing*> createRings(const Geometry* geom);
+
367 
+
368  std::vector<CoverageRing*> createRings(std::vector<const Polygon*>& polygons);
+
369 
+
370  void createRings(const Polygon* poly, std::vector<CoverageRing*>& rings);
+
371 
+
372  void addRing(
+
373  const LinearRing* ring,
+
374  bool isShell,
+
375  std::vector<CoverageRing*>& rings);
376 
-
377 
-
378 };
+
377  CoverageRing* createRing(const LinearRing* ring, bool isShell);
+
378 
379 
-
380 } // namespace geos::coverage
-
381 } // namespace geos
+
380 
+
381 };
+
382 
+
383 } // namespace geos::coverage
+
384 } // namespace geos
Determines the location of Coordinates relative to an areal geometry, using indexing for efficiency.
Definition: IndexedPointInAreaLocator.h:54
-
Definition: CoveragePolygonValidator.h:98
+
Definition: CoveragePolygonValidator.h:92
std::unique_ptr< Geometry > validate()
static std::unique_ptr< Geometry > validate(const Geometry *targetPolygon, std::vector< const Geometry * > &adjPolygons, double gapWidth)
void setGapWidth(double p_gapWidth)
static std::unique_ptr< Geometry > validate(const Geometry *targetPolygon, std::vector< const Geometry * > &adjPolygons)
CoveragePolygonValidator(const Geometry *targetPolygon, std::vector< const Geometry * > &adjPolygons)
+
The internal representation of a list of coordinates inside a Geometry.
Definition: CoordinateSequence.h:56
Coordinate is the lightweight class used to store coordinates.
Definition: Coordinate.h:217
An Envelope defines a rectangulare region of the 2D coordinate plane.
Definition: Envelope.h:59
Supplies a set of utility methods for building Geometry objects from CoordinateSequence or other Geom...
Definition: GeometryFactory.h:70
diff --git a/doxygen/CoveragePolygon_8h_source.html b/doxygen/CoveragePolygon_8h_source.html index 49cff60ef7..b8459ba868 100644 --- a/doxygen/CoveragePolygon_8h_source.html +++ b/doxygen/CoveragePolygon_8h_source.html @@ -69,41 +69,40 @@
20 namespace geos {
21 namespace geom {
22 class Coordinate;
-
23 class Envelope;
-
24 class Polygon;
+
23 class Envelope;
+
24 class Polygon;
25 }
26 }
27 
-
28 using geos::geom::CoordinateXY;
-
29 using geos::geom::Envelope;
-
30 using geos::geom::Polygon;
-
31 using geos::algorithm::locate::IndexedPointInAreaLocator;
-
32 
-
33 namespace geos { // geos
-
34 namespace coverage { // geos::coverage
-
35 
-
36 class GEOS_DLL CoveragePolygon {
-
37 
-
38  // Members
-
39  const Polygon* m_polygon;
-
40  Envelope polyEnv;
-
41  mutable std::unique_ptr<IndexedPointInAreaLocator> m_locator;
-
42 
-
43 public:
-
44  CoveragePolygon(const Polygon* poly);
-
45 
-
46  bool intersectsEnv(const Envelope& env) const;
-
47  bool intersectsEnv(const CoordinateXY& p) const;
-
48  bool contains(const CoordinateXY& p) const;
-
49 
-
50 private:
-
51  IndexedPointInAreaLocator& getLocator() const;
-
52 
-
53 };
-
54 
-
55 } // namespace geos::coverage
-
56 } // namespace geos
-
57 
+
28 namespace geos { // geos
+
29 namespace coverage { // geos::coverage
+
30 
+
31 class GEOS_DLL CoveragePolygon {
+
32  using CoordinateXY = geos::geom::CoordinateXY;
+
33  using Envelope = geos::geom::Envelope;
+
34  using Polygon = geos::geom::Polygon;
+
35  using IndexedPointInAreaLocator = geos::algorithm::locate::IndexedPointInAreaLocator;
+
36 
+
37  // Members
+
38  const Polygon* m_polygon;
+
39  Envelope polyEnv;
+
40  mutable std::unique_ptr<IndexedPointInAreaLocator> m_locator;
+
41 
+
42 public:
+
43  CoveragePolygon(const Polygon* poly);
+
44 
+
45  bool intersectsEnv(const Envelope& env) const;
+
46  bool intersectsEnv(const CoordinateXY& p) const;
+
47  bool contains(const CoordinateXY& p) const;
+
48 
+
49 private:
+
50  IndexedPointInAreaLocator& getLocator() const;
+
51 
+
52 };
+
53 
+
54 } // namespace geos::coverage
+
55 } // namespace geos
+
56 
Determines the location of Coordinates relative to an areal geometry, using indexing for efficiency.
Definition: IndexedPointInAreaLocator.h:54
An Envelope defines a rectangulare region of the 2D coordinate plane.
Definition: Envelope.h:59
Represents a linear polygon, which may include holes.
Definition: Polygon.h:61
diff --git a/doxygen/CoverageRingEdges_8h_source.html b/doxygen/CoverageRingEdges_8h_source.html index ec5e3732bf..08565e220c 100644 --- a/doxygen/CoverageRingEdges_8h_source.html +++ b/doxygen/CoverageRingEdges_8h_source.html @@ -74,130 +74,129 @@
25 // Forward declarations
26 namespace geos {
27 namespace geom {
-
28 class CoordinateSequence;
-
29 class Geometry;
-
30 class LinearRing;
-
31 class MultiPolygon;
-
32 class Polygon;
+
28 class CoordinateSequence;
+
29 class Geometry;
+
30 class LinearRing;
+
31 class MultiPolygon;
+
32 class Polygon;
33 }
34 namespace coverage {
35 class CoverageEdge;
36 }
37 }
38 
-
39 using geos::geom::Coordinate;
-
40 using geos::geom::CoordinateSequence;
-
41 using geos::geom::Geometry;
-
42 using geos::geom::LinearRing;
-
43 using geos::geom::LineSegment;
-
44 using geos::geom::MultiPolygon;
-
45 using geos::geom::Polygon;
-
46 
-
47 namespace geos { // geos
-
48 namespace coverage { // geos.coverage
-
49 
-
60 class GEOS_DLL CoverageRingEdges {
-
61 
-
62 private:
-
63 
-
64  // Members
-
65  const std::vector<const Geometry*>& m_coverage;
-
66  std::map<const LinearRing*, std::vector<CoverageEdge*>> m_ringEdgesMap;
-
67  std::vector<CoverageEdge*> m_edges;
-
68  std::vector<std::unique_ptr<CoverageEdge>> m_edgeStore;
-
69 
-
70  /* Turn off copy constructors for MSVC */
-
71  CoverageRingEdges(const CoverageRingEdges&) = delete;
-
72  CoverageRingEdges& operator=(const CoverageRingEdges&) = delete;
-
73 
-
74 public:
-
75 
-
76  CoverageRingEdges(const std::vector<const Geometry*>& coverage)
-
77  : m_coverage(coverage)
-
78  {
-
79  build();
-
80  };
+
39 namespace geos { // geos
+
40 namespace coverage { // geos.coverage
+
41 
+
52 class GEOS_DLL CoverageRingEdges {
+
53  using Coordinate = geos::geom::Coordinate;
+
54  using CoordinateSequence = geos::geom::CoordinateSequence;
+
55  using Geometry = geos::geom::Geometry;
+
56  using LinearRing = geos::geom::LinearRing;
+
57  using LineSegment = geos::geom::LineSegment;
+
58  using MultiPolygon = geos::geom::MultiPolygon;
+
59  using Polygon = geos::geom::Polygon;
+
60 
+
61 private:
+
62 
+
63  // Members
+
64  const std::vector<const Geometry*>& m_coverage;
+
65  std::map<const LinearRing*, std::vector<CoverageEdge*>> m_ringEdgesMap;
+
66  std::vector<CoverageEdge*> m_edges;
+
67  std::vector<std::unique_ptr<CoverageEdge>> m_edgeStore;
+
68 
+
69  /* Turn off copy constructors for MSVC */
+
70  CoverageRingEdges(const CoverageRingEdges&) = delete;
+
71  CoverageRingEdges& operator=(const CoverageRingEdges&) = delete;
+
72 
+
73 public:
+
74 
+
75  CoverageRingEdges(const std::vector<const Geometry*>& coverage)
+
76  : m_coverage(coverage)
+
77  {
+
78  build();
+
79  };
+
80 
81 
-
82 
-
83  std::vector<CoverageEdge*>& getEdges()
-
84  {
-
85  return m_edges;
-
86  };
-
87 
-
94  std::vector<CoverageEdge*> selectEdges(
-
95  std::size_t ringCount) const;
-
96 
-
102  std::vector<std::unique_ptr<Geometry>> buildCoverage() const;
+
82  std::vector<CoverageEdge*>& getEdges()
+
83  {
+
84  return m_edges;
+
85  };
+
86 
+
93  std::vector<CoverageEdge*> selectEdges(
+
94  std::size_t ringCount) const;
+
95 
+
101  std::vector<std::unique_ptr<Geometry>> buildCoverage() const;
+
102 
103 
-
104 
-
105 private:
-
106 
-
107  void build();
-
108 
-
109  void addRingEdges(
-
110  const LinearRing* ring,
-
111  Coordinate::UnorderedSet& nodes,
-
112  LineSegment::UnorderedSet& boundarySegs,
-
113  std::map<LineSegment, CoverageEdge*>& uniqueEdgeMap);
-
114 
-
115  void addBoundaryInnerNodes(
-
116  const LinearRing* ring,
-
117  LineSegment::UnorderedSet& boundarySegs,
-
118  Coordinate::UnorderedSet& nodes);
-
119 
-
120  std::vector<CoverageEdge*> extractRingEdges(
-
121  const LinearRing* ring,
-
122  std::map<LineSegment, CoverageEdge*>& uniqueEdgeMap,
-
123  Coordinate::UnorderedSet& nodes);
-
124 
-
125  CoverageEdge* createEdge(
-
126  const CoordinateSequence& ring,
-
127  std::map<LineSegment, CoverageEdge*>& uniqueEdgeMap);
-
128 
-
129  CoverageEdge* createEdge(
-
130  const CoordinateSequence& ring,
-
131  std::size_t start, std::size_t end,
-
132  std::map<LineSegment, CoverageEdge*>& uniqueEdgeMap);
-
133 
-
134  std::size_t findNextNodeIndex(
-
135  const CoordinateSequence& ring,
-
136  std::size_t start,
-
137  Coordinate::UnorderedSet& nodes) const;
-
138 
-
139  static std::size_t next(
-
140  std::size_t index,
-
141  const CoordinateSequence& ring);
-
142 
-
143  Coordinate::UnorderedSet findMultiRingNodes(
-
144  const std::vector<const Geometry*>& coverage);
-
145 
-
146  Coordinate::UnorderedSet findBoundaryNodes(
-
147  LineSegment::UnorderedSet& lineSegments);
-
148 
-
149  std::unique_ptr<Geometry> buildPolygonal(
-
150  const Geometry* geom) const;
-
151 
-
152  std::unique_ptr<Geometry> buildMultiPolygon(
-
153  const MultiPolygon* geom) const;
-
154 
-
155  std::unique_ptr<Polygon> buildPolygon(
-
156  const Polygon* polygon) const;
-
157 
-
158  std::unique_ptr<LinearRing> buildRing(
-
159  const LinearRing* ring) const;
-
160 
-
161  bool isEdgeDirForward(
-
162  const std::vector<CoverageEdge*>& ringEdges,
-
163  std::size_t index,
-
164  const Coordinate& prevPt) const;
+
104 private:
+
105 
+
106  void build();
+
107 
+
108  void addRingEdges(
+
109  const LinearRing* ring,
+
110  Coordinate::UnorderedSet& nodes,
+
111  LineSegment::UnorderedSet& boundarySegs,
+
112  std::map<LineSegment, CoverageEdge*>& uniqueEdgeMap);
+
113 
+
114  void addBoundaryInnerNodes(
+
115  const LinearRing* ring,
+
116  LineSegment::UnorderedSet& boundarySegs,
+
117  Coordinate::UnorderedSet& nodes);
+
118 
+
119  std::vector<CoverageEdge*> extractRingEdges(
+
120  const LinearRing* ring,
+
121  std::map<LineSegment, CoverageEdge*>& uniqueEdgeMap,
+
122  Coordinate::UnorderedSet& nodes);
+
123 
+
124  CoverageEdge* createEdge(
+
125  const CoordinateSequence& ring,
+
126  std::map<LineSegment, CoverageEdge*>& uniqueEdgeMap);
+
127 
+
128  CoverageEdge* createEdge(
+
129  const CoordinateSequence& ring,
+
130  std::size_t start, std::size_t end,
+
131  std::map<LineSegment, CoverageEdge*>& uniqueEdgeMap);
+
132 
+
133  std::size_t findNextNodeIndex(
+
134  const CoordinateSequence& ring,
+
135  std::size_t start,
+
136  Coordinate::UnorderedSet& nodes) const;
+
137 
+
138  static std::size_t next(
+
139  std::size_t index,
+
140  const CoordinateSequence& ring);
+
141 
+
142  Coordinate::UnorderedSet findMultiRingNodes(
+
143  const std::vector<const Geometry*>& coverage);
+
144 
+
145  Coordinate::UnorderedSet findBoundaryNodes(
+
146  LineSegment::UnorderedSet& lineSegments);
+
147 
+
148  std::unique_ptr<Geometry> buildPolygonal(
+
149  const Geometry* geom) const;
+
150 
+
151  std::unique_ptr<Geometry> buildMultiPolygon(
+
152  const MultiPolygon* geom) const;
+
153 
+
154  std::unique_ptr<Polygon> buildPolygon(
+
155  const Polygon* polygon) const;
+
156 
+
157  std::unique_ptr<LinearRing> buildRing(
+
158  const LinearRing* ring) const;
+
159 
+
160  bool isEdgeDirForward(
+
161  const std::vector<CoverageEdge*>& ringEdges,
+
162  std::size_t index,
+
163  const Coordinate& prevPt) const;
+
164 
165 
-
166 
-
167 };
-
168 
-
169 } // namespace geos.coverage
-
170 } // namespace geos
-
Definition: CoverageEdge.h:54
-
Definition: CoverageRingEdges.h:60
+
166 };
+
167 
+
168 } // namespace geos.coverage
+
169 } // namespace geos
+
Definition: CoverageEdge.h:46
+
Definition: CoverageRingEdges.h:52
std::vector< CoverageEdge * > selectEdges(std::size_t ringCount) const
std::vector< std::unique_ptr< Geometry > > buildCoverage() const
The internal representation of a list of coordinates inside a Geometry.
Definition: CoordinateSequence.h:56
diff --git a/doxygen/CoverageRing_8h_source.html b/doxygen/CoverageRing_8h_source.html index 54730448d8..c268e63a6f 100644 --- a/doxygen/CoverageRing_8h_source.html +++ b/doxygen/CoverageRing_8h_source.html @@ -70,100 +70,99 @@
21 // Forward declarations
22 namespace geos {
23 namespace geom {
-
24 class Coordinate;
-
25 class CoordinateSequence;
-
26 class Geometry;
-
27 class GeometryFactory;
-
28 class LineString;
-
29 class LinearRing;
-
30 class Polygon;
+
24 class Coordinate;
+
25 class CoordinateSequence;
+
26 class Geometry;
+
27 class GeometryFactory;
+
28 class LineString;
+
29 class LinearRing;
+
30 class Polygon;
31 }
32 }
33 
-
34 using geos::geom::Coordinate;
-
35 using geos::geom::CoordinateSequence;
-
36 using geos::geom::Geometry;
-
37 using geos::geom::GeometryFactory;
-
38 using geos::geom::Polygon;
-
39 using geos::geom::LineString;
-
40 using geos::geom::LinearRing;
-
41 
-
42 namespace geos { // geos.
-
43 namespace coverage { // geos.coverage
-
44 
-
45 class GEOS_DLL CoverageRing : public noding::BasicSegmentString {
-
46 
-
47 private:
-
48 
-
49  // Members
-
50  bool m_isInteriorOnRight;
-
51  std::vector<bool> m_isInvalid;
-
52  std::vector<bool> m_isMatched;
-
53 
-
54  std::size_t findInvalidStart(std::size_t index);
-
55 
-
56  std::size_t findInvalidEnd(std::size_t index);
-
57 
-
58  std::size_t nextMarkIndex(std::size_t index);
-
59 
-
69  std::unique_ptr<LineString> createLine(
-
70  std::size_t startIndex,
-
71  std::size_t endIndex,
-
72  const GeometryFactory* geomFactory);
-
73 
-
74  std::unique_ptr<CoordinateSequence> extractSection(
-
75  std::size_t startIndex, std::size_t endIndex);
-
76 
-
77  std::unique_ptr<CoordinateSequence> extractSectionWrap(
-
78  std::size_t startIndex, std::size_t endIndex);
-
79 
-
80 public:
-
81 
-
82  CoverageRing(CoordinateSequence* pts, bool interiorOnRight);
-
83 
-
84  CoverageRing(const LinearRing* ring, bool isShell);
-
85 
-
86  geom::Envelope getEnvelope(std::size_t start, std::size_t end);
-
87 
-
95  static bool isKnown(std::vector<CoverageRing*>& rings);
-
96 
-
103  bool isInteriorOnRight() const;
-
104 
-
110  void markInvalid(std::size_t index);
-
111 
-
117  void markMatched(std::size_t index);
-
118 
-
125  bool isKnown() const;
-
126 
-
133  bool isInvalid(std::size_t i) const;
-
134 
-
140  bool isInvalid() const;
-
141 
-
147  bool hasInvalid() const;
-
148 
-
155  bool isKnown(std::size_t i) const;
-
156 
-
165  const Coordinate& findVertexPrev(std::size_t index, const Coordinate& pt) const;
-
166 
-
175  const Coordinate& findVertexNext(std::size_t index, const Coordinate& pt) const;
-
176 
-
183  std::size_t prev(std::size_t index) const;
-
184 
-
191  std::size_t next(std::size_t index) const;
-
192 
-
193  void createInvalidLines(
-
194  const GeometryFactory* geomFactory,
-
195  std::vector<std::unique_ptr<LineString>>& lines);
-
196 
-
197 };
-
198 
-
199 } // namespace geos.coverage
-
200 } // namespace geos
+
34 namespace geos { // geos.
+
35 namespace coverage { // geos.coverage
+
36 
+
37 class GEOS_DLL CoverageRing : public noding::BasicSegmentString {
+
38  using Coordinate = geos::geom::Coordinate;
+
39  using CoordinateSequence = geos::geom::CoordinateSequence;
+
40  using Geometry = geos::geom::Geometry;
+
41  using GeometryFactory = geos::geom::GeometryFactory;
+
42  using Polygon = geos::geom::Polygon;
+
43  using LineString = geos::geom::LineString;
+
44  using LinearRing = geos::geom::LinearRing;
+
45 
+
46 private:
+
47 
+
48  // Members
+
49  bool m_isInteriorOnRight;
+
50  std::vector<bool> m_isInvalid;
+
51  std::vector<bool> m_isMatched;
+
52 
+
53  std::size_t findInvalidStart(std::size_t index);
+
54 
+
55  std::size_t findInvalidEnd(std::size_t index);
+
56 
+
57  std::size_t nextMarkIndex(std::size_t index);
+
58 
+
68  std::unique_ptr<LineString> createLine(
+
69  std::size_t startIndex,
+
70  std::size_t endIndex,
+
71  const GeometryFactory* geomFactory);
+
72 
+
73  std::unique_ptr<CoordinateSequence> extractSection(
+
74  std::size_t startIndex, std::size_t endIndex);
+
75 
+
76  std::unique_ptr<CoordinateSequence> extractSectionWrap(
+
77  std::size_t startIndex, std::size_t endIndex);
+
78 
+
79 public:
+
80 
+
81  CoverageRing(CoordinateSequence* pts, bool interiorOnRight);
+
82 
+
83  CoverageRing(const LinearRing* ring, bool isShell);
+
84 
+
85  geom::Envelope getEnvelope(std::size_t start, std::size_t end);
+
86 
+
94  static bool isKnown(std::vector<CoverageRing*>& rings);
+
95 
+
102  bool isInteriorOnRight() const;
+
103 
+
109  void markInvalid(std::size_t index);
+
110 
+
116  void markMatched(std::size_t index);
+
117 
+
124  bool isKnown() const;
+
125 
+
132  bool isInvalid(std::size_t i) const;
+
133 
+
139  bool isInvalid() const;
+
140 
+
146  bool hasInvalid() const;
+
147 
+
154  bool isKnown(std::size_t i) const;
+
155 
+
164  const Coordinate& findVertexPrev(std::size_t index, const Coordinate& pt) const;
+
165 
+
174  const Coordinate& findVertexNext(std::size_t index, const Coordinate& pt) const;
+
175 
+
182  std::size_t prev(std::size_t index) const;
+
183 
+
190  std::size_t next(std::size_t index) const;
+
191 
+
192  void createInvalidLines(
+
193  const GeometryFactory* geomFactory,
+
194  std::vector<std::unique_ptr<LineString>>& lines);
+
195 
+
196 };
+
197 
+
198 } // namespace geos.coverage
+
199 } // namespace geos
+
200 
201 
202 
203 
204 
-
205 
The internal representation of a list of coordinates inside a Geometry.
Definition: CoordinateSequence.h:56
Coordinate is the lightweight class used to store coordinates.
Definition: Coordinate.h:217
Supplies a set of utility methods for building Geometry objects from CoordinateSequence or other Geom...
Definition: GeometryFactory.h:70
diff --git a/doxygen/CoverageSimplifier_8h_source.html b/doxygen/CoverageSimplifier_8h_source.html index f9263556d7..0dc7f04653 100644 --- a/doxygen/CoverageSimplifier_8h_source.html +++ b/doxygen/CoverageSimplifier_8h_source.html @@ -72,82 +72,78 @@
23 
24 namespace geos {
25 namespace geom {
-
26 class Geometry;
-
27 class GeometryFactory;
-
28 class MultiLineString;
+
26 class Geometry;
+
27 class GeometryFactory;
+
28 class MultiLineString;
29 }
30 namespace coverage {
-
31 class CoverageEdge;
+
31 class CoverageEdge;
32 }
33 }
34 
-
35 
-
36 using geos::coverage::CoverageEdge;
-
37 using geos::geom::Geometry;
-
38 using geos::geom::GeometryFactory;
-
39 using geos::geom::MultiLineString;
-
40 
-
41 
-
42 namespace geos {
-
43 namespace coverage { // geos::coverage
-
44 
-
76 class GEOS_DLL CoverageSimplifier {
-
77 
-
78 
-
79 public:
-
80 
-
86  CoverageSimplifier(const std::vector<const Geometry*>& coverage);
-
87 
-
96  static std::vector<std::unique_ptr<Geometry>> simplify(
-
97  std::vector<const Geometry*>& coverage,
+
35 namespace geos {
+
36 namespace coverage { // geos::coverage
+
37 
+
69 class GEOS_DLL CoverageSimplifier {
+
70  using CoverageEdge = geos::coverage::CoverageEdge;
+
71  using Geometry = geos::geom::Geometry;
+
72  using GeometryFactory = geos::geom::GeometryFactory;
+
73  using MultiLineString = geos::geom::MultiLineString;
+
74 
+
75 public:
+
76 
+
82  CoverageSimplifier(const std::vector<const Geometry*>& coverage);
+
83 
+
92  static std::vector<std::unique_ptr<Geometry>> simplify(
+
93  std::vector<const Geometry*>& coverage,
+
94  double tolerance);
+
95 
+
96  static std::vector<std::unique_ptr<Geometry>> simplify(
+
97  const std::vector<std::unique_ptr<Geometry>>& coverage,
98  double tolerance);
99 
-
100  static std::vector<std::unique_ptr<Geometry>> simplify(
-
101  const std::vector<std::unique_ptr<Geometry>>& coverage,
-
102  double tolerance);
-
103 
-
113  static std::vector<std::unique_ptr<Geometry>> simplifyInner(
-
114  std::vector<const Geometry*>& coverage,
+
109  static std::vector<std::unique_ptr<Geometry>> simplifyInner(
+
110  std::vector<const Geometry*>& coverage,
+
111  double tolerance);
+
112 
+
113  static std::vector<std::unique_ptr<Geometry>> simplifyInner(
+
114  const std::vector<std::unique_ptr<Geometry>>& coverage,
115  double tolerance);
116 
-
117  static std::vector<std::unique_ptr<Geometry>> simplifyInner(
-
118  const std::vector<std::unique_ptr<Geometry>>& coverage,
-
119  double tolerance);
-
120 
-
127  std::vector<std::unique_ptr<Geometry>> simplify(
-
128  double tolerance);
-
129 
-
138  std::vector<std::unique_ptr<Geometry>> simplifyInner(
-
139  double tolerance);
-
140 
-
141 
-
142 private:
+
123  std::vector<std::unique_ptr<Geometry>> simplify(
+
124  double tolerance);
+
125 
+
134  std::vector<std::unique_ptr<Geometry>> simplifyInner(
+
135  double tolerance);
+
136 
+
137 
+
138 private:
+
139 
+
140  // Members
+
141  const std::vector<const Geometry*>& m_input;
+
142  const GeometryFactory* m_geomFactory;
143 
-
144  // Members
-
145  const std::vector<const Geometry*>& m_input;
-
146  const GeometryFactory* m_geomFactory;
-
147 
-
148  // Methods
-
149  void simplifyEdges(
-
150  std::vector<CoverageEdge*> edges,
-
151  const MultiLineString* constraints,
-
152  double tolerance);
+
144  // Methods
+
145  void simplifyEdges(
+
146  std::vector<CoverageEdge*> edges,
+
147  const MultiLineString* constraints,
+
148  double tolerance);
+
149 
+
150  void setCoordinates(
+
151  std::vector<CoverageEdge*>& edges,
+
152  const MultiLineString* lines);
153 
-
154  void setCoordinates(
-
155  std::vector<CoverageEdge*>& edges,
-
156  const MultiLineString* lines);
+
154  std::vector<bool> getFreeRings(
+
155  const std::vector<CoverageEdge*>& edges) const;
+
156 
157 
-
158  std::vector<bool> getFreeRings(
-
159  const std::vector<CoverageEdge*>& edges) const;
+
158 }; // CoverageSimplifier
+
159 
160 
-
161 
-
162 }; // CoverageSimplifier
-
163 
-
164 
-
165 } // geos::coverage
-
166 } // geos
-
Definition: CoverageEdge.h:54
-
Definition: CoverageSimplifier.h:76
+
161 } // geos::coverage
+
162 } // geos
+
Definition: CoverageEdge.h:46
+
Definition: CoverageSimplifier.h:69
std::vector< std::unique_ptr< Geometry > > simplify(double tolerance)
CoverageSimplifier(const std::vector< const Geometry * > &coverage)
static std::vector< std::unique_ptr< Geometry > > simplifyInner(std::vector< const Geometry * > &coverage, double tolerance)
diff --git a/doxygen/CoverageValidator_8h_source.html b/doxygen/CoverageValidator_8h_source.html index dd0bc857c9..6f4884657e 100644 --- a/doxygen/CoverageValidator_8h_source.html +++ b/doxygen/CoverageValidator_8h_source.html @@ -69,18 +69,18 @@
20 // Forward declarations
21 namespace geos {
22 namespace geom {
-
23 class Geometry;
+
23 class Geometry;
24 }
25 }
26 
-
27 using geos::geom::Geometry;
-
28 using geos::index::strtree::TemplateSTRtree;
+
27 namespace geos { // geos
+
28 namespace coverage { // geos::coverage
29 
-
30 namespace geos { // geos
-
31 namespace coverage { // geos::coverage
-
32 
-
33 
-
65 class GEOS_DLL CoverageValidator {
+
30 
+
62 class GEOS_DLL CoverageValidator {
+
63  using Geometry = geos::geom::Geometry;
+
64  template <typename ItemType>
+
65  using TemplateSTRtree = geos::index::strtree::TemplateSTRtree<ItemType>;
66 
67 private:
68 
@@ -125,7 +125,7 @@
157 
158 } // namespace geos::coverage
159 } // namespace geos
-
Definition: CoverageValidator.h:65
+
Definition: CoverageValidator.h:62
static std::vector< std::unique_ptr< Geometry > > validate(std::vector< const Geometry * > &coverage, double gapWidth)
static std::vector< std::unique_ptr< Geometry > > validate(std::vector< const Geometry * > &coverage)
static bool hasInvalidResult(const std::vector< std::unique_ptr< Geometry >> &validateResult)
diff --git a/doxygen/DimensionLocation_8h_source.html b/doxygen/DimensionLocation_8h_source.html index b1396babab..b92bc85cf2 100644 --- a/doxygen/DimensionLocation_8h_source.html +++ b/doxygen/DimensionLocation_8h_source.html @@ -67,46 +67,43 @@
18 #include <geos/geom/Location.h>
19 #include <geos/export.h>
20 
-
21 
-
22 using geos::geom::Location;
-
23 
+
21 namespace geos { // geos.
+
22 namespace operation { // geos.operation
+
23 namespace relateng { // geos.operation.relateng
24 
-
25 namespace geos { // geos.
-
26 namespace operation { // geos.operation
-
27 namespace relateng { // geos.operation.relateng
+
25 
+
26 class GEOS_DLL DimensionLocation {
+
27  using Location = geos::geom::Location;
28 
-
29 
-
30 class GEOS_DLL DimensionLocation {
-
31 
-
32 public:
-
33 
-
34  enum DimensionLocationType {
-
35  EXTERIOR = 2, // == Location.EXTERIOR
-
36  POINT_INTERIOR = 103,
-
37  LINE_INTERIOR = 110,
-
38  LINE_BOUNDARY = 111,
-
39  AREA_INTERIOR = 120,
-
40  AREA_BOUNDARY = 121
-
41  };
-
42 
-
43  static int locationArea(Location loc);
-
44 
-
45  static int locationLine(Location loc);
-
46 
-
47  static int locationPoint(Location loc);
-
48 
-
49  static Location location(int dimLoc);
-
50 
-
51  static int dimension(int dimLoc);
-
52 
-
53  static int dimension(int dimLoc, int exteriorDim);
-
54 
-
55 };
-
56 
-
57 } // namespace geos.operation.relateng
-
58 } // namespace geos.operation
-
59 } // namespace geos
-
60 
+
29 public:
+
30 
+
31  enum DimensionLocationType {
+
32  EXTERIOR = 2, // == Location.EXTERIOR
+
33  POINT_INTERIOR = 103,
+
34  LINE_INTERIOR = 110,
+
35  LINE_BOUNDARY = 111,
+
36  AREA_INTERIOR = 120,
+
37  AREA_BOUNDARY = 121
+
38  };
+
39 
+
40  static int locationArea(Location loc);
+
41 
+
42  static int locationLine(Location loc);
+
43 
+
44  static int locationPoint(Location loc);
+
45 
+
46  static Location location(int dimLoc);
+
47 
+
48  static int dimension(int dimLoc);
+
49 
+
50  static int dimension(int dimLoc, int exteriorDim);
+
51 
+
52 };
+
53 
+
54 } // namespace geos.operation.relateng
+
55 } // namespace geos.operation
+
56 } // namespace geos
+
57 
Location
Constants representing the location of a point relative to a geometry.
Definition: Location.h:32
@ EXTERIOR
Basic namespace for all GEOS functionalities.
Definition: Angle.h:25
diff --git a/doxygen/EdgeKey_8h_source.html b/doxygen/EdgeKey_8h_source.html index ce779cb018..8bb87a9f7d 100644 --- a/doxygen/EdgeKey_8h_source.html +++ b/doxygen/EdgeKey_8h_source.html @@ -75,93 +75,90 @@
26 namespace operation { // geos.operation
27 namespace overlayng { // geos.operation.overlayng
28 
-
29 
-
30 using geos::geom::Coordinate;
-
31 
-
41 class GEOS_DLL EdgeKey {
+
38 class GEOS_DLL EdgeKey {
+
39  using Coordinate = geos::geom::Coordinate;
+
40 
+
41 private:
42 
-
43 private:
-
44 
-
45  // Members
-
46  double p0x;
-
47  double p0y;
-
48  double p1x;
-
49  double p1y;
-
50 
-
51  // Methods
-
52  void initPoints(const Edge* edge)
-
53  {
-
54  bool direction = edge->direction();
-
55  if (direction) {
-
56  init(edge->getCoordinate(0),
-
57  edge->getCoordinate(1));
-
58  }
-
59  else {
-
60  std::size_t len = edge->size();
-
61  init(edge->getCoordinate(len - 1),
-
62  edge->getCoordinate(len - 2));
-
63  }
-
64  }
-
65 
-
66  void init(const geom::Coordinate& p0, const geom::Coordinate& p1)
-
67  {
-
68  p0x = p0.x;
-
69  p0y = p0.y;
-
70  p1x = p1.x;
-
71  p1y = p1.y;
-
72  }
-
73 
+
43  // Members
+
44  double p0x;
+
45  double p0y;
+
46  double p1x;
+
47  double p1y;
+
48 
+
49  // Methods
+
50  void initPoints(const Edge* edge)
+
51  {
+
52  bool direction = edge->direction();
+
53  if (direction) {
+
54  init(edge->getCoordinate(0),
+
55  edge->getCoordinate(1));
+
56  }
+
57  else {
+
58  std::size_t len = edge->size();
+
59  init(edge->getCoordinate(len - 1),
+
60  edge->getCoordinate(len - 2));
+
61  }
+
62  }
+
63 
+
64  void init(const geom::Coordinate& p0, const geom::Coordinate& p1)
+
65  {
+
66  p0x = p0.x;
+
67  p0y = p0.y;
+
68  p1x = p1.x;
+
69  p1y = p1.y;
+
70  }
+
71 
+
72 
+
73 public:
74 
-
75 public:
-
76 
-
77  EdgeKey(const Edge* edge)
-
78  {
-
79  initPoints(edge);
-
80  }
-
81 
-
82  int compareTo(const EdgeKey* ek) const
-
83  {
-
84  if (p0x < ek->p0x) return -1;
-
85  if (p0x > ek->p0x) return 1;
-
86  if (p0y < ek->p0y) return -1;
-
87  if (p0y > ek->p0y) return 1;
-
88  // first points are equal, compare second
-
89  if (p1x < ek->p1x) return -1;
-
90  if (p1x > ek->p1x) return 1;
-
91  if (p1y < ek->p1y) return -1;
-
92  if (p1y > ek->p1y) return 1;
-
93  return 0;
-
94  }
-
95 
-
96  bool equals(const EdgeKey* ek) const
-
97  {
-
98  return p0x == ek->p0x
-
99  && p0y == ek->p0y
-
100  && p1x == ek->p1x
-
101  && p1y == ek->p1y;
-
102  }
-
103 
-
104  friend bool operator<(const EdgeKey& ek1, const EdgeKey& ek2)
-
105  {
-
106  return ek1.compareTo(&ek2) < 0;
-
107  };
-
108 
-
109  friend bool operator==(const EdgeKey& ek1, const EdgeKey& ek2)
-
110  {
-
111  return ek1.equals(&ek2);
-
112  };
+
75  EdgeKey(const Edge* edge)
+
76  {
+
77  initPoints(edge);
+
78  }
+
79 
+
80  int compareTo(const EdgeKey* ek) const
+
81  {
+
82  if (p0x < ek->p0x) return -1;
+
83  if (p0x > ek->p0x) return 1;
+
84  if (p0y < ek->p0y) return -1;
+
85  if (p0y > ek->p0y) return 1;
+
86  // first points are equal, compare second
+
87  if (p1x < ek->p1x) return -1;
+
88  if (p1x > ek->p1x) return 1;
+
89  if (p1y < ek->p1y) return -1;
+
90  if (p1y > ek->p1y) return 1;
+
91  return 0;
+
92  }
+
93 
+
94  bool equals(const EdgeKey* ek) const
+
95  {
+
96  return p0x == ek->p0x
+
97  && p0y == ek->p0y
+
98  && p1x == ek->p1x
+
99  && p1y == ek->p1y;
+
100  }
+
101 
+
102  friend bool operator<(const EdgeKey& ek1, const EdgeKey& ek2)
+
103  {
+
104  return ek1.compareTo(&ek2) < 0;
+
105  };
+
106 
+
107  friend bool operator==(const EdgeKey& ek1, const EdgeKey& ek2)
+
108  {
+
109  return ek1.equals(&ek2);
+
110  };
+
111 
+
112 };
113 
-
114 };
-
115 
-
116 
-
117 } // namespace geos.operation.overlayng
-
118 } // namespace geos.operation
-
119 } // namespace geos
-
120 
+
114 
+
115 } // namespace geos.operation.overlayng
+
116 } // namespace geos.operation
+
117 } // namespace geos
+
118 
Coordinate is the lightweight class used to store coordinates.
Definition: Coordinate.h:217
-
Definition: EdgeKey.h:41
+
Definition: EdgeKey.h:38
Definition: operation/overlayng/Edge.h:55
-
bool operator<(const CoordinateXY &a, const CoordinateXY &b)
Strict weak ordering operator for Coordinate.
Definition: Coordinate.h:458
Basic namespace for all GEOS functionalities.
Definition: Angle.h:25
diff --git a/doxygen/EdgeNodingBuilder_8h_source.html b/doxygen/EdgeNodingBuilder_8h_source.html index 9791a99271..5db02a0ba6 100644 --- a/doxygen/EdgeNodingBuilder_8h_source.html +++ b/doxygen/EdgeNodingBuilder_8h_source.html @@ -96,107 +96,116 @@
47 namespace overlayng { // geos.operation.overlayng
48 
64 class GEOS_DLL EdgeNodingBuilder {
-
65 
-
66 private:
-
67 
-
68  // Constants
-
69  static constexpr int MIN_LIMIT_PTS = 20;
-
70  static constexpr bool IS_NODING_VALIDATED = true;
-
71 
-
72  // Members
-
73  const PrecisionModel* pm;
-
74  std::unique_ptr<std::vector<noding::SegmentString*>> inputEdges;
-
75  noding::Noder* customNoder;
-
76  std::array<bool, 2> hasEdges;
-
77  const Envelope* clipEnv;
-
78  std::unique_ptr<RingClipper> clipper;
-
79  std::unique_ptr<LineLimiter> limiter;
-
80 
-
81  // For use in createFloatingPrecisionNoder()
-
82  algorithm::LineIntersector lineInt;
-
83  noding::IntersectionAdder intAdder;
-
84  std::unique_ptr<noding::Noder> internalNoder;
-
85  std::unique_ptr<noding::Noder> spareInternalNoder;
-
86  // EdgeSourceInfo*, Edge* owned by EdgeNodingBuilder, stored in deque
-
87  std::deque<EdgeSourceInfo> edgeSourceInfoQue;
-
88  std::deque<Edge> edgeQue;
-
89  bool inputHasZ;
-
90  bool inputHasM;
-
91 
-
100  noding::Noder* getNoder();
-
101  static std::unique_ptr<noding::Noder> createFixedPrecisionNoder(const PrecisionModel* pm);
-
102  std::unique_ptr<noding::Noder> createFloatingPrecisionNoder(bool doValidation);
-
103 
-
104 
-
105  void addCollection(const GeometryCollection* gc, uint8_t geomIndex);
-
106  void addGeometryCollection(const GeometryCollection* gc, uint8_t geomIndex, int expectedDim);
-
107  void addPolygon(const Polygon* poly, uint8_t geomIndex);
-
108  void addPolygonRing(const LinearRing* ring, bool isHole, uint8_t geomIndex);
-
109  void addLine(const LineString* line, uint8_t geomIndex);
-
110  void addLine(std::unique_ptr<CoordinateSequence>& pts, uint8_t geomIndex);
-
111  void addEdge(std::unique_ptr<CoordinateSequence>& cas, const EdgeSourceInfo* info);
+
65  using PrecisionModel = geos::geom::PrecisionModel;
+
66  using Envelope = geos::geom::Envelope;
+
67  using GeometryCollection = geos::geom::GeometryCollection;
+
68  using Polygon = geos::geom::Polygon;
+
69  using CoordinateSequence = geos::geom::CoordinateSequence;
+
70  using LinearRing = geos::geom::LinearRing;
+
71  using LineString = geos::geom::LineString;
+
72  using Geometry = geos::geom::Geometry;
+
73 
+
74 private:
+
75 
+
76  // Constants
+
77  static constexpr int MIN_LIMIT_PTS = 20;
+
78  static constexpr bool IS_NODING_VALIDATED = true;
+
79 
+
80  // Members
+
81  const PrecisionModel* pm;
+
82  std::unique_ptr<std::vector<noding::SegmentString*>> inputEdges;
+
83  noding::Noder* customNoder;
+
84  std::array<bool, 2> hasEdges;
+
85  const Envelope* clipEnv;
+
86  std::unique_ptr<RingClipper> clipper;
+
87  std::unique_ptr<LineLimiter> limiter;
+
88 
+
89  // For use in createFloatingPrecisionNoder()
+
90  algorithm::LineIntersector lineInt;
+
91  noding::IntersectionAdder intAdder;
+
92  std::unique_ptr<noding::Noder> internalNoder;
+
93  std::unique_ptr<noding::Noder> spareInternalNoder;
+
94  // EdgeSourceInfo*, Edge* owned by EdgeNodingBuilder, stored in deque
+
95  std::deque<EdgeSourceInfo> edgeSourceInfoQue;
+
96  std::deque<Edge> edgeQue;
+
97  bool inputHasZ;
+
98  bool inputHasM;
+
99 
+
108  noding::Noder* getNoder();
+
109  static std::unique_ptr<noding::Noder> createFixedPrecisionNoder(const PrecisionModel* pm);
+
110  std::unique_ptr<noding::Noder> createFloatingPrecisionNoder(bool doValidation);
+
111 
112 
-
113  // Create a EdgeSourceInfo* owned by EdgeNodingBuilder
-
114  const EdgeSourceInfo* createEdgeSourceInfo(uint8_t index, int depthDelta, bool isHole);
-
115  const EdgeSourceInfo* createEdgeSourceInfo(uint8_t index);
-
116 
-
121  bool isClippedCompletely(const Envelope* env) const;
-
122 
-
128  bool isToBeLimited(const LineString* line) const;
-
129 
-
135  std::vector<std::unique_ptr<CoordinateSequence>>& limit(const LineString* line);
-
136 
-
151  std::unique_ptr<CoordinateSequence> clip(const LinearRing* line);
-
152 
-
160  static std::unique_ptr<CoordinateSequence> removeRepeatedPoints(const LineString* line);
-
161 
-
162  static int computeDepthDelta(const LinearRing* ring, bool isHole);
-
163 
-
164  void add(const Geometry* g, uint8_t geomIndex);
-
165 
-
172  std::vector<Edge*> node(std::vector<noding::SegmentString*>* segStrings);
-
173  std::vector<Edge*> createEdges(std::vector<noding::SegmentString*>* segStrings);
-
174 
-
175 
-
176 public:
-
177 
-
183  EdgeNodingBuilder(const PrecisionModel* p_pm, noding::Noder* p_customNoder)
-
184  : pm(p_pm)
-
185  , inputEdges(new std::vector<noding::SegmentString*>)
-
186  , customNoder(p_customNoder)
-
187  , hasEdges{{false,false}}
-
188  , clipEnv(nullptr)
-
189  , intAdder(lineInt)
-
190  , inputHasZ(false)
-
191  , inputHasM(false)
-
192  {};
-
193 
-
194  ~EdgeNodingBuilder()
-
195  {
-
196  for (noding::SegmentString* ss: *inputEdges) {
-
197  delete ss;
-
198  }
-
199  }
-
200 
-
201  void setClipEnvelope(const Envelope* clipEnv);
-
202 
-
203  // returns newly allocated vector and segmentstrings
-
204  // std::vector<noding::SegmentString*>* node();
-
205 
-
216  bool hasEdgesFor(uint8_t geomIndex) const;
-
217 
-
229  std::vector<Edge*> build(const Geometry* geom0, const Geometry* geom1);
-
230 
-
231 
-
232 
-
233 };
-
234 
-
235 
-
236 } // namespace geos.operation.overlayng
-
237 } // namespace geos.operation
-
238 } // namespace geos
+
113  void addCollection(const GeometryCollection* gc, uint8_t geomIndex);
+
114  void addGeometryCollection(const GeometryCollection* gc, uint8_t geomIndex, int expectedDim);
+
115  void addPolygon(const Polygon* poly, uint8_t geomIndex);
+
116  void addPolygonRing(const LinearRing* ring, bool isHole, uint8_t geomIndex);
+
117  void addLine(const LineString* line, uint8_t geomIndex);
+
118  void addLine(std::unique_ptr<CoordinateSequence>& pts, uint8_t geomIndex);
+
119  void addEdge(std::unique_ptr<CoordinateSequence>& cas, const EdgeSourceInfo* info);
+
120 
+
121  // Create a EdgeSourceInfo* owned by EdgeNodingBuilder
+
122  const EdgeSourceInfo* createEdgeSourceInfo(uint8_t index, int depthDelta, bool isHole);
+
123  const EdgeSourceInfo* createEdgeSourceInfo(uint8_t index);
+
124 
+
129  bool isClippedCompletely(const Envelope* env) const;
+
130 
+
136  bool isToBeLimited(const LineString* line) const;
+
137 
+
143  std::vector<std::unique_ptr<CoordinateSequence>>& limit(const LineString* line);
+
144 
+
159  std::unique_ptr<CoordinateSequence> clip(const LinearRing* line);
+
160 
+
168  static std::unique_ptr<CoordinateSequence> removeRepeatedPoints(const LineString* line);
+
169 
+
170  static int computeDepthDelta(const LinearRing* ring, bool isHole);
+
171 
+
172  void add(const Geometry* g, uint8_t geomIndex);
+
173 
+
180  std::vector<Edge*> node(std::vector<noding::SegmentString*>* segStrings);
+
181  std::vector<Edge*> createEdges(std::vector<noding::SegmentString*>* segStrings);
+
182 
+
183 
+
184 public:
+
185 
+
191  EdgeNodingBuilder(const PrecisionModel* p_pm, noding::Noder* p_customNoder)
+
192  : pm(p_pm)
+
193  , inputEdges(new std::vector<noding::SegmentString*>)
+
194  , customNoder(p_customNoder)
+
195  , hasEdges{{false,false}}
+
196  , clipEnv(nullptr)
+
197  , intAdder(lineInt)
+
198  , inputHasZ(false)
+
199  , inputHasM(false)
+
200  {};
+
201 
+
202  ~EdgeNodingBuilder()
+
203  {
+
204  for (noding::SegmentString* ss: *inputEdges) {
+
205  delete ss;
+
206  }
+
207  }
+
208 
+
209  void setClipEnvelope(const Envelope* clipEnv);
+
210 
+
211  // returns newly allocated vector and segmentstrings
+
212  // std::vector<noding::SegmentString*>* node();
+
213 
+
224  bool hasEdgesFor(uint8_t geomIndex) const;
+
225 
+
237  std::vector<Edge*> build(const Geometry* geom0, const Geometry* geom1);
+
238 
239 
+
240 
+
241 };
+
242 
+
243 
+
244 } // namespace geos.operation.overlayng
+
245 } // namespace geos.operation
+
246 } // namespace geos
+
247 
A LineIntersector is an algorithm that can both test whether two line segments intersect and compute ...
Definition: LineIntersector.h:53
+
The internal representation of a list of coordinates inside a Geometry.
Definition: CoordinateSequence.h:56
An Envelope defines a rectangulare region of the 2D coordinate plane.
Definition: Envelope.h:59
Represents a collection of heterogeneous Geometry objects.
Definition: GeometryCollection.h:51
Basic implementation of Geometry, constructed and destructed by GeometryFactory.
Definition: Geometry.h:197
@@ -210,7 +219,7 @@
Definition: EdgeNodingBuilder.h:64
bool hasEdgesFor(uint8_t geomIndex) const
std::vector< Edge * > build(const Geometry *geom0, const Geometry *geom1)
-
EdgeNodingBuilder(const PrecisionModel *p_pm, noding::Noder *p_customNoder)
Definition: EdgeNodingBuilder.h:183
+
EdgeNodingBuilder(const PrecisionModel *p_pm, noding::Noder *p_customNoder)
Definition: EdgeNodingBuilder.h:191
Definition: EdgeSourceInfo.h:38
Basic namespace for all GEOS functionalities.
Definition: Angle.h:25
diff --git a/doxygen/EdgeSegmentIntersector_8h_source.html b/doxygen/EdgeSegmentIntersector_8h_source.html index 2127a4486d..e50d50975d 100644 --- a/doxygen/EdgeSegmentIntersector_8h_source.html +++ b/doxygen/EdgeSegmentIntersector_8h_source.html @@ -73,7 +73,7 @@
24 // Forward declarations
25 namespace geos {
26 namespace noding {
-
27  class SegmentString;
+
27  class SegmentString;
28 }
29 namespace operation {
30 namespace relateng {
@@ -83,50 +83,46 @@
34 }
35 }
36 
-
37 
-
38 using geos::noding::SegmentIntersector;
-
39 using geos::noding::SegmentString;
-
40 using geos::algorithm::LineIntersector;
-
41 
-
42 
-
43 namespace geos { // geos.
-
44 namespace operation { // geos.operation
-
45 namespace relateng { // geos.operation.relateng
+
37 namespace geos { // geos.
+
38 namespace operation { // geos.operation
+
39 namespace relateng { // geos.operation.relateng
+
40 
+
41 class GEOS_DLL EdgeSegmentIntersector : public geos::noding::SegmentIntersector {
+
42  using SegmentString = geos::noding::SegmentString;
+
43  using LineIntersector = geos::algorithm::LineIntersector;
+
44 
+
45 private:
46 
-
47 class GEOS_DLL EdgeSegmentIntersector : public SegmentIntersector {
-
48 
-
49 private:
+
47  // Members
+
48  LineIntersector li;
+
49  TopologyComputer& topoComputer;
50 
-
51  // Members
-
52  LineIntersector li;
-
53  TopologyComputer& topoComputer;
-
54 
-
55  // Methods
-
56 
+
51  // Methods
+
52 
+
53 
+
54  void addIntersections(
+
55  RelateSegmentString* ssA, std::size_t segIndexA,
+
56  RelateSegmentString* ssB, std::size_t segIndexB);
57 
-
58  void addIntersections(
-
59  RelateSegmentString* ssA, std::size_t segIndexA,
-
60  RelateSegmentString* ssB, std::size_t segIndexB);
-
61 
-
62 
-
63 public:
+
58 
+
59 public:
+
60 
+
61  EdgeSegmentIntersector(TopologyComputer& p_topoComputer)
+
62  : topoComputer(p_topoComputer)
+
63  {};
64 
-
65  EdgeSegmentIntersector(TopologyComputer& p_topoComputer)
-
66  : topoComputer(p_topoComputer)
-
67  {};
+
65  void processIntersections(
+
66  SegmentString* ss0, std::size_t segIndex0,
+
67  SegmentString* ss1, std::size_t segIndex1) override;
68 
-
69  void processIntersections(
-
70  SegmentString* ss0, std::size_t segIndex0,
-
71  SegmentString* ss1, std::size_t segIndex1) override;
+
69  bool isDone() const override;
+
70 
+
71 };
72 
-
73  bool isDone() const override;
-
74 
-
75 };
+
73 } // namespace geos.operation.relateng
+
74 } // namespace geos.operation
+
75 } // namespace geos
76 
-
77 } // namespace geos.operation.relateng
-
78 } // namespace geos.operation
-
79 } // namespace geos
-
80 
A LineIntersector is an algorithm that can both test whether two line segments intersect and compute ...
Definition: LineIntersector.h:53
Processes possible intersections detected by a Noder.
Definition: noding/SegmentIntersector.h:45
An interface for classes which represent a sequence of contiguous line segments.
Definition: SegmentString.h:47
diff --git a/doxygen/EdgeSegmentOverlapAction_8h_source.html b/doxygen/EdgeSegmentOverlapAction_8h_source.html index d925639e08..a273e48a51 100644 --- a/doxygen/EdgeSegmentOverlapAction_8h_source.html +++ b/doxygen/EdgeSegmentOverlapAction_8h_source.html @@ -76,52 +76,48 @@
27 namespace geos {
28 namespace index {
29 namespace chain {
-
30  class MonotoneChain;
+
30  class MonotoneChain;
31 }
32 }
33 namespace noding {
-
34  class SegmentIntersector;
+
34  class SegmentIntersector;
35 }
36 }
37 
-
38 
-
39 using geos::index::chain::MonotoneChain;
-
40 using geos::index::chain::MonotoneChainOverlapAction;
-
41 using geos::noding::SegmentIntersector;
-
42 
-
43 
-
44 namespace geos {
-
45 namespace operation { // geos::operation
-
46 namespace relateng { // geos::operation::relateng
-
47 
-
52 class GEOS_DLL EdgeSegmentOverlapAction : public MonotoneChainOverlapAction {
+
38 namespace geos {
+
39 namespace operation { // geos::operation
+
40 namespace relateng { // geos::operation::relateng
+
41 
+
46 class GEOS_DLL EdgeSegmentOverlapAction : public geos::index::chain::MonotoneChainOverlapAction {
+
47  using MonotoneChain = geos::index::chain::MonotoneChain;
+
48  using SegmentIntersector = geos::noding::SegmentIntersector;
+
49 
+
50 private:
+
51 
+
52  SegmentIntersector& si;
53 
-
54 private:
-
55 
-
56  SegmentIntersector& si;
-
57 
-
58 
-
59 public:
+
54 
+
55 public:
+
56 
+
57  EdgeSegmentOverlapAction(SegmentIntersector& p_si)
+
58  : si(p_si)
+
59  {}
60 
-
61  EdgeSegmentOverlapAction(SegmentIntersector& p_si)
-
62  : si(p_si)
-
63  {}
+
61  void overlap(
+
62  const MonotoneChain& mc1, std::size_t start1,
+
63  const MonotoneChain& mc2, std::size_t start2) override;
64 
-
65  void overlap(
-
66  const MonotoneChain& mc1, std::size_t start1,
-
67  const MonotoneChain& mc2, std::size_t start2) override;
-
68 
-
69 
-
70 };
+
65 
+
66 };
+
67 
+
68 } // namespace geos::index::chain
+
69 } // namespace geos::index
+
70 } // namespace geos
71 
-
72 } // namespace geos::index::chain
-
73 } // namespace geos::index
-
74 } // namespace geos
-
75 
The action for the internal iterator for performing overlap queries on a MonotoneChain.
Definition: MonotoneChainOverlapAction.h:42
Monotone Chains are a way of partitioning the segments of a linestring to allow for fast searching of...
Definition: index/chain/MonotoneChain.h:85
Processes possible intersections detected by a Noder.
Definition: noding/SegmentIntersector.h:45
-
The action for the internal iterator for performing overlap queries on a MonotoneChain.
Definition: EdgeSegmentOverlapAction.h:52
+
The action for the internal iterator for performing overlap queries on a MonotoneChain.
Definition: EdgeSegmentOverlapAction.h:46
void overlap(const MonotoneChain &mc1, std::size_t start1, const MonotoneChain &mc2, std::size_t start2) override
This function can be overridden if the original chains are needed.
Basic namespace for all GEOS functionalities.
Definition: Angle.h:25
diff --git a/doxygen/HullTri_8h_source.html b/doxygen/HullTri_8h_source.html index e2178783e6..f233f79b5b 100644 --- a/doxygen/HullTri_8h_source.html +++ b/doxygen/HullTri_8h_source.html @@ -74,7 +74,7 @@
25 
26 namespace geos {
27 namespace geom {
-
28 class Coordinate;
+
28 class Coordinate;
29 }
30 namespace triangulate {
31 namespace quadedge {
@@ -82,20 +82,20 @@
33 }
34 }
35 
-
36 using geos::geom::Coordinate;
-
37 using geos::geom::Triangle;
-
38 using geos::triangulate::tri::Tri;
-
39 using geos::triangulate::tri::TriList;
+
36 namespace geos {
+
37 namespace algorithm { // geos::algorithm
+
38 namespace hull { // geos::algorithm::hull
+
39 
40 
-
41 namespace geos {
-
42 namespace algorithm { // geos::algorithm
-
43 namespace hull { // geos::algorithm::hull
-
44 
-
45 
-
46 
-
47 class HullTri : public Tri
-
48 {
-
49  private:
+
41 
+
42 class HullTri : public geos::triangulate::tri::Tri {
+
43  using Coordinate = geos::geom::Coordinate;
+
44  using Triangle = geos::geom::Triangle;
+
45  using Tri = geos::triangulate::tri::Tri;
+
46  template<typename TriType>
+
47  using TriList = geos::triangulate::tri::TriList<TriType>;
+
48 
+
49 private:
50 
51  double m_size;
52  bool m_isMarked = false;
@@ -105,9 +105,9 @@
56 
57  public:
58 
-
59  HullTri(const Coordinate& c0, const Coordinate& c1, const Coordinate& c2)
-
60  : Tri(c0, c1, c2)
-
61  , m_size(Triangle::longestSideLength(c0, c1, c2))
+
59  HullTri(const Coordinate& c0, const Coordinate& c1, const Coordinate& c2)
+
60  : Tri(c0, c1, c2)
+
61  , m_size(Triangle::longestSideLength(c0, c1, c2))
62  {};
63 
64  class HullTriCompare {
@@ -142,23 +142,23 @@
105 
111  int adjacent2VertexIndex() const;
112 
-
121  TriIndex isolatedVertexIndex(TriList<HullTri>& triList) const;
+
121  TriIndex isolatedVertexIndex(TriList<HullTri>& triList) const;
122 
123  double lengthOfLongestEdge() const;
124 
131  bool hasBoundaryTouch() const;
132 
-
133  static HullTri* findTri(TriList<HullTri>& triList, Tri* exceptTri);
-
134  static bool isAllMarked(TriList<HullTri>& triList);
-
135  static void clearMarks(TriList<HullTri>& triList);
+
133  static HullTri* findTri(TriList<HullTri>& triList, Tri* exceptTri);
+
134  static bool isAllMarked(TriList<HullTri>& triList);
+
135  static void clearMarks(TriList<HullTri>& triList);
136  static void markConnected(HullTri* triStart, HullTri* exceptTri);
-
137  static bool isConnected(TriList<HullTri>& triList, HullTri* exceptTri);
+
137  static bool isConnected(TriList<HullTri>& triList, HullTri* exceptTri);
138 
139  friend std::ostream& operator<<(std::ostream& os, const HullTri& ht);
140 
141  double lengthOfBoundary() const;
142 
-
143  void remove(TriList<HullTri>& triList);
+
143  void remove(TriList<HullTri>& triList);
144 
145 
146 }; // HullTri
@@ -174,8 +174,8 @@
156 
Coordinate is the lightweight class used to store coordinates.
Definition: Coordinate.h:217
Represents a planar triangle, and provides methods for calculating various properties of triangles.
Definition: Triangle.h:28
-
Definition: TriList.h:54
-
Definition: Tri.h:49
+
Definition: TriList.h:50
+
Definition: Tri.h:45
void remove()
Basic namespace for all GEOS functionalities.
Definition: Angle.h:25
diff --git a/doxygen/HullTriangulation_8h_source.html b/doxygen/HullTriangulation_8h_source.html index 59ea687b01..3bc26d4d0c 100644 --- a/doxygen/HullTriangulation_8h_source.html +++ b/doxygen/HullTriangulation_8h_source.html @@ -64,110 +64,106 @@
15 #pragma once
16 
17 #include <geos/algorithm/hull/HullTri.h>
-
18 #include <geos/triangulate/tri/Tri.h>
-
19 #include <geos/triangulate/tri/TriList.h>
-
20 #include <geos/triangulate/quadedge/TriangleVisitor.h>
+
18 #include <geos/triangulate/tri/TriList.h>
+
19 #include <geos/triangulate/quadedge/TriangleVisitor.h>
+
20 
21 
-
22 
-
23 namespace geos {
-
24 namespace geom {
-
25 class Geometry;
-
26 class GeometryFactory;
-
27 class Coordinate;
-
28 }
-
29 namespace triangulate {
-
30 namespace quadedge {
-
31 class QuadEdge;
-
32 class QuadEdgeSubdivision;
+
22 namespace geos {
+
23 namespace geom {
+
24 class Geometry;
+
25 class GeometryFactory;
+
26 class Coordinate;
+
27 }
+
28 namespace triangulate {
+
29 namespace quadedge {
+
30 class QuadEdge;
+
31 class QuadEdgeSubdivision;
+
32 }
33 }
34 }
-
35 }
-
36 
-
37 using geos::geom::Geometry;
-
38 using geos::geom::GeometryFactory;
-
39 using geos::geom::Coordinate;
-
40 using geos::triangulate::tri::Tri;
-
41 using geos::triangulate::tri::TriList;
-
42 using geos::triangulate::quadedge::QuadEdge;
-
43 using geos::triangulate::quadedge::QuadEdgeSubdivision;
-
44 using geos::triangulate::quadedge::TriangleVisitor;
-
45 
-
46 
-
47 namespace geos {
-
48 namespace algorithm { // geos::algorithm
-
49 namespace hull { // geos::algorithm::hull
-
50 
+
35 
+
36 namespace geos {
+
37 namespace algorithm { // geos::algorithm
+
38 namespace hull { // geos::algorithm::hull
+
39 
+
40 
+
41 class HullTriangulation
+
42 {
+
43  using Geometry = geos::geom::Geometry;
+
44  using GeometryFactory = geos::geom::GeometryFactory;
+
45  using Coordinate = geos::geom::Coordinate;
+
46  template<typename TriType>
+
47  using TriList = geos::triangulate::tri::TriList<TriType>;
+
48  using QuadEdge = geos::triangulate::quadedge::QuadEdge;
+
49  using QuadEdgeSubdivision = geos::triangulate::quadedge::QuadEdgeSubdivision;
+
50  using TriangleVisitor = geos::triangulate::quadedge::TriangleVisitor;
51 
-
52 class HullTriangulation
-
53 {
-
54 
-
55 private:
-
56 
-
57  static void toTris(
-
58  QuadEdgeSubdivision& subdiv,
-
59  TriList<HullTri>& triList);
-
60 
-
71  static geom::CoordinateSequence traceBoundary(
-
72  TriList<HullTri>& triList);
+
52 private:
+
53 
+
54  static void toTris(
+
55  QuadEdgeSubdivision& subdiv,
+
56  TriList<HullTri>& triList);
+
57 
+
68  static geom::CoordinateSequence traceBoundary(
+
69  TriList<HullTri>& triList);
+
70 
+
71  static HullTri* findBorderTri(
+
72  TriList<HullTri>& triList);
73 
-
74  static HullTri* findBorderTri(
-
75  TriList<HullTri>& triList);
-
76 
+
74 
+
75 
+
76 public:
77 
-
78 
-
79 public:
-
80 
-
81  HullTriangulation() {};
-
82 
-
83  static void createDelaunayTriangulation(
-
84  const Geometry* geom,
-
85  TriList<HullTri>& triList);
-
86 
-
95  static std::unique_ptr<Geometry> traceBoundaryPolygon(
-
96  TriList<HullTri>& triList,
-
97  const GeometryFactory* factory);
-
98 
-
99  static HullTri* nextBorderTri(HullTri* triStart);
-
100 
-
109  static std::unique_ptr<Geometry> geomunion(
-
110  TriList<HullTri>& triList,
-
111  const GeometryFactory* factory);
-
112 
+
78  HullTriangulation() {};
+
79 
+
80  static void createDelaunayTriangulation(
+
81  const Geometry* geom,
+
82  TriList<HullTri>& triList);
+
83 
+
92  static std::unique_ptr<Geometry> traceBoundaryPolygon(
+
93  TriList<HullTri>& triList,
+
94  const GeometryFactory* factory);
+
95 
+
96  static HullTri* nextBorderTri(HullTri* triStart);
+
97 
+
106  static std::unique_ptr<Geometry> geomunion(
+
107  TriList<HullTri>& triList,
+
108  const GeometryFactory* factory);
+
109 
+
110 
+
111  class HullTriVisitor : public TriangleVisitor
+
112  {
113 
-
114  class HullTriVisitor : public TriangleVisitor
-
115  {
-
116 
-
117  private:
-
118 
-
119  TriList<HullTri>& triList;
-
120 
-
121  public:
-
122 
-
123  HullTriVisitor(TriList<HullTri>& p_triList)
-
124  : triList(p_triList)
-
125  {};
-
126 
-
127  void visit(std::array<QuadEdge*, 3>& triEdges) override;
+
114  private:
+
115 
+
116  TriList<HullTri>& triList;
+
117 
+
118  public:
+
119 
+
120  HullTriVisitor(TriList<HullTri>& p_triList)
+
121  : triList(p_triList)
+
122  {};
+
123 
+
124  void visit(std::array<QuadEdge*, 3>& triEdges) override;
+
125 
+
126  }; // HullTriVisitor
+
127 
128 
-
129  }; // HullTriVisitor
+
129 }; // HullTriangulation
130 
131 
-
132 }; // HullTriangulation
-
133 
-
134 
-
135 
-
136 } // geos::algorithm::hull
-
137 } // geos::algorithm
-
138 } // geos
-
139 
+
132 
+
133 } // geos::algorithm::hull
+
134 } // geos::algorithm
+
135 } // geos
+
136 
Coordinate is the lightweight class used to store coordinates.
Definition: Coordinate.h:217
Supplies a set of utility methods for building Geometry objects from CoordinateSequence or other Geom...
Definition: GeometryFactory.h:70
Basic implementation of Geometry, constructed and destructed by GeometryFactory.
Definition: Geometry.h:197
A class that contains the QuadEdges representing a planar subdivision that models a triangulation.
Definition: QuadEdgeSubdivision.h:78
A class that represents the edge data structure which implements the quadedge algebra.
Definition: QuadEdge.h:53
An interface for algorithms which process the triangles in a QuadEdgeSubdivision.
Definition: TriangleVisitor.h:33
-
Definition: TriList.h:54
-
Definition: Tri.h:49
+
Definition: TriList.h:50
Basic namespace for all GEOS functionalities.
Definition: Angle.h:25
diff --git a/doxygen/IMPatternMatcher_8h_source.html b/doxygen/IMPatternMatcher_8h_source.html index 88c79ed2fa..8bcd6dc64c 100644 --- a/doxygen/IMPatternMatcher_8h_source.html +++ b/doxygen/IMPatternMatcher_8h_source.html @@ -76,64 +76,60 @@
27 // Forward declarations
28 namespace geos {
29 namespace geom {
-
30  class Envelope;
+
30  class Envelope;
31 }
32 }
33 
-
34 
-
35 using geos::geom::Envelope;
-
36 using geos::geom::Location;
-
37 using geos::geom::Dimension;
-
38 using geos::geom::IntersectionMatrix;
-
39 
-
40 
-
41 namespace geos { // geos.
-
42 namespace operation { // geos.operation.
-
43 namespace relateng { // geos.operation.relateng
+
34 namespace geos { // geos.
+
35 namespace operation { // geos.operation.
+
36 namespace relateng { // geos.operation.relateng
+
37 
+
38 
+
39 class GEOS_DLL IMPatternMatcher : public IMPredicate {
+
40  using Envelope = geos::geom::Envelope;
+
41  using Location = geos::geom::Location;
+
42  using Dimension = geos::geom::Dimension;
+
43  using IntersectionMatrix = geos::geom::IntersectionMatrix;
44 
-
45 
-
46 class GEOS_DLL IMPatternMatcher : public IMPredicate {
-
47 
-
48 
-
49 private:
-
50 
-
51  std::string imPattern;
-
52  IntersectionMatrix patternMatrix;
+
45 private:
+
46 
+
47  std::string imPattern;
+
48  IntersectionMatrix patternMatrix;
+
49 
+
50  static bool requireInteraction(const IntersectionMatrix& im);
+
51 
+
52  static bool isInteraction(int imDim);
53 
-
54  static bool requireInteraction(const IntersectionMatrix& im);
-
55 
-
56  static bool isInteraction(int imDim);
-
57 
-
58 
-
59 public:
-
60 
-
61  IMPatternMatcher(std::string p_imPattern)
-
62  : imPattern(p_imPattern)
-
63  , patternMatrix(p_imPattern)
-
64  {};
-
65 
-
66  std::string name() const override;
-
67 
-
68  using IMPredicate::init;
-
69  void init(const Envelope& envA, const Envelope& envB) override;
+
54 
+
55 public:
+
56 
+
57  IMPatternMatcher(std::string p_imPattern)
+
58  : imPattern(p_imPattern)
+
59  , patternMatrix(p_imPattern)
+
60  {};
+
61 
+
62  std::string name() const override;
+
63 
+
64  using IMPredicate::init;
+
65  void init(const Envelope& envA, const Envelope& envB) override;
+
66 
+
67  bool requireInteraction() const override;
+
68 
+
69  bool isDetermined() const override;
70 
-
71  bool requireInteraction() const override;
+
71  bool valueIM() override;
72 
-
73  bool isDetermined() const override;
+
73  std::string toString() const;
74 
-
75  bool valueIM() override;
+
75  friend std::ostream& operator<<(std::ostream& os, const IMPatternMatcher& imp);
76 
-
77  std::string toString() const;
+
77 };
78 
-
79  friend std::ostream& operator<<(std::ostream& os, const IMPatternMatcher& imp);
-
80 
-
81 };
-
82 
+
79 
+
80 } // namespace geos.operation.relateng
+
81 } // namespace geos.operation
+
82 } // namespace geos
83 
-
84 } // namespace geos.operation.relateng
-
85 } // namespace geos.operation
-
86 } // namespace geos
-
87 
Definition: Dimension.h:27
An Envelope defines a rectangulare region of the 2D coordinate plane.
Definition: Envelope.h:59
Implementation of Dimensionally Extended Nine-Intersection Model (DE-9IM) matrix.
Definition: IntersectionMatrix.h:51
diff --git a/doxygen/IMPredicate_8h_source.html b/doxygen/IMPredicate_8h_source.html index 2fd9de1b18..12260d380a 100644 --- a/doxygen/IMPredicate_8h_source.html +++ b/doxygen/IMPredicate_8h_source.html @@ -76,90 +76,84 @@
27 // Forward declarations
28 namespace geos {
29 namespace geom {
-
30  class Envelope;
+
30  class Envelope;
31 }
32 }
33 
-
34 
-
35 using geos::geom::Envelope;
-
36 using geos::geom::Location;
-
37 using geos::geom::Dimension;
-
38 using geos::geom::IntersectionMatrix;
-
39 
-
40 
-
41 namespace geos { // geos.
-
42 namespace operation { // geos.operation.
-
43 namespace relateng { // geos.operation.relateng
-
44 
+
34 namespace geos { // geos.
+
35 namespace operation { // geos.operation.
+
36 namespace relateng { // geos.operation.relateng
+
37 
+
38 
+
39 class GEOS_DLL IMPredicate : public BasicPredicate {
+
40 protected:
+
41  using Envelope = geos::geom::Envelope;
+
42  using Location = geos::geom::Location;
+
43  using Dimension = geos::geom::Dimension;
+
44  using IntersectionMatrix = geos::geom::IntersectionMatrix;
45 
-
46 class GEOS_DLL IMPredicate : public BasicPredicate {
+
46 private:
47 
-
48 private:
+
48 
49 
-
50 
+
50 protected:
51 
-
52 protected:
+
52  static constexpr int DIM_UNKNOWN = Dimension::DONTCARE;
53 
-
54  static constexpr int DIM_UNKNOWN = Dimension::DONTCARE;
-
55 
-
56  int dimA;
-
57  int dimB;
-
58  IntersectionMatrix intMatrix;
-
59 
-
66  virtual bool valueIM() = 0;
-
67 
-
78  virtual bool isDetermined() const = 0;
-
79 
-
87  bool intersectsExteriorOf(bool isA) const;
+
54  int dimA;
+
55  int dimB;
+
56  IntersectionMatrix intMatrix;
+
57 
+
64  virtual bool valueIM() = 0;
+
65 
+
76  virtual bool isDetermined() const = 0;
+
77 
+
85  bool intersectsExteriorOf(bool isA) const;
+
86 
+
87  bool isIntersects(Location locA, Location locB) const;
88 
-
89  bool isIntersects(Location locA, Location locB) const;
-
90 
+
89 
+
90 public:
91 
-
92 public:
-
93 
-
94  IMPredicate()
-
95  {
-
96  // intMatrix = new IntersectionMatrix();
-
97  //-- E/E is always dim = 2
-
98  intMatrix.set(Location::EXTERIOR, Location::EXTERIOR, Dimension::A);
-
99  }
+
92  IMPredicate()
+
93  {
+
94  // intMatrix = new IntersectionMatrix();
+
95  //-- E/E is always dim = 2
+
96  intMatrix.set(Location::EXTERIOR, Location::EXTERIOR, Dimension::A);
+
97  }
+
98 
+
99  static bool isDimsCompatibleWithCovers(int dim0, int dim1);
100 
-
101  static bool isDimsCompatibleWithCovers(int dim0, int dim1);
+
101  void init(int dA, int dB) override;
102 
-
103  void init(int dA, int dB) override;
+
103  void updateDimension(Location locA, Location locB, int dimension) override;
104 
-
105  void updateDimension(Location locA, Location locB, int dimension) override;
+
105  bool isDimChanged(Location locA, Location locB, int dimension) const;
106 
-
107  bool isDimChanged(Location locA, Location locB, int dimension) const;
-
108 
-
109  using TopologyPredicate::isKnown;
-
110  bool isKnown(Location locA, Location locB) const;
+
107  using TopologyPredicate::isKnown;
+
108  bool isKnown(Location locA, Location locB) const;
+
109 
+
110  bool isDimension(Location locA, Location locB, int dimension) const;
111 
-
112  bool isDimension(Location locA, Location locB, int dimension) const;
+
112  int getDimension(Location locA, Location locB) const;
113 
-
114  int getDimension(Location locA, Location locB) const;
-
115 
-
119  void finish() override;
+
117  void finish() override;
+
118 
+
119  std::string toString() const;
120 
-
121  std::string toString() const;
+
121  friend std::ostream& operator<<(std::ostream& os, const IMPredicate& imp);
122 
-
123  friend std::ostream& operator<<(std::ostream& os, const IMPredicate& imp);
-
124 
+
123 
+
124 };
125 
-
126 };
-
127 
-
128 } // namespace geos.operation.relateng
-
129 } // namespace geos.operation
-
130 } // namespace geos
-
131 
+
126 } // namespace geos.operation.relateng
+
127 } // namespace geos.operation
+
128 } // namespace geos
+
129 
Definition: Dimension.h:27
-
@ A
Dimension value of a surface (2).
Definition: Dimension.h:46
-
@ DONTCARE
Dimension value for any dimension (= {FALSE, TRUE}).
Definition: Dimension.h:31
An Envelope defines a rectangulare region of the 2D coordinate plane.
Definition: Envelope.h:59
Implementation of Dimensionally Extended Nine-Intersection Model (DE-9IM) matrix.
Definition: IntersectionMatrix.h:51
-
void set(Location row, Location column, int dimensionValue)
Changes the value of one of this IntersectionMatrixs elements.
Location
Constants representing the location of a point relative to a geometry.
Definition: Location.h:32
-
@ EXTERIOR
Basic namespace for all GEOS functionalities.
Definition: Angle.h:25
diff --git a/doxygen/IndexedDistanceToPoint_8h_source.html b/doxygen/IndexedDistanceToPoint_8h_source.html index 3ae33ca472..aa116dbd55 100644 --- a/doxygen/IndexedDistanceToPoint_8h_source.html +++ b/doxygen/IndexedDistanceToPoint_8h_source.html @@ -74,37 +74,36 @@
25 #include <geos/algorithm/construct/IndexedPointInPolygonsLocator.h>
26 #include <geos/operation/distance/IndexedFacetDistance.h>
27 
-
28 using geos::geom::Geometry;
-
29 using geos::geom::Point;
-
30 using geos::operation::distance::IndexedFacetDistance;
+
28 namespace geos {
+
29 namespace algorithm { // geos::algorithm
+
30 namespace construct { // geos::algorithm::construct
31 
-
32 namespace geos {
-
33 namespace algorithm { // geos::algorithm
-
34 namespace construct { // geos::algorithm::construct
-
35 
-
45 class GEOS_DLL IndexedDistanceToPoint {
-
46 
-
47 public:
-
53  IndexedDistanceToPoint(const Geometry& geom);
-
54 
-
62  double distance(const Point& pt);
-
63 
-
74  std::unique_ptr<geom::CoordinateSequence> nearestPoints(const Point& pt);
-
75 
-
76 private:
-
77  void init();
-
78 
-
79  bool isInArea(const Point& pt);
-
80 
-
81  //-- members
-
82  const Geometry& targetGeometry;
-
83  std::unique_ptr<operation::distance::IndexedFacetDistance> facetDistance;
-
84  std::unique_ptr<IndexedPointInPolygonsLocator> ptLocator;
-
85 
-
86 };
-
87 
-
88 }}}
-
Computes the distance between a point and a geometry (which may be a collection containing any type o...
Definition: IndexedDistanceToPoint.h:45
+
41 class GEOS_DLL IndexedDistanceToPoint {
+
42  using Geometry = geos::geom::Geometry;
+
43  using Point = geos::geom::Point;
+
44  using IndexedFacetDistance = geos::operation::distance::IndexedFacetDistance;
+
45 
+
46 public:
+
52  IndexedDistanceToPoint(const Geometry& geom);
+
53 
+
61  double distance(const Point& pt);
+
62 
+
73  std::unique_ptr<geom::CoordinateSequence> nearestPoints(const Point& pt);
+
74 
+
75 private:
+
76  void init();
+
77 
+
78  bool isInArea(const Point& pt);
+
79 
+
80  //-- members
+
81  const Geometry& targetGeometry;
+
82  std::unique_ptr<operation::distance::IndexedFacetDistance> facetDistance;
+
83  std::unique_ptr<IndexedPointInPolygonsLocator> ptLocator;
+
84 
+
85 };
+
86 
+
87 }}}
+
Computes the distance between a point and a geometry (which may be a collection containing any type o...
Definition: IndexedDistanceToPoint.h:41
IndexedDistanceToPoint(const Geometry &geom)
Creates an instance to find the distance from points to a geometry.
std::unique_ptr< geom::CoordinateSequence > nearestPoints(const Point &pt)
Computes the nearest point on the geometry to the point.
double distance(const Point &pt)
Computes the distance from the base geometry to the given point.
diff --git a/doxygen/IndexedNestedHoleTester_8h_source.html b/doxygen/IndexedNestedHoleTester_8h_source.html index dbbce4c5a2..39ae240ecc 100644 --- a/doxygen/IndexedNestedHoleTester_8h_source.html +++ b/doxygen/IndexedNestedHoleTester_8h_source.html @@ -83,42 +83,40 @@
34 namespace operation { // geos.operation
35 namespace valid { // geos.operation.valid
36 
-
37 using geos::geom::Polygon;
-
38 using geos::geom::LinearRing;
-
39 using geos::geom::CoordinateXY;
-
40 
+
37 class GEOS_DLL IndexedNestedHoleTester {
+
38  using Polygon = geos::geom::Polygon;
+
39  using LinearRing = geos::geom::LinearRing;
+
40  using CoordinateXY = geos::geom::CoordinateXY;
41 
-
42 class GEOS_DLL IndexedNestedHoleTester {
+
42 private:
43 
-
44 private:
-
45 
-
46  const Polygon* polygon;
-
47  index::strtree::TemplateSTRtree<const LinearRing*> index;
-
48  CoordinateXY nestedPt;
+
44  const Polygon* polygon;
+
45  index::strtree::TemplateSTRtree<const LinearRing*> index;
+
46  CoordinateXY nestedPt;
+
47 
+
48  void loadIndex();
49 
-
50  void loadIndex();
-
51 
+
50 
+
51 public:
52 
-
53 public:
-
54 
-
55  IndexedNestedHoleTester(const Polygon* p_polygon)
-
56  : polygon(p_polygon)
-
57  {
-
58  loadIndex();
-
59  }
-
60 
-
66  const CoordinateXY& getNestedPoint() { return nestedPt; }
-
67 
-
74  bool isNested();
+
53  IndexedNestedHoleTester(const Polygon* p_polygon)
+
54  : polygon(p_polygon)
+
55  {
+
56  loadIndex();
+
57  }
+
58 
+
64  const CoordinateXY& getNestedPoint() { return nestedPt; }
+
65 
+
72  bool isNested();
+
73 
+
74 };
75 
-
76 };
+
76 
77 
-
78 
-
79 
-
80 } // namespace geos.operation.valid
-
81 } // namespace geos.operation
-
82 } // namespace geos
-
83 
+
78 } // namespace geos.operation.valid
+
79 } // namespace geos.operation
+
80 } // namespace geos
+
81 
Models an OGC SFS LinearRing. A LinearRing is a LineString which is both closed and simple.
Definition: LinearRing.h:54
Represents a linear polygon, which may include holes.
Definition: Polygon.h:61
Basic namespace for all GEOS functionalities.
Definition: Angle.h:25
diff --git a/doxygen/IndexedNestedPolygonTester_8h_source.html b/doxygen/IndexedNestedPolygonTester_8h_source.html index dd88937775..984999e03c 100644 --- a/doxygen/IndexedNestedPolygonTester_8h_source.html +++ b/doxygen/IndexedNestedPolygonTester_8h_source.html @@ -86,14 +86,14 @@
37 namespace operation { // geos.operation
38 namespace valid { // geos.operation.valid
39 
-
40 using geos::geom::Polygon;
-
41 using geos::geom::MultiPolygon;
-
42 using geos::geom::LinearRing;
-
43 using geos::geom::CoordinateXY;
-
44 using algorithm::locate::IndexedPointInAreaLocator;
-
45 using index::strtree::TemplateSTRtree;
-
46 
-
47 class GEOS_DLL IndexedNestedPolygonTester {
+
40 class GEOS_DLL IndexedNestedPolygonTester {
+
41  using Polygon = geos::geom::Polygon;
+
42  using MultiPolygon = geos::geom::MultiPolygon;
+
43  using LinearRing = geos::geom::LinearRing;
+
44  using CoordinateXY = geos::geom::CoordinateXY;
+
45  using IndexedPointInAreaLocator = algorithm::locate::IndexedPointInAreaLocator;
+
46  template<typename ItemType>
+
47  using TemplateSTRtree = index::strtree::TemplateSTRtree<ItemType>;
48 
49 private:
50 
diff --git a/doxygen/IndexedPointInPolygonsLocator_8h_source.html b/doxygen/IndexedPointInPolygonsLocator_8h_source.html index 070e32fb51..2cfe6c4d8f 100644 --- a/doxygen/IndexedPointInPolygonsLocator_8h_source.html +++ b/doxygen/IndexedPointInPolygonsLocator_8h_source.html @@ -74,22 +74,22 @@
25 #include <geos/index/strtree/TemplateSTRtree.h>
26 #include <geos/algorithm/locate/IndexedPointInAreaLocator.h>
27 
-
28 using geos::geom::Geometry;
-
29 using geos::geom::CoordinateXY;
-
30 using geos::geom::Location;
-
31 using geos::index::strtree::TemplateSTRtree;
-
32 using geos::algorithm::locate::IndexedPointInAreaLocator;
-
33 
-
34 namespace geos {
-
35 namespace algorithm { // geos::algorithm
-
36 namespace construct { // geos::algorithm::construct
-
37 
-
45 class GEOS_DLL IndexedPointInPolygonsLocator {
+
28 namespace geos {
+
29 namespace algorithm { // geos::algorithm
+
30 namespace construct { // geos::algorithm::construct
+
31 
+
39 class GEOS_DLL IndexedPointInPolygonsLocator {
+
40  using Geometry = geos::geom::Geometry;
+
41  using CoordinateXY = geos::geom::CoordinateXY;
+
42  using Location = geos::geom::Location;
+
43  template<typename ItemType>
+
44  using TemplateSTRtree = geos::index::strtree::TemplateSTRtree<ItemType>;
+
45  using IndexedPointInAreaLocator = geos::algorithm::locate::IndexedPointInAreaLocator;
46 
47 public:
53  IndexedPointInPolygonsLocator(const Geometry& geom);
54 
-
63  Location locate(const CoordinateXY* /*const*/ p);
+
63  Location locate(const CoordinateXY* /*const*/ p);
64 
65 private:
66  void init();
@@ -106,7 +106,7 @@
77 };
78 
79 }}}
-
Determines the location of a point in the polygonal elements of a geometry.
Definition: IndexedPointInPolygonsLocator.h:45
+
Determines the location of a point in the polygonal elements of a geometry.
Definition: IndexedPointInPolygonsLocator.h:39
Location locate(const CoordinateXY *p)
Determines the Location of a point in the polygonal elements of a Geometry.
IndexedPointInPolygonsLocator(const Geometry &geom)
Creates an instance to locate a point in polygonal elements.
Determines the location of Coordinates relative to an areal geometry, using indexing for efficiency.
Definition: IndexedPointInAreaLocator.h:54
diff --git a/doxygen/InputGeometry_8h_source.html b/doxygen/InputGeometry_8h_source.html index ae1037e1b4..0adf755141 100644 --- a/doxygen/InputGeometry_8h_source.html +++ b/doxygen/InputGeometry_8h_source.html @@ -78,57 +78,60 @@
29 namespace overlayng { // geos.operation.overlayng
30 
31 
-
41 using namespace geos::algorithm::locate;
-
42 using namespace geos::geom;
-
43 
-
44 class GEOS_DLL InputGeometry {
-
45 
-
46 private:
+
41 class GEOS_DLL InputGeometry {
+
42  using Geometry = geos::geom::Geometry;
+
43  using Envelope = geos::geom::Envelope;
+
44  using Coordinate = geos::geom::Coordinate;
+
45  using Location = geos::geom::Location;
+
46  using PointOnGeometryLocator = geos::algorithm::locate::PointOnGeometryLocator;
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 
+
48 private:
+
49 
+
50  // Members
+
51  std::array<const Geometry*, 2> geom;
+
52  std::unique_ptr<PointOnGeometryLocator> ptLocatorA;
+
53  std::unique_ptr<PointOnGeometryLocator> ptLocatorB;
+
54  std::array<bool, 2> isCollapsed;
55 
-
56 public:
+
56 
57 
-
58  InputGeometry(const Geometry* geomA, const Geometry* geomB);
+
58 public:
59 
-
60  bool isSingle() const;
-
61  int getDimension(uint8_t index) const;
-
62  const Geometry* getGeometry(uint8_t geomIndex) const;
-
63  const Envelope* getEnvelope(uint8_t geomIndex) const;
-
64  bool isEmpty(uint8_t geomIndex) const;
-
65  bool isArea(uint8_t geomIndex) const;
-
66  int getAreaIndex() const;
-
67  bool isLine(uint8_t geomIndex) const;
-
68  bool isAllPoints() const;
-
69  bool hasPoints() const;
-
70 
-
78  bool hasEdges(uint8_t geomIndex) const;
-
79 
-
91  Location locatePointInArea(uint8_t geomIndex, const Coordinate& pt);
-
92 
-
93  PointOnGeometryLocator* getLocator(uint8_t geomIndex);
-
94  void setCollapsed(uint8_t geomIndex, bool isGeomCollapsed);
-
95 
-
96 
-
97 };
+
60  InputGeometry(const Geometry* geomA, const Geometry* geomB);
+
61 
+
62  bool isSingle() const;
+
63  int getDimension(uint8_t index) const;
+
64  const Geometry* getGeometry(uint8_t geomIndex) const;
+
65  const Envelope* getEnvelope(uint8_t geomIndex) const;
+
66  bool isEmpty(uint8_t geomIndex) const;
+
67  bool isArea(uint8_t geomIndex) const;
+
68  int getAreaIndex() const;
+
69  bool isLine(uint8_t geomIndex) const;
+
70  bool isAllPoints() const;
+
71  bool hasPoints() const;
+
72 
+
80  bool hasEdges(uint8_t geomIndex) const;
+
81 
+
93  Location locatePointInArea(uint8_t geomIndex, const Coordinate& pt);
+
94 
+
95  PointOnGeometryLocator* getLocator(uint8_t geomIndex);
+
96  void setCollapsed(uint8_t geomIndex, bool isGeomCollapsed);
+
97 
98 
-
99 
-
100 } // namespace geos.operation.overlayng
-
101 } // namespace geos.operation
-
102 } // namespace geos
-
103 
+
99 };
+
100 
+
101 
+
102 } // namespace geos.operation.overlayng
+
103 } // namespace geos.operation
+
104 } // namespace geos
+
105 
An interface for classes which determine the Location of points in Polygon or MultiPolygon geometries...
Definition: PointOnGeometryLocator.h:36
Coordinate is the lightweight class used to store coordinates.
Definition: Coordinate.h:217
An Envelope defines a rectangulare region of the 2D coordinate plane.
Definition: Envelope.h:59
Basic implementation of Geometry, constructed and destructed by GeometryFactory.
Definition: Geometry.h:197
-
Classes which determine the Location of points in geometries.
Definition: IndexedPointInAreaLocator.h:40
-
Definition: Angle.h:26
+
Definition: InputGeometry.h:41
+
bool hasEdges(uint8_t geomIndex) const
+
Location locatePointInArea(uint8_t geomIndex, const Coordinate &pt)
Location
Constants representing the location of a point relative to a geometry.
Definition: Location.h:32
Basic namespace for all GEOS functionalities.
Definition: Angle.h:25
diff --git a/doxygen/IntersectionPointBuilder_8h_source.html b/doxygen/IntersectionPointBuilder_8h_source.html index 71e54b9ac6..a786665182 100644 --- a/doxygen/IntersectionPointBuilder_8h_source.html +++ b/doxygen/IntersectionPointBuilder_8h_source.html @@ -134,10 +134,10 @@
113 
Supplies a set of utility methods for building Geometry objects from CoordinateSequence or other Geom...
Definition: GeometryFactory.h:70
Definition: IntersectionPointBuilder.h:60
-
Definition: OverlayEdge.h:52
-
Definition: OverlayGraph.h:54
-
Definition: OverlayLabel.h:89
-
static constexpr bool STRICT_MODE_DEFAULT
Definition: OverlayNG.h:170
+
Definition: OverlayEdge.h:47
+
Definition: OverlayGraph.h:52
+
Definition: OverlayLabel.h:86
+
static constexpr bool STRICT_MODE_DEFAULT
Definition: OverlayNG.h:173
Basic namespace for all GEOS functionalities.
Definition: Angle.h:25
diff --git a/doxygen/InvalidSegmentDetector_8h_source.html b/doxygen/InvalidSegmentDetector_8h_source.html index 0e2addae4d..566a847b45 100644 --- a/doxygen/InvalidSegmentDetector_8h_source.html +++ b/doxygen/InvalidSegmentDetector_8h_source.html @@ -69,7 +69,7 @@
20 // Forward declarations
21 namespace geos {
22 namespace geom {
-
23 class Coordinate;
+
23 class Coordinate;
24 }
25 namespace noding {
26 class SegmentString;
@@ -79,76 +79,72 @@
30 }
31 }
32 
-
33 
-
34 using geos::noding::SegmentIntersector;
-
35 using geos::noding::SegmentString;
-
36 using geos::geom::Coordinate;
-
37 
-
38 
-
39 namespace geos { // geos.
-
40 namespace coverage { // geos.coverage
-
41 
-
55 class GEOS_DLL InvalidSegmentDetector : public SegmentIntersector {
-
56 
-
57 private:
-
58 
-
59  // Members
-
60  double distanceTol;
-
61 
-
62  // Methods
-
63  bool isInvalid(const Coordinate& tgt0, const Coordinate& tgt1,
-
64  const Coordinate& adj0, const Coordinate& adj1,
-
65  CoverageRing* adj, std::size_t indexAdj);
+
33 namespace geos { // geos.
+
34 namespace coverage { // geos.coverage
+
35 
+
49 class GEOS_DLL InvalidSegmentDetector : public geos::noding::SegmentIntersector {
+
50  using SegmentString = geos::noding::SegmentString;
+
51  using Coordinate = geos::geom::Coordinate;
+
52 
+
53 private:
+
54 
+
55  // Members
+
56  double distanceTol;
+
57 
+
58  // Methods
+
59  bool isInvalid(const Coordinate& tgt0, const Coordinate& tgt1,
+
60  const Coordinate& adj0, const Coordinate& adj1,
+
61  CoverageRing* adj, std::size_t indexAdj);
+
62 
+
63  bool isEqual(
+
64  const Coordinate& t0, const Coordinate& t1,
+
65  const Coordinate& adj0, const Coordinate& adj1);
66 
-
67  bool isEqual(
-
68  const Coordinate& t0, const Coordinate& t1,
-
69  const Coordinate& adj0, const Coordinate& adj1);
-
70 
-
84  bool isCollinearOrInterior(
-
85  const Coordinate& tgt0, const Coordinate& tgt1,
-
86  const Coordinate& adj0, const Coordinate& adj1,
-
87  CoverageRing* adj, std::size_t indexAdj);
-
88 
-
89  bool isInteriorSegment(
-
90  const Coordinate& intVertex,
-
91  const Coordinate& tgt0, const Coordinate& tgt1,
-
92  CoverageRing* adj, std::size_t indexAdj);
-
93 
-
94  static bool isNearlyParallel(
-
95  const Coordinate& p00, const Coordinate& p01,
-
96  const Coordinate& p10, const Coordinate& p11,
-
97  double distanceTol);
-
98 
-
99 
-
100 public:
-
101 
-
105  InvalidSegmentDetector() {};
+
80  bool isCollinearOrInterior(
+
81  const Coordinate& tgt0, const Coordinate& tgt1,
+
82  const Coordinate& adj0, const Coordinate& adj1,
+
83  CoverageRing* adj, std::size_t indexAdj);
+
84 
+
85  bool isInteriorSegment(
+
86  const Coordinate& intVertex,
+
87  const Coordinate& tgt0, const Coordinate& tgt1,
+
88  CoverageRing* adj, std::size_t indexAdj);
+
89 
+
90  static bool isNearlyParallel(
+
91  const Coordinate& p00, const Coordinate& p01,
+
92  const Coordinate& p10, const Coordinate& p11,
+
93  double distanceTol);
+
94 
+
95 
+
96 public:
+
97 
+
101  InvalidSegmentDetector() {};
+
102 
+
103  InvalidSegmentDetector(double p_distanceTol)
+
104  : distanceTol(p_distanceTol) {};
+
105 
106 
-
107  InvalidSegmentDetector(double p_distanceTol)
-
108  : distanceTol(p_distanceTol) {};
-
109 
-
110 
-
111  bool isDone() const override {
-
112  // process all intersections
-
113  return false;
-
114  };
-
115 
-
122  void processIntersections(
-
123  SegmentString* ssAdj, std::size_t iAdj,
-
124  SegmentString* ssTarget, std::size_t iTarget) override;
+
107  bool isDone() const override {
+
108  // process all intersections
+
109  return false;
+
110  };
+
111 
+
118  void processIntersections(
+
119  SegmentString* ssAdj, std::size_t iAdj,
+
120  SegmentString* ssTarget, std::size_t iTarget) override;
+
121 
+
122 
+
123 
+
124 };
125 
-
126 
-
127 
-
128 };
+
126 } // namespace geos.coverage
+
127 } // namespace geos
+
128 
129 
-
130 } // namespace geos.coverage
-
131 } // namespace geos
-
132 
-
133 
-
Definition: InvalidSegmentDetector.h:55
+
Definition: InvalidSegmentDetector.h:49
void processIntersections(SegmentString *ssAdj, std::size_t iAdj, SegmentString *ssTarget, std::size_t iTarget) override
-
bool isDone() const override
Reports whether the client of this class needs to continue testing all intersections in an arrangemen...
Definition: InvalidSegmentDetector.h:111
-
InvalidSegmentDetector()
Definition: InvalidSegmentDetector.h:105
+
bool isDone() const override
Reports whether the client of this class needs to continue testing all intersections in an arrangemen...
Definition: InvalidSegmentDetector.h:107
+
InvalidSegmentDetector()
Definition: InvalidSegmentDetector.h:101
Coordinate is the lightweight class used to store coordinates.
Definition: Coordinate.h:217
Processes possible intersections detected by a Noder.
Definition: noding/SegmentIntersector.h:45
An interface for classes which represent a sequence of contiguous line segments.
Definition: SegmentString.h:47
diff --git a/doxygen/IsValidOp_8h_source.html b/doxygen/IsValidOp_8h_source.html index 0bc4471ee7..b0824dfd7f 100644 --- a/doxygen/IsValidOp_8h_source.html +++ b/doxygen/IsValidOp_8h_source.html @@ -97,104 +97,105 @@
48 namespace valid { // geos.operation.valid
49 
57 class GEOS_DLL IsValidOp {
-
58 
-
59 private:
-
60 
-
61  static constexpr int MIN_SIZE_LINESTRING = 2;
-
62  static constexpr int MIN_SIZE_RING = 4;
-
63 
-
67  const geom::Geometry* inputGeometry;
-
72  bool isInvertedRingValid = false;
-
73  std::unique_ptr<TopologyValidationError> validErr;
-
74 
-
75  bool hasInvalidError()
-
76  {
-
77  return validErr != nullptr;
-
78  }
-
79 
-
80  void logInvalid(int code, const geom::CoordinateXY& pt);
-
81 
-
82  bool isValidGeometry(const geom::Geometry* g);
-
83 
-
87  bool isValid(const geom::Point* g);
-
88 
-
92  bool isValid(const geom::MultiPoint* g);
-
93 
-
98  bool isValid(const geom::LineString* g);
-
99 
-
103  bool isValid(const geom::LinearRing* g);
-
104 
-
109  bool isValid(const geom::Polygon* g);
-
110 
-
117  bool isValid(const geom::MultiPolygon* g);
-
118 
-
125  bool isValid(const geom::GeometryCollection* gc);
-
126 
-
127  void checkCoordinatesValid(const geom::CoordinateSequence* coords);
-
128  void checkCoordinatesValid(const geom::Polygon* poly);
-
129  void checkRingClosed(const geom::LinearRing* ring);
-
130  void checkRingsClosed(const geom::Polygon* poly);
-
131  void checkRingsPointSize(const geom::Polygon* poly);
-
132  void checkRingPointSize(const geom::LinearRing* ring);
-
133 
-
140  void checkTooFewPoints(const geom::LineString* line, std::size_t minSize);
-
141 
-
150  bool isNonRepeatedSizeAtLeast(const geom::LineString* line, std::size_t minSize);
-
151 
-
152  void checkAreaIntersections(PolygonTopologyAnalyzer& areaAnalyzer);
-
153 
-
159  void checkRingSimple(const geom::LinearRing* ring);
-
160 
+
58  using CoordinateXY = geos::geom::CoordinateXY;
+
59 
+
60 private:
+
61 
+
62  static constexpr int MIN_SIZE_LINESTRING = 2;
+
63  static constexpr int MIN_SIZE_RING = 4;
+
64 
+
68  const geom::Geometry* inputGeometry;
+
73  bool isInvertedRingValid = false;
+
74  std::unique_ptr<TopologyValidationError> validErr;
+
75 
+
76  bool hasInvalidError()
+
77  {
+
78  return validErr != nullptr;
+
79  }
+
80 
+
81  void logInvalid(int code, const geom::CoordinateXY& pt);
+
82 
+
83  bool isValidGeometry(const geom::Geometry* g);
+
84 
+
88  bool isValid(const geom::Point* g);
+
89 
+
93  bool isValid(const geom::MultiPoint* g);
+
94 
+
99  bool isValid(const geom::LineString* g);
+
100 
+
104  bool isValid(const geom::LinearRing* g);
+
105 
+
110  bool isValid(const geom::Polygon* g);
+
111 
+
118  bool isValid(const geom::MultiPolygon* g);
+
119 
+
126  bool isValid(const geom::GeometryCollection* gc);
+
127 
+
128  void checkCoordinatesValid(const geom::CoordinateSequence* coords);
+
129  void checkCoordinatesValid(const geom::Polygon* poly);
+
130  void checkRingClosed(const geom::LinearRing* ring);
+
131  void checkRingsClosed(const geom::Polygon* poly);
+
132  void checkRingsPointSize(const geom::Polygon* poly);
+
133  void checkRingPointSize(const geom::LinearRing* ring);
+
134 
+
141  void checkTooFewPoints(const geom::LineString* line, std::size_t minSize);
+
142 
+
151  bool isNonRepeatedSizeAtLeast(const geom::LineString* line, std::size_t minSize);
+
152 
+
153  void checkAreaIntersections(PolygonTopologyAnalyzer& areaAnalyzer);
+
154 
+
160  void checkRingSimple(const geom::LinearRing* ring);
161 
-
172  void checkHolesInShell(const geom::Polygon* poly);
-
173 
-
185  const CoordinateXY* findHoleOutsideShellPoint(
-
186  const geom::LinearRing* hole,
-
187  const geom::LinearRing* shell);
-
188 
-
196  void checkHolesNotNested(const geom::Polygon* poly);
-
197 
-
209  void checkShellsNotNested(const geom::MultiPolygon* mp);
-
210 
-
211  void checkInteriorConnected(PolygonTopologyAnalyzer& areaAnalyzer);
-
212 
+
162 
+
173  void checkHolesInShell(const geom::Polygon* poly);
+
174 
+
186  const CoordinateXY* findHoleOutsideShellPoint(
+
187  const geom::LinearRing* hole,
+
188  const geom::LinearRing* shell);
+
189 
+
197  void checkHolesNotNested(const geom::Polygon* poly);
+
198 
+
210  void checkShellsNotNested(const geom::MultiPolygon* mp);
+
211 
+
212  void checkInteriorConnected(PolygonTopologyAnalyzer& areaAnalyzer);
213 
-
214 public:
-
215 
-
221  IsValidOp(const geom::Geometry* p_inputGeometry)
-
222  : inputGeometry(p_inputGeometry)
-
223  , validErr(nullptr)
-
224  {};
-
225 
-
253  void setSelfTouchingRingFormingHoleValid(bool p_isValid)
-
254  {
-
255  isInvertedRingValid = p_isValid;
-
256  };
-
257 
-
263  static bool isValid(const geom::Geometry* geom)
-
264  {
-
265  IsValidOp ivo(geom);
-
266  return ivo.isValid();
-
267  };
-
268 
-
269  static bool isValid(const geom::CoordinateXY& coord)
-
270  {
-
271  return isValid(&coord);
-
272  }
-
273 
-
279  bool isValid();
-
280 
-
289  static bool isValid(const geom::CoordinateXY* coord);
-
290 
-
299  const TopologyValidationError* getValidationError();
-
300 
+
214 
+
215 public:
+
216 
+
222  IsValidOp(const geom::Geometry* p_inputGeometry)
+
223  : inputGeometry(p_inputGeometry)
+
224  , validErr(nullptr)
+
225  {};
+
226 
+
254  void setSelfTouchingRingFormingHoleValid(bool p_isValid)
+
255  {
+
256  isInvertedRingValid = p_isValid;
+
257  };
+
258 
+
264  static bool isValid(const geom::Geometry* geom)
+
265  {
+
266  IsValidOp ivo(geom);
+
267  return ivo.isValid();
+
268  };
+
269 
+
270  static bool isValid(const geom::CoordinateXY& coord)
+
271  {
+
272  return isValid(&coord);
+
273  }
+
274 
+
280  bool isValid();
+
281 
+
290  static bool isValid(const geom::CoordinateXY* coord);
+
291 
+
300  const TopologyValidationError* getValidationError();
301 
-
302 };
-
303 
+
302 
+
303 };
304 
-
305 } // namespace geos.operation.valid
-
306 } // namespace geos.operation
-
307 } // namespace geos
+
305 
+
306 } // namespace geos.operation.valid
+
307 } // namespace geos.operation
+
308 } // namespace geos
The internal representation of a list of coordinates inside a Geometry.
Definition: CoordinateSequence.h:56
Represents a collection of heterogeneous Geometry objects.
Definition: GeometryCollection.h:51
Basic implementation of Geometry, constructed and destructed by GeometryFactory.
Definition: Geometry.h:197
@@ -205,12 +206,12 @@
Definition: Point.h:61
Represents a linear polygon, which may include holes.
Definition: Polygon.h:61
Definition: IsValidOp.h:57
-
IsValidOp(const geom::Geometry *p_inputGeometry)
Definition: IsValidOp.h:221
+
IsValidOp(const geom::Geometry *p_inputGeometry)
Definition: IsValidOp.h:222
static bool isValid(const geom::CoordinateXY *coord)
bool isValid()
const TopologyValidationError * getValidationError()
-
void setSelfTouchingRingFormingHoleValid(bool p_isValid)
Definition: IsValidOp.h:253
-
static bool isValid(const geom::Geometry *geom)
Definition: IsValidOp.h:263
+
void setSelfTouchingRingFormingHoleValid(bool p_isValid)
Definition: IsValidOp.h:254
+
static bool isValid(const geom::Geometry *geom)
Definition: IsValidOp.h:264
Contains information about the nature and location of a geom::Geometry validation error.
Definition: TopologyValidationError.h:39
Basic namespace for all GEOS functionalities.
Definition: Angle.h:25
diff --git a/doxygen/Label_8h_source.html b/doxygen/Label_8h_source.html index 455f8b3736..83706ea627 100644 --- a/doxygen/Label_8h_source.html +++ b/doxygen/Label_8h_source.html @@ -80,209 +80,211 @@
31 namespace geomgraph { // geos.geomgraph
32 
57 class GEOS_DLL Label final {
-
58 
-
59 public:
-
60 
-
61  friend std::ostream& operator<< (std::ostream&, const Label&);
-
62 
-
68  static Label toLineLabel(const Label& label)
-
69  {
-
70  Label lineLabel(geom::Location::NONE);
-
71  for(uint32_t i = 0; i < 2; i++) {
-
72  lineLabel.setLocation(i, label.getLocation(i));
-
73  }
-
74  return lineLabel;
-
75  };
-
76 
-
80  Label(geom::Location onLoc)
-
81  : elt{TopologyLocation(onLoc)
-
82  , TopologyLocation(onLoc)}
-
83  {};
-
84 
-
92  Label(uint32_t geomIndex, geom::Location onLoc)
-
93  : elt{TopologyLocation(geom::Location::NONE)
-
94  , TopologyLocation(geom::Location::NONE)}
-
95  {
-
96  assert(geomIndex < 2);
-
97  elt[geomIndex].setLocation(onLoc);
-
98  };
-
99 
-
105  Label(geom::Location onLoc, geom::Location leftLoc, geom::Location rightLoc)
-
106  : elt {TopologyLocation(onLoc, leftLoc, rightLoc)
-
107  , TopologyLocation(onLoc, leftLoc, rightLoc)}
-
108  {};
-
109 
-
111  Label(const Label& l)
-
112  : elt{TopologyLocation(l.elt[0])
-
113  , TopologyLocation(l.elt[1])}
-
114  {};
-
115 
-
121  Label()
-
122  : elt{TopologyLocation(geom::Location::NONE)
-
123  , TopologyLocation(geom::Location::NONE)}
-
124  {};
-
125 
-
132  Label(uint32_t geomIndex, geom::Location onLoc, geom::Location leftLoc, geom::Location rightLoc)
-
133  {
-
134  elt[0] = TopologyLocation(geom::Location::NONE, geom::Location::NONE, geom::Location::NONE);
-
135  elt[1] = TopologyLocation(geom::Location::NONE, geom::Location::NONE, geom::Location::NONE);
-
136  elt[geomIndex].setLocations(onLoc, leftLoc, rightLoc);
-
137  };
-
138 
-
139  Label&
-
140  operator=(const Label& l)
-
141  {
-
142  elt[0] = TopologyLocation(l.elt[0]);
-
143  elt[1] = TopologyLocation(l.elt[1]);
-
144  return *this;
-
145  };
-
146 
-
147  void flip()
-
148  {
-
149  elt[0].flip();
-
150  elt[1].flip();
-
151  };
-
152 
-
159  void merge(const Label& lbl)
-
160  {
-
161  for(int i = 0; i < 2; i++) {
-
162  elt[i].merge(lbl.elt[i]);
-
163  }
-
164  };
-
165 
-
166  int getGeometryCount() const
-
167  {
-
168  int count = 0;
-
169  if(!elt[0].isNull()) {
-
170  count++;
-
171  }
-
172  if(!elt[1].isNull()) {
-
173  count++;
-
174  }
-
175  return count;
-
176  };
-
177 
-
178  geom::Location getLocation(uint32_t geomIndex, uint32_t posIndex) const
-
179  {
-
180  assert(geomIndex < 2);
-
181  return elt[geomIndex].get(posIndex);
-
182  };
-
183 
-
184  geom::Location getLocation(uint32_t geomIndex) const
-
185  {
-
186  assert(geomIndex < 2);
-
187  return elt[geomIndex].get(Position::ON);
-
188  };
-
189 
-
190  void setLocation(uint32_t geomIndex, uint32_t posIndex, geom::Location location)
-
191  {
-
192  assert(geomIndex < 2);
-
193  elt[geomIndex].setLocation(posIndex, location);
-
194  };
-
195 
-
196  void setLocation(uint32_t geomIndex, geom::Location location)
-
197  {
-
198  assert(geomIndex < 2);
-
199  elt[geomIndex].setLocation(Position::ON, location);
-
200  };
-
201 
-
202  void setAllLocations(uint32_t geomIndex, geom::Location location)
-
203  {
-
204  assert(geomIndex < 2);
-
205  elt[geomIndex].setAllLocations(location);
-
206  };
-
207 
-
208  void setAllLocationsIfNull(uint32_t geomIndex, geom::Location location)
-
209  {
-
210  assert(geomIndex < 2);
-
211  elt[geomIndex].setAllLocationsIfNull(location);
-
212  };
-
213 
-
214  void setAllLocationsIfNull(geom::Location location)
-
215  {
-
216  setAllLocationsIfNull(0, location);
-
217  setAllLocationsIfNull(1, location);
-
218  };
-
219 
-
220  bool isNull(uint32_t geomIndex) const
-
221  {
-
222  assert(geomIndex < 2);
-
223  return elt[geomIndex].isNull();
-
224  };
-
225 
-
226  bool isNull() const
-
227  {
-
228  return elt[0].isNull() && elt[1].isNull();
-
229  };
-
230 
-
231  bool isAnyNull(uint32_t geomIndex) const
-
232  {
-
233  assert(geomIndex < 2);
-
234  return elt[geomIndex].isAnyNull();
-
235  };
-
236 
-
237  bool isArea() const
-
238  {
-
239  return elt[0].isArea() || elt[1].isArea();
-
240  };
-
241 
-
242  bool isArea(uint32_t geomIndex) const
-
243  {
-
244  assert(geomIndex < 2);
-
245  return elt[geomIndex].isArea();
-
246  };
-
247 
-
248  bool isLine(uint32_t geomIndex) const
-
249  {
-
250  assert(geomIndex < 2);
-
251  return elt[geomIndex].isLine();
-
252  };
-
253 
-
254  bool isEqualOnSide(const Label& lbl, uint32_t side) const
-
255  {
-
256  return elt[0].isEqualOnSide(lbl.elt[0], side)
-
257  && elt[1].isEqualOnSide(lbl.elt[1], side);
-
258  };
-
259 
-
260  bool allPositionsEqual(uint32_t geomIndex, geom::Location loc) const
-
261  {
-
262  assert(geomIndex < 2);
-
263  return elt[geomIndex].allPositionsEqual(loc);
-
264  };
-
265 
-
269  void toLine(uint32_t geomIndex)
-
270  {
-
271  assert(geomIndex < 2);
-
272  if(elt[geomIndex].isArea()) {
-
273  elt[geomIndex] = TopologyLocation(elt[geomIndex].getLocations()[0]);
-
274  }
-
275  };
-
276 
-
277  std::string toString() const;
-
278 
-
279 private:
-
280 
-
281  TopologyLocation elt[2];
-
282 
-
283 };
-
284 
-
285 std::ostream& operator<< (std::ostream&, const Label&);
-
286 
-
287 } // namespace geos.geomgraph
-
288 } // namespace geos
-
289 
+
58  using Position = geos::geom::Position;
+
59 
+
60 public:
+
61 
+
62  friend std::ostream& operator<< (std::ostream&, const Label&);
+
63 
+
69  static Label toLineLabel(const Label& label)
+
70  {
+
71  Label lineLabel(geom::Location::NONE);
+
72  for(uint32_t i = 0; i < 2; i++) {
+
73  lineLabel.setLocation(i, label.getLocation(i));
+
74  }
+
75  return lineLabel;
+
76  };
+
77 
+
81  Label(geom::Location onLoc)
+
82  : elt{TopologyLocation(onLoc)
+
83  , TopologyLocation(onLoc)}
+
84  {};
+
85 
+
93  Label(uint32_t geomIndex, geom::Location onLoc)
+
94  : elt{TopologyLocation(geom::Location::NONE)
+
95  , TopologyLocation(geom::Location::NONE)}
+
96  {
+
97  assert(geomIndex < 2);
+
98  elt[geomIndex].setLocation(onLoc);
+
99  };
+
100 
+
106  Label(geom::Location onLoc, geom::Location leftLoc, geom::Location rightLoc)
+
107  : elt {TopologyLocation(onLoc, leftLoc, rightLoc)
+
108  , TopologyLocation(onLoc, leftLoc, rightLoc)}
+
109  {};
+
110 
+
112  Label(const Label& l)
+
113  : elt{TopologyLocation(l.elt[0])
+
114  , TopologyLocation(l.elt[1])}
+
115  {};
+
116 
+
122  Label()
+
123  : elt{TopologyLocation(geom::Location::NONE)
+
124  , TopologyLocation(geom::Location::NONE)}
+
125  {};
+
126 
+
133  Label(uint32_t geomIndex, geom::Location onLoc, geom::Location leftLoc, geom::Location rightLoc)
+
134  {
+
135  elt[0] = TopologyLocation(geom::Location::NONE, geom::Location::NONE, geom::Location::NONE);
+
136  elt[1] = TopologyLocation(geom::Location::NONE, geom::Location::NONE, geom::Location::NONE);
+
137  elt[geomIndex].setLocations(onLoc, leftLoc, rightLoc);
+
138  };
+
139 
+
140  Label&
+
141  operator=(const Label& l)
+
142  {
+
143  elt[0] = TopologyLocation(l.elt[0]);
+
144  elt[1] = TopologyLocation(l.elt[1]);
+
145  return *this;
+
146  };
+
147 
+
148  void flip()
+
149  {
+
150  elt[0].flip();
+
151  elt[1].flip();
+
152  };
+
153 
+
160  void merge(const Label& lbl)
+
161  {
+
162  for(int i = 0; i < 2; i++) {
+
163  elt[i].merge(lbl.elt[i]);
+
164  }
+
165  };
+
166 
+
167  int getGeometryCount() const
+
168  {
+
169  int count = 0;
+
170  if(!elt[0].isNull()) {
+
171  count++;
+
172  }
+
173  if(!elt[1].isNull()) {
+
174  count++;
+
175  }
+
176  return count;
+
177  };
+
178 
+
179  geom::Location getLocation(uint32_t geomIndex, uint32_t posIndex) const
+
180  {
+
181  assert(geomIndex < 2);
+
182  return elt[geomIndex].get(posIndex);
+
183  };
+
184 
+
185  geom::Location getLocation(uint32_t geomIndex) const
+
186  {
+
187  assert(geomIndex < 2);
+
188  return elt[geomIndex].get(Position::ON);
+
189  };
+
190 
+
191  void setLocation(uint32_t geomIndex, uint32_t posIndex, geom::Location location)
+
192  {
+
193  assert(geomIndex < 2);
+
194  elt[geomIndex].setLocation(posIndex, location);
+
195  };
+
196 
+
197  void setLocation(uint32_t geomIndex, geom::Location location)
+
198  {
+
199  assert(geomIndex < 2);
+
200  elt[geomIndex].setLocation(Position::ON, location);
+
201  };
+
202 
+
203  void setAllLocations(uint32_t geomIndex, geom::Location location)
+
204  {
+
205  assert(geomIndex < 2);
+
206  elt[geomIndex].setAllLocations(location);
+
207  };
+
208 
+
209  void setAllLocationsIfNull(uint32_t geomIndex, geom::Location location)
+
210  {
+
211  assert(geomIndex < 2);
+
212  elt[geomIndex].setAllLocationsIfNull(location);
+
213  };
+
214 
+
215  void setAllLocationsIfNull(geom::Location location)
+
216  {
+
217  setAllLocationsIfNull(0, location);
+
218  setAllLocationsIfNull(1, location);
+
219  };
+
220 
+
221  bool isNull(uint32_t geomIndex) const
+
222  {
+
223  assert(geomIndex < 2);
+
224  return elt[geomIndex].isNull();
+
225  };
+
226 
+
227  bool isNull() const
+
228  {
+
229  return elt[0].isNull() && elt[1].isNull();
+
230  };
+
231 
+
232  bool isAnyNull(uint32_t geomIndex) const
+
233  {
+
234  assert(geomIndex < 2);
+
235  return elt[geomIndex].isAnyNull();
+
236  };
+
237 
+
238  bool isArea() const
+
239  {
+
240  return elt[0].isArea() || elt[1].isArea();
+
241  };
+
242 
+
243  bool isArea(uint32_t geomIndex) const
+
244  {
+
245  assert(geomIndex < 2);
+
246  return elt[geomIndex].isArea();
+
247  };
+
248 
+
249  bool isLine(uint32_t geomIndex) const
+
250  {
+
251  assert(geomIndex < 2);
+
252  return elt[geomIndex].isLine();
+
253  };
+
254 
+
255  bool isEqualOnSide(const Label& lbl, uint32_t side) const
+
256  {
+
257  return elt[0].isEqualOnSide(lbl.elt[0], side)
+
258  && elt[1].isEqualOnSide(lbl.elt[1], side);
+
259  };
+
260 
+
261  bool allPositionsEqual(uint32_t geomIndex, geom::Location loc) const
+
262  {
+
263  assert(geomIndex < 2);
+
264  return elt[geomIndex].allPositionsEqual(loc);
+
265  };
+
266 
+
270  void toLine(uint32_t geomIndex)
+
271  {
+
272  assert(geomIndex < 2);
+
273  if(elt[geomIndex].isArea()) {
+
274  elt[geomIndex] = TopologyLocation(elt[geomIndex].getLocations()[0]);
+
275  }
+
276  };
+
277 
+
278  std::string toString() const;
+
279 
+
280 private:
+
281 
+
282  TopologyLocation elt[2];
+
283 
+
284 };
+
285 
+
286 std::ostream& operator<< (std::ostream&, const Label&);
+
287 
+
288 } // namespace geos.geomgraph
+
289 } // namespace geos
290 
+
291 
+
A Position indicates the position of a Location relative to a graph component (Node,...
Definition: Position.h:37
A Label indicates the topological relationship of a component of a topology graph to a given Geometry...
Definition: Label.h:57
-
Label(geom::Location onLoc)
Construct a Label with a single location for both Geometries.
Definition: Label.h:80
-
Label(geom::Location onLoc, geom::Location leftLoc, geom::Location rightLoc)
Construct a Label with On, Left and Right locations for both Geometries.
Definition: Label.h:105
-
void merge(const Label &lbl)
Merge this label with another one.
Definition: Label.h:159
-
Label(uint32_t geomIndex, geom::Location onLoc)
Construct a Label with the location specified for the given Geometry.
Definition: Label.h:92
-
Label()
Initialize both locations to Location::NONE.
Definition: Label.h:121
-
static Label toLineLabel(const Label &label)
Converts a Label to a Line label (that is, one with no side Locations)
Definition: Label.h:68
-
Label(const Label &l)
Copy ctor.
Definition: Label.h:111
-
Label(uint32_t geomIndex, geom::Location onLoc, geom::Location leftLoc, geom::Location rightLoc)
Construct a Label with On, Left and Right locations for the given Geometries. Initialize the location...
Definition: Label.h:132
-
void toLine(uint32_t geomIndex)
Converts one GeometryLocation to a Line location.
Definition: Label.h:269
-
A TopologyLocation is the labelling of a GraphComponent's topological relationship to a single Geomet...
Definition: TopologyLocation.h:63
+
Label(geom::Location onLoc)
Construct a Label with a single location for both Geometries.
Definition: Label.h:81
+
Label(geom::Location onLoc, geom::Location leftLoc, geom::Location rightLoc)
Construct a Label with On, Left and Right locations for both Geometries.
Definition: Label.h:106
+
void merge(const Label &lbl)
Merge this label with another one.
Definition: Label.h:160
+
Label(uint32_t geomIndex, geom::Location onLoc)
Construct a Label with the location specified for the given Geometry.
Definition: Label.h:93
+
Label()
Initialize both locations to Location::NONE.
Definition: Label.h:122
+
static Label toLineLabel(const Label &label)
Converts a Label to a Line label (that is, one with no side Locations)
Definition: Label.h:69
+
Label(const Label &l)
Copy ctor.
Definition: Label.h:112
+
Label(uint32_t geomIndex, geom::Location onLoc, geom::Location leftLoc, geom::Location rightLoc)
Construct a Label with On, Left and Right locations for the given Geometries. Initialize the location...
Definition: Label.h:133
+
void toLine(uint32_t geomIndex)
Converts one GeometryLocation to a Line location.
Definition: Label.h:270
+
A TopologyLocation is the labelling of a GraphComponent's topological relationship to a single Geomet...
Definition: TopologyLocation.h:60
Location
Constants representing the location of a point relative to a geometry.
Definition: Location.h:32
@ NONE
Basic namespace for all GEOS functionalities.
Definition: Angle.h:25
diff --git a/doxygen/LargestEmptyCircle_8h_source.html b/doxygen/LargestEmptyCircle_8h_source.html index 85135315a9..a6ee82c68f 100644 --- a/doxygen/LargestEmptyCircle_8h_source.html +++ b/doxygen/LargestEmptyCircle_8h_source.html @@ -82,137 +82,136 @@
33 namespace geom {
34 class Coordinate;
35 class Envelope;
-
36 class Geometry;
+
36 class Geometry;
37 class GeometryFactory;
38 class LineString;
-
39 class Point;
+
39 class Point;
40 }
41 }
42 
-
43 using geos::operation::distance::IndexedFacetDistance;
-
44 
-
45 namespace geos {
-
46 namespace algorithm { // geos::algorithm
-
47 namespace construct { // geos::algorithm::construct
-
48 
-
77 class GEOS_DLL LargestEmptyCircle {
-
78 
-
79 public:
-
80 
-
89  LargestEmptyCircle(const geom::Geometry* p_obstacles, double p_tolerance);
-
90 
-
103  LargestEmptyCircle(const geom::Geometry* p_obstacles, const geom::Geometry* p_boundary, double p_tolerance);
-
104 
-
105  ~LargestEmptyCircle() = default;
-
106 
-
116  static std::unique_ptr<geom::Point> getCenter(const geom::Geometry* p_obstacles, double p_tolerance);
-
117 
-
127  static std::unique_ptr<geom::LineString> getRadiusLine(const geom::Geometry* p_obstacles, double p_tolerance);
-
128 
-
129  std::unique_ptr<geom::Point> getCenter();
-
130  std::unique_ptr<geom::Point> getRadiusPoint();
-
131  std::unique_ptr<geom::LineString> getRadiusLine();
+
43 namespace geos {
+
44 namespace algorithm { // geos::algorithm
+
45 namespace construct { // geos::algorithm::construct
+
46 
+
75 class GEOS_DLL LargestEmptyCircle {
+
76  using IndexedFacetDistance = geos::operation::distance::IndexedFacetDistance;
+
77 
+
78 public:
+
79 
+
88  LargestEmptyCircle(const geom::Geometry* p_obstacles, double p_tolerance);
+
89 
+
102  LargestEmptyCircle(const geom::Geometry* p_obstacles, const geom::Geometry* p_boundary, double p_tolerance);
+
103 
+
104  ~LargestEmptyCircle() = default;
+
105 
+
115  static std::unique_ptr<geom::Point> getCenter(const geom::Geometry* p_obstacles, double p_tolerance);
+
116 
+
126  static std::unique_ptr<geom::LineString> getRadiusLine(const geom::Geometry* p_obstacles, double p_tolerance);
+
127 
+
128  std::unique_ptr<geom::Point> getCenter();
+
129  std::unique_ptr<geom::Point> getRadiusPoint();
+
130  std::unique_ptr<geom::LineString> getRadiusLine();
+
131 
132 
-
133 
-
134 private:
-
135 
-
136  /* private members */
-
137  double tolerance;
-
138  const geom::Geometry* obstacles;
-
139  std::unique_ptr<geom::Geometry> boundary;
-
140  const geom::GeometryFactory* factory;
-
141  geom::Envelope gridEnv;
-
142  bool done;
-
143  std::unique_ptr<algorithm::locate::IndexedPointInAreaLocator> boundaryPtLocater;
-
144  IndexedDistanceToPoint obstacleDistance;
-
145  std::unique_ptr<IndexedFacetDistance> boundaryDistance;
-
146  geom::CoordinateXY centerPt;
-
147  geom::CoordinateXY radiusPt;
-
148 
-
159  double distanceToConstraints(const geom::Coordinate& c);
-
160  double distanceToConstraints(double x, double y);
-
161  void initBoundary();
-
162  void compute();
-
163 
-
164  /* private class */
-
165  class Cell {
-
166  private:
-
167  static constexpr double SQRT2 = 1.4142135623730951;
-
168  double x;
-
169  double y;
-
170  double hSize;
-
171  double distance;
-
172  double maxDist;
-
173 
-
174  public:
-
175  Cell(double p_x, double p_y, double p_hSize, double p_distanceToConstraints)
-
176  : x(p_x)
-
177  , y(p_y)
-
178  , hSize(p_hSize)
-
179  , distance(p_distanceToConstraints)
-
180  , maxDist(p_distanceToConstraints + (p_hSize*SQRT2))
-
181  {};
-
182 
-
183  geom::Envelope getEnvelope() const
-
184  {
-
185  geom::Envelope env(x-hSize, x+hSize, y-hSize, y+hSize);
-
186  return env;
-
187  }
-
188 
-
189  bool isFullyOutside() const
-
190  {
-
191  return maxDist < 0.0;
-
192  }
-
193  bool isOutside() const
-
194  {
-
195  return distance < 0.0;
-
196  }
-
197  double getMaxDistance() const
-
198  {
-
199  return maxDist;
-
200  }
-
201  double getDistance() const
-
202  {
-
203  return distance;
-
204  }
-
205  double getHSize() const
-
206  {
-
207  return hSize;
-
208  }
-
209  double getX() const
-
210  {
-
211  return x;
-
212  }
-
213  double getY() const
-
214  {
-
215  return y;
-
216  }
-
217  bool operator< (const Cell& rhs) const
-
218  {
-
219  return maxDist < rhs.maxDist;
-
220  }
-
221  bool operator> (const Cell& rhs) const
-
222  {
-
223  return maxDist > rhs.maxDist;
-
224  }
-
225  bool operator==(const Cell& rhs) const
-
226  {
-
227  return maxDist == rhs.maxDist;
-
228  }
-
229  };
-
230 
-
231  bool mayContainCircleCenter(const Cell& cell, const Cell& farthestCell);
-
232  void createInitialGrid(const geom::Envelope* env, std::priority_queue<Cell>& cellQueue);
-
233  Cell createCentroidCell(const geom::Geometry* geom);
-
234 
-
235 };
+
133 private:
+
134 
+
135  /* private members */
+
136  double tolerance;
+
137  const geom::Geometry* obstacles;
+
138  std::unique_ptr<geom::Geometry> boundary;
+
139  const geom::GeometryFactory* factory;
+
140  geom::Envelope gridEnv;
+
141  bool done;
+
142  std::unique_ptr<algorithm::locate::IndexedPointInAreaLocator> boundaryPtLocater;
+
143  IndexedDistanceToPoint obstacleDistance;
+
144  std::unique_ptr<IndexedFacetDistance> boundaryDistance;
+
145  geom::CoordinateXY centerPt;
+
146  geom::CoordinateXY radiusPt;
+
147 
+
158  double distanceToConstraints(const geom::Coordinate& c);
+
159  double distanceToConstraints(double x, double y);
+
160  void initBoundary();
+
161  void compute();
+
162 
+
163  /* private class */
+
164  class Cell {
+
165  private:
+
166  static constexpr double SQRT2 = 1.4142135623730951;
+
167  double x;
+
168  double y;
+
169  double hSize;
+
170  double distance;
+
171  double maxDist;
+
172 
+
173  public:
+
174  Cell(double p_x, double p_y, double p_hSize, double p_distanceToConstraints)
+
175  : x(p_x)
+
176  , y(p_y)
+
177  , hSize(p_hSize)
+
178  , distance(p_distanceToConstraints)
+
179  , maxDist(p_distanceToConstraints + (p_hSize*SQRT2))
+
180  {};
+
181 
+
182  geom::Envelope getEnvelope() const
+
183  {
+
184  geom::Envelope env(x-hSize, x+hSize, y-hSize, y+hSize);
+
185  return env;
+
186  }
+
187 
+
188  bool isFullyOutside() const
+
189  {
+
190  return maxDist < 0.0;
+
191  }
+
192  bool isOutside() const
+
193  {
+
194  return distance < 0.0;
+
195  }
+
196  double getMaxDistance() const
+
197  {
+
198  return maxDist;
+
199  }
+
200  double getDistance() const
+
201  {
+
202  return distance;
+
203  }
+
204  double getHSize() const
+
205  {
+
206  return hSize;
+
207  }
+
208  double getX() const
+
209  {
+
210  return x;
+
211  }
+
212  double getY() const
+
213  {
+
214  return y;
+
215  }
+
216  bool operator< (const Cell& rhs) const
+
217  {
+
218  return maxDist < rhs.maxDist;
+
219  }
+
220  bool operator> (const Cell& rhs) const
+
221  {
+
222  return maxDist > rhs.maxDist;
+
223  }
+
224  bool operator==(const Cell& rhs) const
+
225  {
+
226  return maxDist == rhs.maxDist;
+
227  }
+
228  };
+
229 
+
230  bool mayContainCircleCenter(const Cell& cell, const Cell& farthestCell);
+
231  void createInitialGrid(const geom::Envelope* env, std::priority_queue<Cell>& cellQueue);
+
232  Cell createCentroidCell(const geom::Geometry* geom);
+
233 
+
234 };
+
235 
236 
-
237 
-
238 } // geos::algorithm::construct
-
239 } // geos::algorithm
-
240 } // geos
-
Computes the distance between a point and a geometry (which may be a collection containing any type o...
Definition: IndexedDistanceToPoint.h:45
-
Definition: LargestEmptyCircle.h:77
+
237 } // geos::algorithm::construct
+
238 } // geos::algorithm
+
239 } // geos
+
Computes the distance between a point and a geometry (which may be a collection containing any type o...
Definition: IndexedDistanceToPoint.h:41
+
Definition: LargestEmptyCircle.h:75
static std::unique_ptr< geom::Point > getCenter(const geom::Geometry *p_obstacles, double p_tolerance)
LargestEmptyCircle(const geom::Geometry *p_obstacles, const geom::Geometry *p_boundary, double p_tolerance)
static std::unique_ptr< geom::LineString > getRadiusLine(const geom::Geometry *p_obstacles, double p_tolerance)
@@ -221,7 +220,6 @@
An Envelope defines a rectangulare region of the 2D coordinate plane.
Definition: Envelope.h:59
Supplies a set of utility methods for building Geometry objects from CoordinateSequence or other Geom...
Definition: GeometryFactory.h:70
Basic implementation of Geometry, constructed and destructed by GeometryFactory.
Definition: Geometry.h:197
-
Definition: Point.h:61
Computes the distance between the facets (segments and vertices) of two Geometrys using a Branch-and-...
Definition: IndexedFacetDistance.h:46
Basic namespace for all GEOS functionalities.
Definition: Angle.h:25
diff --git a/doxygen/LineBuilder_8h_source.html b/doxygen/LineBuilder_8h_source.html index 335f3e2ecb..3357416c0f 100644 --- a/doxygen/LineBuilder_8h_source.html +++ b/doxygen/LineBuilder_8h_source.html @@ -138,7 +138,7 @@
160 
161 public:
162 
-
163  LineBuilder(const InputGeometry* inputGeom, OverlayGraph* p_graph, bool p_hasResultArea, int p_opCode, const geom::GeometryFactory* geomFact)
+
163  LineBuilder(const InputGeometry* inputGeom, OverlayGraph* p_graph, bool p_hasResultArea, int p_opCode, const geom::GeometryFactory* geomFact)
164  : graph(p_graph)
165  , opCode(p_opCode)
166  , geometryFactory(geomFact)
@@ -166,11 +166,12 @@
188 } // namespace geos.operation
189 } // namespace geos
Supplies a set of utility methods for building Geometry objects from CoordinateSequence or other Geom...
Definition: GeometryFactory.h:70
+
Definition: InputGeometry.h:41
Definition: LineBuilder.h:70
-
Definition: OverlayEdge.h:52
-
Definition: OverlayGraph.h:54
-
Definition: OverlayLabel.h:89
-
static constexpr bool STRICT_MODE_DEFAULT
Definition: OverlayNG.h:170
+
Definition: OverlayEdge.h:47
+
Definition: OverlayGraph.h:52
+
Definition: OverlayLabel.h:86
+
static constexpr bool STRICT_MODE_DEFAULT
Definition: OverlayNG.h:173
Location
Constants representing the location of a point relative to a geometry.
Definition: Location.h:32
Basic namespace for all GEOS functionalities.
Definition: Angle.h:25
diff --git a/doxygen/LineLimiter_8h_source.html b/doxygen/LineLimiter_8h_source.html index 8191fd1a27..e4f2a062c1 100644 --- a/doxygen/LineLimiter_8h_source.html +++ b/doxygen/LineLimiter_8h_source.html @@ -73,59 +73,59 @@
24 // Forward declarations
25 namespace geos {
26 namespace geom {
-
27 class Envelope;
-
28 class Coordinate;
-
29 class CoordinateSequence;
+
27 class Envelope;
+
28 class Coordinate;
+
29 class CoordinateSequence;
30 }
31 }
32 
-
33 using namespace geos::geom;
-
34 
-
35 namespace geos { // geos.
-
36 namespace operation { // geos.operation
-
37 namespace overlayng { // geos.operation.overlayng
-
38 
-
56 class GEOS_DLL LineLimiter {
-
57 
-
58 private:
-
59 
-
60  // Members
-
61  const Envelope* limitEnv;
-
62  std::unique_ptr<geom::CoordinateSequence> ptList;
-
63  const Coordinate* lastOutside;
-
64  std::vector<std::unique_ptr<CoordinateSequence>> sections;
-
65 
-
66  // Methods
-
67  void addPoint(const Coordinate* p);
-
68  void addOutside(const Coordinate* p);
-
69  bool isLastSegmentIntersecting(const Coordinate* p);
-
70  bool isSectionOpen();
-
71  void startSection();
-
72  void finishSection();
-
73 
+
33 namespace geos { // geos.
+
34 namespace operation { // geos.operation
+
35 namespace overlayng { // geos.operation.overlayng
+
36 
+
54 class GEOS_DLL LineLimiter {
+
55  using Envelope = geos::geom::Envelope;
+
56  using Coordinate = geos::geom::Coordinate;
+
57  using CoordinateSequence = geos::geom::CoordinateSequence;
+
58 
+
59 private:
+
60 
+
61  // Members
+
62  const Envelope* limitEnv;
+
63  std::unique_ptr<geom::CoordinateSequence> ptList;
+
64  const Coordinate* lastOutside;
+
65  std::vector<std::unique_ptr<CoordinateSequence>> sections;
+
66 
+
67  // Methods
+
68  void addPoint(const Coordinate* p);
+
69  void addOutside(const Coordinate* p);
+
70  bool isLastSegmentIntersecting(const Coordinate* p);
+
71  bool isSectionOpen();
+
72  void startSection();
+
73  void finishSection();
74 
-
75 public:
-
76 
-
77  LineLimiter(const Envelope* env)
-
78  : limitEnv(env)
-
79  , ptList(nullptr)
-
80  , lastOutside(nullptr)
-
81  {};
-
82 
-
83  std::vector<std::unique_ptr<CoordinateSequence>>& limit(const CoordinateSequence *pts);
-
84 
-
85 };
-
86 
+
75 
+
76 public:
+
77 
+
78  LineLimiter(const Envelope* env)
+
79  : limitEnv(env)
+
80  , ptList(nullptr)
+
81  , lastOutside(nullptr)
+
82  {};
+
83 
+
84  std::vector<std::unique_ptr<CoordinateSequence>>& limit(const CoordinateSequence *pts);
+
85 
+
86 };
87 
-
88 } // namespace geos.operation.overlayng
-
89 } // namespace geos.operation
-
90 } // namespace geos
-
91 
+
88 
+
89 } // namespace geos.operation.overlayng
+
90 } // namespace geos.operation
+
91 } // namespace geos
+
92 
The internal representation of a list of coordinates inside a Geometry.
Definition: CoordinateSequence.h:56
Coordinate is the lightweight class used to store coordinates.
Definition: Coordinate.h:217
An Envelope defines a rectangulare region of the 2D coordinate plane.
Definition: Envelope.h:59
-
Definition: LineLimiter.h:56
-
Definition: Angle.h:26
+
Definition: LineLimiter.h:54
Basic namespace for all GEOS functionalities.
Definition: Angle.h:25
diff --git a/doxygen/LineStringExtracter_8h_source.html b/doxygen/LineStringExtracter_8h_source.html index d69f252c96..c835357b6d 100644 --- a/doxygen/LineStringExtracter_8h_source.html +++ b/doxygen/LineStringExtracter_8h_source.html @@ -73,50 +73,46 @@
24 // Forward declarations
25 namespace geos {
26 namespace geom {
-
27  class LineString;
-
28  class Geometry;
+
27  class LineString;
+
28  class Geometry;
29 }
30 }
31 
-
32 
-
33 using geos::geom::LineString;
-
34 using geos::geom::Geometry;
-
35 using geos::geom::GeometryFilter;
+
32 namespace geos { // geos.
+
33 namespace operation { // geos.operation
+
34 namespace relateng { // geos.operation.relateng
+
35 
36 
-
37 
-
38 namespace geos { // geos.
-
39 namespace operation { // geos.operation
-
40 namespace relateng { // geos.operation.relateng
-
41 
+
37 class GEOS_DLL LineStringExtracter : public geos::geom::GeometryFilter {
+
38  using LineString = geos::geom::LineString;
+
39  using Geometry = geos::geom::Geometry;
+
40 
+
41 private:
42 
-
43 class GEOS_DLL LineStringExtracter : public GeometryFilter {
+
43  std::vector<const LineString*>& comps;
44 
-
45 private:
-
46 
-
47  std::vector<const LineString*>& comps;
-
48 
-
49 
-
50 public:
+
45 
+
46 public:
+
47 
+
48  LineStringExtracter(std::vector<const LineString*>& p_comps)
+
49  : comps(p_comps)
+
50  {}
51 
-
52  LineStringExtracter(std::vector<const LineString*>& p_comps)
-
53  : comps(p_comps)
-
54  {}
+
52  void filter_ro(const geom::Geometry* geom) override;
+
53 
+
54  static void getLines(const Geometry* geom, std::vector<const LineString*>& lines);
55 
-
56  void filter_ro(const geom::Geometry* geom) override;
+
56  static std::vector<const LineString*> getLines(const Geometry* geom);
57 
-
58  static void getLines(const Geometry* geom, std::vector<const LineString*>& lines);
-
59 
-
60  static std::vector<const LineString*> getLines(const Geometry* geom);
-
61 
-
69  // static std::unique_ptr<Geometry> getGeometry(const Geometry* geom);
-
70 
-
71 };
-
72 
+
65  // static std::unique_ptr<Geometry> getGeometry(const Geometry* geom);
+
66 
+
67 };
+
68 
+
69 
+
70 } // namespace geos.operation.relateng
+
71 } // namespace geos.operation
+
72 } // namespace geos
73 
-
74 } // namespace geos.operation.relateng
-
75 } // namespace geos.operation
-
76 } // namespace geos
-
77 
Geometry classes support the concept of applying a Geometry filter to the Geometry.
Definition: GeometryFilter.h:45
Basic implementation of Geometry, constructed and destructed by GeometryFactory.
Definition: Geometry.h:197
Definition: LineString.h:66
diff --git a/doxygen/LinearBoundary_8h_source.html b/doxygen/LinearBoundary_8h_source.html index 51a3749a15..e8e1ff33f3 100644 --- a/doxygen/LinearBoundary_8h_source.html +++ b/doxygen/LinearBoundary_8h_source.html @@ -73,71 +73,67 @@
24 // Forward declarations
25 namespace geos {
26 namespace algorithm {
-
27  class BoundaryNodeRule;
+
27  class BoundaryNodeRule;
28 }
29 namespace geom {
30  class CoordinateXY;
-
31  class LineString;
+
31  class LineString;
32 }
33 }
34 
-
35 
-
36 using geos::algorithm::BoundaryNodeRule;
-
37 using geos::geom::Coordinate;
-
38 using geos::geom::CoordinateXY;
-
39 using geos::geom::LineString;
-
40 
-
41 
-
42 namespace geos { // geos.
-
43 namespace operation { // geos.operation
-
44 namespace relateng { // geos.operation.relateng
-
45 
-
46 class GEOS_DLL LinearBoundary {
-
47 
-
48 private:
-
49 
-
50  // Members
-
51 
-
52  Coordinate::ConstIntMap m_vertexDegree;
-
53  bool m_hasBoundary;
-
54  const BoundaryNodeRule& m_boundaryNodeRule;
+
35 namespace geos { // geos.
+
36 namespace operation { // geos.operation
+
37 namespace relateng { // geos.operation.relateng
+
38 
+
39 class GEOS_DLL LinearBoundary {
+
40  using BoundaryNodeRule = geos::algorithm::BoundaryNodeRule;
+
41  using Coordinate = geos::geom::Coordinate;
+
42  using CoordinateXY = geos::geom::CoordinateXY;
+
43  using LineString = geos::geom::LineString;
+
44 
+
45 private:
+
46 
+
47  // Members
+
48 
+
49  Coordinate::ConstIntMap m_vertexDegree;
+
50  bool m_hasBoundary;
+
51  const BoundaryNodeRule& m_boundaryNodeRule;
+
52 
+
53 
+
54 public:
55 
-
56 
-
57 public:
-
58 
-
59  // Constructors
-
60 
-
61  LinearBoundary(std::vector<const LineString*>& lines, const BoundaryNodeRule& bnRule);
-
62 
-
63  bool hasBoundary() const;
+
56  // Constructors
+
57 
+
58  LinearBoundary(std::vector<const LineString*>& lines, const BoundaryNodeRule& bnRule);
+
59 
+
60  bool hasBoundary() const;
+
61 
+
62  bool isBoundary(const CoordinateXY* pt) const;
+
63 
64 
-
65  bool isBoundary(const CoordinateXY* pt) const;
+
65 private:
66 
-
67 
-
68 private:
-
69 
-
70  // Methods
-
71 
-
72  bool checkBoundary(Coordinate::ConstIntMap& vertexDegree) const;
-
73 
-
74  static void computeBoundaryPoints(
-
75  std::vector<const LineString*>& lines,
-
76  Coordinate::ConstIntMap& vertexDegree);
-
77 
-
78  static void addEndpoint(
-
79  const CoordinateXY *p,
-
80  Coordinate::ConstIntMap& vertexDegree);
+
67  // Methods
+
68 
+
69  bool checkBoundary(Coordinate::ConstIntMap& vertexDegree) const;
+
70 
+
71  static void computeBoundaryPoints(
+
72  std::vector<const LineString*>& lines,
+
73  Coordinate::ConstIntMap& vertexDegree);
+
74 
+
75  static void addEndpoint(
+
76  const CoordinateXY *p,
+
77  Coordinate::ConstIntMap& vertexDegree);
+
78 
+
79 
+
80 };
81 
-
82 
-
83 };
-
84 
-
85 } // namespace geos.operation.relateng
-
86 } // namespace geos.operation
-
87 } // namespace geos
-
88 
+
82 } // namespace geos.operation.relateng
+
83 } // namespace geos.operation
+
84 } // namespace geos
+
85 
An interface for rules which determine whether node points which are in boundaries of lineal geometry...
Definition: BoundaryNodeRule.h:52
Coordinate is the lightweight class used to store coordinates.
Definition: Coordinate.h:217
-
std::map< const CoordinateXY *, int, CoordinateLessThan > ConstIntMap
A map of const Coordinate pointers to integers.
Definition: Coordinate.h:238
Definition: LineString.h:66
Basic namespace for all GEOS functionalities.
Definition: Angle.h:25
diff --git a/doxygen/LinkedLine_8h_source.html b/doxygen/LinkedLine_8h_source.html index 55922fbec6..f77d0fd68e 100644 --- a/doxygen/LinkedLine_8h_source.html +++ b/doxygen/LinkedLine_8h_source.html @@ -73,64 +73,62 @@
24 
25 namespace geos {
26 namespace geom {
-
27 class Coordinate;
-
28 class CoordinateSequence;
+
27 class Coordinate;
+
28 class CoordinateSequence;
29 }
30 }
31 
-
32 using geos::geom::Coordinate;
-
33 using geos::geom::CoordinateSequence;
+
32 namespace geos {
+
33 namespace simplify { // geos::simplify
34 
-
35 
-
36 namespace geos {
-
37 namespace simplify { // geos::simplify
-
38 
-
39 class LinkedLine
-
40 {
+
35 class LinkedLine
+
36 {
+
37  using Coordinate = geos::geom::Coordinate;
+
38  using CoordinateSequence = geos::geom::CoordinateSequence;
+
39 
+
40 public:
41 
-
42 public:
+
42  LinkedLine(const CoordinateSequence& pts);
43 
-
44  LinkedLine(const CoordinateSequence& pts);
-
45 
-
46  bool isRing() const;
-
47  bool isCorner(std::size_t i) const;
-
48 
-
49  std::size_t size() const;
-
50  std::size_t next(std::size_t i) const;
-
51  std::size_t prev(std::size_t i) const;
-
52 
-
53  const Coordinate& getCoordinate(std::size_t index) const;
-
54  const Coordinate& prevCoordinate(std::size_t index) const;
-
55  const Coordinate& nextCoordinate(std::size_t index) const;
+
44  bool isRing() const;
+
45  bool isCorner(std::size_t i) const;
+
46 
+
47  std::size_t size() const;
+
48  std::size_t next(std::size_t i) const;
+
49  std::size_t prev(std::size_t i) const;
+
50 
+
51  const Coordinate& getCoordinate(std::size_t index) const;
+
52  const Coordinate& prevCoordinate(std::size_t index) const;
+
53  const Coordinate& nextCoordinate(std::size_t index) const;
+
54 
+
55  bool hasCoordinate(std::size_t index) const;
56 
-
57  bool hasCoordinate(std::size_t index) const;
+
57  void remove(std::size_t index);
58 
-
59  void remove(std::size_t index);
+
59  std::unique_ptr<CoordinateSequence> getCoordinates() const;
60 
-
61  std::unique_ptr<CoordinateSequence> getCoordinates() const;
-
62 
+
61 
+
62 private:
63 
-
64 private:
-
65 
-
66  // Members
-
67  const CoordinateSequence& m_coord;
-
68  bool m_isRing;
-
69  std::size_t m_size;
-
70  std::vector<std::size_t> m_next;
-
71  std::vector<std::size_t> m_prev;
+
64  // Members
+
65  const CoordinateSequence& m_coord;
+
66  bool m_isRing;
+
67  std::size_t m_size;
+
68  std::vector<std::size_t> m_next;
+
69  std::vector<std::size_t> m_prev;
+
70 
+
71  void createNextLinks(std::size_t size);
72 
-
73  void createNextLinks(std::size_t size);
+
73  void createPrevLinks(std::size_t size);
74 
-
75  void createPrevLinks(std::size_t size);
-
76 
+
75 
+
76 }; // LinkedLine
77 
-
78 }; // LinkedLine
+
78 GEOS_DLL std::ostream& operator<< (std::ostream& os, const LinkedLine& ll);
79 
-
80 GEOS_DLL std::ostream& operator<< (std::ostream& os, const LinkedLine& ll);
-
81 
-
82 
-
83 } // geos::simplify
-
84 } // geos
+
80 
+
81 } // geos::simplify
+
82 } // geos
The internal representation of a list of coordinates inside a Geometry.
Definition: CoordinateSequence.h:56
Coordinate is the lightweight class used to store coordinates.
Definition: Coordinate.h:217
Basic namespace for all GEOS functionalities.
Definition: Angle.h:25
diff --git a/doxygen/LinkedRing_8h_source.html b/doxygen/LinkedRing_8h_source.html index a1e79077db..ff538a2d74 100644 --- a/doxygen/LinkedRing_8h_source.html +++ b/doxygen/LinkedRing_8h_source.html @@ -69,19 +69,19 @@
20 #include <geos/geom/CoordinateSequence.h>
21 #include <geos/constants.h>
22 
-
23 using geos::geom::Coordinate;
-
24 using geos::geom::CoordinateSequence;
+
23 namespace geos {
+
24 namespace simplify { // geos::simplify
25 
-
26 namespace geos {
-
27 namespace simplify { // geos::simplify
-
28 
-
29 
-
30 
-
31 class LinkedRing
-
32 {
+
26 
+
27 
+
28 class LinkedRing
+
29 {
+
30  using Coordinate = geos::geom::Coordinate;
+
31  using CoordinateSequence = geos::geom::CoordinateSequence;
+
32 
33  private:
34 
-
35  const CoordinateSequence& m_coord;
+
35  const CoordinateSequence& m_coord;
36  std::size_t m_size;
37  std::vector<std::size_t> m_next;
38  std::vector<std::size_t> m_prev;
@@ -92,7 +92,7 @@
43 
44  public:
45 
-
46  LinkedRing(const CoordinateSequence& cs)
+
46  LinkedRing(const CoordinateSequence& cs)
47  : m_coord(cs)
48  , m_size(cs.size()-1)
49  , m_next(createNextLinks(m_size))
@@ -102,9 +102,9 @@
53  std::size_t size() const;
54  std::size_t next(std::size_t i) const;
55  std::size_t prev(std::size_t i) const;
-
56  const Coordinate& getCoordinate(std::size_t index) const;
-
57  const Coordinate& prevCoordinate(std::size_t index) const;
-
58  const Coordinate& nextCoordinate(std::size_t index) const;
+
56  const Coordinate& getCoordinate(std::size_t index) const;
+
57  const Coordinate& prevCoordinate(std::size_t index) const;
+
58  const Coordinate& nextCoordinate(std::size_t index) const;
59  bool hasCoordinate(std::size_t index) const;
60  void remove(std::size_t index);
61  std::unique_ptr<CoordinateSequence> getCoordinates() const;
diff --git a/doxygen/MaximumInscribedCircle_8h_source.html b/doxygen/MaximumInscribedCircle_8h_source.html index d50672e404..c3c278ef65 100644 --- a/doxygen/MaximumInscribedCircle_8h_source.html +++ b/doxygen/MaximumInscribedCircle_8h_source.html @@ -90,124 +90,123 @@
41 }
42 }
43 
-
44 using geos::algorithm::locate::IndexedPointInAreaLocator;
-
45 using geos::operation::distance::IndexedFacetDistance;
-
46 
-
47 namespace geos {
-
48 namespace algorithm { // geos::algorithm
-
49 namespace construct { // geos::algorithm::construct
-
50 
-
56 class GEOS_DLL MaximumInscribedCircle {
-
57 
-
58 public:
-
59 
-
60  MaximumInscribedCircle(const geom::Geometry* polygonal, double tolerance);
-
61  ~MaximumInscribedCircle() = default;
-
62 
-
69  std::unique_ptr<geom::Point> getCenter();
-
70 
-
81  std::unique_ptr<geom::Point> getRadiusPoint();
-
82 
-
88  std::unique_ptr<geom::LineString> getRadiusLine();
-
89 
-
98  static std::unique_ptr<geom::Point> getCenter(const geom::Geometry* polygonal, double tolerance);
-
99 
-
108  static std::unique_ptr<geom::LineString> getRadiusLine(const geom::Geometry* polygonal, double tolerance);
-
109 
-
124  static std::size_t computeMaximumIterations(const geom::Geometry* geom, double toleranceDist);
-
125 
-
126 private:
-
127 
-
128  /* private members */
-
129  const geom::Geometry* inputGeom;
-
130  std::unique_ptr<geom::Geometry> inputGeomBoundary;
-
131  double tolerance;
-
132  IndexedFacetDistance indexedDistance;
-
133  IndexedPointInAreaLocator ptLocator;
-
134  const geom::GeometryFactory* factory;
-
135  bool done;
-
136  geom::CoordinateXY centerPt;
-
137  geom::CoordinateXY radiusPt;
-
138 
-
139  /* private methods */
-
140  double distanceToBoundary(const geom::Coordinate& c);
-
141  double distanceToBoundary(double x, double y);
-
142  void compute();
-
143 
-
144  /* private class */
-
145  class Cell {
-
146  private:
-
147  static constexpr double SQRT2 = 1.4142135623730951;
-
148  double x;
-
149  double y;
-
150  double hSize;
-
151  double distance;
-
152  double maxDist;
-
153 
-
154  public:
-
155  Cell(double p_x, double p_y, double p_hSize, double p_distanceToBoundary)
-
156  : x(p_x)
-
157  , y(p_y)
-
158  , hSize(p_hSize)
-
159  , distance(p_distanceToBoundary)
-
160  , maxDist(p_distanceToBoundary+(p_hSize*SQRT2))
-
161  {};
-
162 
-
163  geom::Envelope getEnvelope() const
-
164  {
-
165  geom::Envelope env(x-hSize, x+hSize, y-hSize, y+hSize);
-
166  return env;
-
167  }
-
168 
-
169  double getMaxDistance() const
-
170  {
-
171  return maxDist;
-
172  }
-
173  double getDistance() const
-
174  {
-
175  return distance;
-
176  }
-
177  double getHSize() const
-
178  {
-
179  return hSize;
-
180  }
-
181  double getX() const
-
182  {
-
183  return x;
-
184  }
-
185  double getY() const
-
186  {
-
187  return y;
-
188  }
-
189 
-
190  bool operator< (const Cell& rhs) const
-
191  {
-
192  return maxDist < rhs.maxDist;
-
193  }
-
194 
-
195  bool operator> (const Cell& rhs) const
-
196  {
-
197  return maxDist > rhs.maxDist;
-
198  }
-
199 
-
200  bool operator==(const Cell& rhs) const
-
201  {
-
202  return maxDist == rhs.maxDist;
-
203  }
-
204 
-
210  using CellQueue = std::priority_queue<Cell>;
-
211  };
-
212 
-
213  void createInitialGrid(const geom::Envelope* env, Cell::CellQueue& cellQueue);
-
214  Cell createInteriorPointCell(const geom::Geometry* geom);
-
215 
-
216 };
+
44 namespace geos {
+
45 namespace algorithm { // geos::algorithm
+
46 namespace construct { // geos::algorithm::construct
+
47 
+
53 class GEOS_DLL MaximumInscribedCircle {
+
54  using IndexedPointInAreaLocator = geos::algorithm::locate::IndexedPointInAreaLocator;
+
55  using IndexedFacetDistance = geos::operation::distance::IndexedFacetDistance;
+
56 
+
57 public:
+
58 
+
59  MaximumInscribedCircle(const geom::Geometry* polygonal, double tolerance);
+
60  ~MaximumInscribedCircle() = default;
+
61 
+
68  std::unique_ptr<geom::Point> getCenter();
+
69 
+
80  std::unique_ptr<geom::Point> getRadiusPoint();
+
81 
+
87  std::unique_ptr<geom::LineString> getRadiusLine();
+
88 
+
97  static std::unique_ptr<geom::Point> getCenter(const geom::Geometry* polygonal, double tolerance);
+
98 
+
107  static std::unique_ptr<geom::LineString> getRadiusLine(const geom::Geometry* polygonal, double tolerance);
+
108 
+
123  static std::size_t computeMaximumIterations(const geom::Geometry* geom, double toleranceDist);
+
124 
+
125 private:
+
126 
+
127  /* private members */
+
128  const geom::Geometry* inputGeom;
+
129  std::unique_ptr<geom::Geometry> inputGeomBoundary;
+
130  double tolerance;
+
131  IndexedFacetDistance indexedDistance;
+
132  IndexedPointInAreaLocator ptLocator;
+
133  const geom::GeometryFactory* factory;
+
134  bool done;
+
135  geom::CoordinateXY centerPt;
+
136  geom::CoordinateXY radiusPt;
+
137 
+
138  /* private methods */
+
139  double distanceToBoundary(const geom::Coordinate& c);
+
140  double distanceToBoundary(double x, double y);
+
141  void compute();
+
142 
+
143  /* private class */
+
144  class Cell {
+
145  private:
+
146  static constexpr double SQRT2 = 1.4142135623730951;
+
147  double x;
+
148  double y;
+
149  double hSize;
+
150  double distance;
+
151  double maxDist;
+
152 
+
153  public:
+
154  Cell(double p_x, double p_y, double p_hSize, double p_distanceToBoundary)
+
155  : x(p_x)
+
156  , y(p_y)
+
157  , hSize(p_hSize)
+
158  , distance(p_distanceToBoundary)
+
159  , maxDist(p_distanceToBoundary+(p_hSize*SQRT2))
+
160  {};
+
161 
+
162  geom::Envelope getEnvelope() const
+
163  {
+
164  geom::Envelope env(x-hSize, x+hSize, y-hSize, y+hSize);
+
165  return env;
+
166  }
+
167 
+
168  double getMaxDistance() const
+
169  {
+
170  return maxDist;
+
171  }
+
172  double getDistance() const
+
173  {
+
174  return distance;
+
175  }
+
176  double getHSize() const
+
177  {
+
178  return hSize;
+
179  }
+
180  double getX() const
+
181  {
+
182  return x;
+
183  }
+
184  double getY() const
+
185  {
+
186  return y;
+
187  }
+
188 
+
189  bool operator< (const Cell& rhs) const
+
190  {
+
191  return maxDist < rhs.maxDist;
+
192  }
+
193 
+
194  bool operator> (const Cell& rhs) const
+
195  {
+
196  return maxDist > rhs.maxDist;
+
197  }
+
198 
+
199  bool operator==(const Cell& rhs) const
+
200  {
+
201  return maxDist == rhs.maxDist;
+
202  }
+
203 
+
209  using CellQueue = std::priority_queue<Cell>;
+
210  };
+
211 
+
212  void createInitialGrid(const geom::Envelope* env, Cell::CellQueue& cellQueue);
+
213  Cell createInteriorPointCell(const geom::Geometry* geom);
+
214 
+
215 };
+
216 
217 
-
218 
-
219 } // geos::algorithm::construct
-
220 } // geos::algorithm
-
221 } // geos
-
Definition: MaximumInscribedCircle.h:56
+
218 } // geos::algorithm::construct
+
219 } // geos::algorithm
+
220 } // geos
+
Definition: MaximumInscribedCircle.h:53
std::unique_ptr< geom::LineString > getRadiusLine()
static std::unique_ptr< geom::Point > getCenter(const geom::Geometry *polygonal, double tolerance)
static std::unique_ptr< geom::LineString > getRadiusLine(const geom::Geometry *polygonal, double tolerance)
diff --git a/doxygen/MinimumAreaRectangle_8h_source.html b/doxygen/MinimumAreaRectangle_8h_source.html index 41715101a7..cd50d9c065 100644 --- a/doxygen/MinimumAreaRectangle_8h_source.html +++ b/doxygen/MinimumAreaRectangle_8h_source.html @@ -71,90 +71,88 @@
22 // Forward declarations
23 namespace geos {
24  namespace geom {
-
25  class CoordinateSequence;
+
25  class CoordinateSequence;
26  class CoordinateXY;
-
27  class Geometry;
-
28  class GeometryFactory;
-
29  class LineSegment;
-
30  class LineString;
-
31  class Polygon;
+
27  class Geometry;
+
28  class GeometryFactory;
+
29  class LineSegment;
+
30  class LineString;
+
31  class Polygon;
32  }
33 }
34 
-
35 using geos::geom::CoordinateSequence;
-
36 using geos::geom::CoordinateXY;
-
37 using geos::geom::Geometry;
-
38 using geos::geom::GeometryFactory;
-
39 using geos::geom::LineSegment;
-
40 using geos::geom::LineString;
-
41 using geos::geom::Polygon;
-
42 
-
43 
-
44 namespace geos {
-
45 namespace algorithm { // geos::algorithm
-
46 
-
47 
-
67 class GEOS_DLL MinimumAreaRectangle {
+
35 namespace geos {
+
36 namespace algorithm { // geos::algorithm
+
37 
+
38 
+
58 class GEOS_DLL MinimumAreaRectangle {
+
59  using CoordinateSequence = geos::geom::CoordinateSequence;
+
60  using CoordinateXY = geos::geom::CoordinateXY;
+
61  using Geometry = geos::geom::Geometry;
+
62  using GeometryFactory = geos::geom::GeometryFactory;
+
63  using LineSegment = geos::geom::LineSegment;
+
64  using LineString = geos::geom::LineString;
+
65  using Polygon = geos::geom::Polygon;
+
66 
+
67 private:
68 
-
69 private:
-
70 
-
71  // Members
-
72  const Geometry* m_inputGeom;
-
73  bool m_isConvex;
-
74 
-
75  // Methods
-
76  std::unique_ptr<Geometry> getMinimumRectangle();
+
69  // Members
+
70  const Geometry* m_inputGeom;
+
71  bool m_isConvex;
+
72 
+
73  // Methods
+
74  std::unique_ptr<Geometry> getMinimumRectangle();
+
75 
+
76  std::unique_ptr<Geometry> computeConvex(const Geometry* convexGeom);
77 
-
78  std::unique_ptr<Geometry> computeConvex(const Geometry* convexGeom);
-
79 
-
88  std::unique_ptr<Polygon> computeConvexRing(const CoordinateSequence* ring);
-
89 
-
90  std::size_t findFurthestVertex(
-
91  const CoordinateSequence* pts,
-
92  const LineSegment& baseSeg,
-
93  std::size_t startIndex,
-
94  int orient);
+
86  std::unique_ptr<Polygon> computeConvexRing(const CoordinateSequence* ring);
+
87 
+
88  std::size_t findFurthestVertex(
+
89  const CoordinateSequence* pts,
+
90  const LineSegment& baseSeg,
+
91  std::size_t startIndex,
+
92  int orient);
+
93 
+
94  bool isFurtherOrEqual(double d1, double d2, int orient);
95 
-
96  bool isFurtherOrEqual(double d1, double d2, int orient);
-
97 
-
98  static double orientedDistance(
-
99  const LineSegment& seg,
-
100  const CoordinateXY& p,
-
101  int orient);
-
102 
-
103  static std::size_t getNextIndex(
-
104  const CoordinateSequence* ring,
-
105  std::size_t index);
-
106 
-
113  static std::unique_ptr<LineString> computeMaximumLine(
-
114  const CoordinateSequence* pts,
-
115  const GeometryFactory* factory);
-
116 
+
96  static double orientedDistance(
+
97  const LineSegment& seg,
+
98  const CoordinateXY& p,
+
99  int orient);
+
100 
+
101  static std::size_t getNextIndex(
+
102  const CoordinateSequence* ring,
+
103  std::size_t index);
+
104 
+
111  static std::unique_ptr<LineString> computeMaximumLine(
+
112  const CoordinateSequence* pts,
+
113  const GeometryFactory* factory);
+
114 
+
115 
+
116 public:
117 
-
118 public:
-
119 
-
125  MinimumAreaRectangle(const Geometry* inputGeom)
-
126  : m_inputGeom(inputGeom)
-
127  , m_isConvex(false)
-
128  {};
-
129 
-
139  MinimumAreaRectangle(const Geometry* inputGeom, bool isConvex)
-
140  : m_inputGeom(inputGeom)
-
141  , m_isConvex(isConvex)
-
142  {};
-
143 
-
152  static std::unique_ptr<Geometry> getMinimumRectangle(const Geometry* geom);
+
123  MinimumAreaRectangle(const Geometry* inputGeom)
+
124  : m_inputGeom(inputGeom)
+
125  , m_isConvex(false)
+
126  {};
+
127 
+
137  MinimumAreaRectangle(const Geometry* inputGeom, bool isConvex)
+
138  : m_inputGeom(inputGeom)
+
139  , m_isConvex(isConvex)
+
140  {};
+
141 
+
150  static std::unique_ptr<Geometry> getMinimumRectangle(const Geometry* geom);
+
151 
+
152 };
153 
-
154 };
-
155 
-
156 
-
157 } // namespace geos::algorithm
-
158 } // namespace geos
-
159 
-
Definition: MinimumAreaRectangle.h:67
+
154 
+
155 } // namespace geos::algorithm
+
156 } // namespace geos
+
157 
+
Definition: MinimumAreaRectangle.h:58
static std::unique_ptr< Geometry > getMinimumRectangle(const Geometry *geom)
-
MinimumAreaRectangle(const Geometry *inputGeom, bool isConvex)
Definition: MinimumAreaRectangle.h:139
-
MinimumAreaRectangle(const Geometry *inputGeom)
Definition: MinimumAreaRectangle.h:125
+
MinimumAreaRectangle(const Geometry *inputGeom, bool isConvex)
Definition: MinimumAreaRectangle.h:137
+
MinimumAreaRectangle(const Geometry *inputGeom)
Definition: MinimumAreaRectangle.h:123
The internal representation of a list of coordinates inside a Geometry.
Definition: CoordinateSequence.h:56
Supplies a set of utility methods for building Geometry objects from CoordinateSequence or other Geom...
Definition: GeometryFactory.h:70
Basic implementation of Geometry, constructed and destructed by GeometryFactory.
Definition: Geometry.h:197
diff --git a/doxygen/NodeSection_8h_source.html b/doxygen/NodeSection_8h_source.html index 342548fef6..b5619f1b90 100644 --- a/doxygen/NodeSection_8h_source.html +++ b/doxygen/NodeSection_8h_source.html @@ -73,122 +73,119 @@
24 // Forward declarations
25 namespace geos {
26 namespace geom {
-
27  class Geometry;
+
27  class Geometry;
28 }
29 }
30 
-
31 
-
32 using geos::geom::CoordinateXY;
-
33 using geos::geom::Geometry;
+
31 namespace geos { // geos.
+
32 namespace operation { // geos.operation
+
33 namespace relateng { // geos.operation.relateng
34 
-
35 
-
36 namespace geos { // geos.
-
37 namespace operation { // geos.operation
-
38 namespace relateng { // geos.operation.relateng
-
39 
-
55 class GEOS_DLL NodeSection {
-
56 
-
57 private:
-
58 
-
59  // Members
-
60  bool m_isA;
-
61  int m_dim;
-
62  int m_id;
-
63  int m_ringId;
-
64  const Geometry* m_poly;
-
65  bool m_isNodeAtVertex;
-
66  const CoordinateXY* m_v0;
-
67  const CoordinateXY m_nodePt;
-
68  const CoordinateXY* m_v1;
-
69 
-
70  // Methods
-
71 
-
72  static int compareWithNull(const CoordinateXY* v0, const CoordinateXY* v1);
-
73 
-
74  static int compare(int a, int b);
-
75 
-
76 public:
-
77 
-
78  NodeSection(
-
79  bool isA,
-
80  int dim,
-
81  int id,
-
82  int ringId,
-
83  const Geometry* poly,
-
84  bool isNodeAtVertex,
-
85  const CoordinateXY* v0,
-
86  const CoordinateXY nodePt,
-
87  const CoordinateXY* v1)
-
88  : m_isA(isA)
-
89  , m_dim(dim)
-
90  , m_id(id)
-
91  , m_ringId(ringId)
-
92  , m_poly(poly)
-
93  , m_isNodeAtVertex(isNodeAtVertex)
-
94  , m_v0(v0)
-
95  , m_nodePt(nodePt)
-
96  , m_v1(v1)
-
97  {};
-
98 
-
99  NodeSection(const NodeSection* ns)
-
100  : m_isA(ns->isA())
-
101  , m_dim(ns->dimension())
-
102  , m_id(ns->id())
-
103  , m_ringId(ns->ringId())
-
104  , m_poly(ns->getPolygonal())
-
105  , m_isNodeAtVertex(ns->isNodeAtVertex())
-
106  , m_v0(ns->getVertex(0))
-
107  , m_nodePt(ns->nodePt())
-
108  , m_v1(ns->getVertex(1))
-
109  {};
-
110 
-
111  const CoordinateXY* getVertex(int i) const;
-
112 
-
113  const CoordinateXY& nodePt() const;
-
114 
-
115  int dimension() const;
-
116 
-
117  int id() const;
-
118 
-
119  int ringId() const;
-
120 
-
127  const Geometry* getPolygonal() const;
-
128 
-
129  bool isShell() const;
-
130 
-
131  bool isArea() const;
-
132 
-
133  static bool isAreaArea(const NodeSection& a, const NodeSection& b);
-
134 
-
135  bool isA() const;
-
136 
-
137  bool isSameGeometry(const NodeSection& ns) const;
-
138 
-
139  bool isSamePolygon(const NodeSection& ns) const;
-
140 
-
141  bool isNodeAtVertex() const;
-
142 
-
143  bool isProper() const;
-
144 
-
145  static bool isProper(const NodeSection& a, const NodeSection& b);
-
146 
-
147  std::string toString() const;
-
148 
-
149  static std::string edgeRep(const CoordinateXY* p0, const CoordinateXY* p1);
-
150 
-
151  friend std::ostream& operator<<(std::ostream& os, const NodeSection& ns);
-
152 
-
158  int compareTo(const NodeSection& o) const;
+
50 class GEOS_DLL NodeSection {
+
51  using CoordinateXY = geos::geom::CoordinateXY;
+
52  using Geometry = geos::geom::Geometry;
+
53 
+
54 private:
+
55 
+
56  // Members
+
57  bool m_isA;
+
58  int m_dim;
+
59  int m_id;
+
60  int m_ringId;
+
61  const Geometry* m_poly;
+
62  bool m_isNodeAtVertex;
+
63  const CoordinateXY* m_v0;
+
64  const CoordinateXY m_nodePt;
+
65  const CoordinateXY* m_v1;
+
66 
+
67  // Methods
+
68 
+
69  static int compareWithNull(const CoordinateXY* v0, const CoordinateXY* v1);
+
70 
+
71  static int compare(int a, int b);
+
72 
+
73 public:
+
74 
+
75  NodeSection(
+
76  bool isA,
+
77  int dim,
+
78  int id,
+
79  int ringId,
+
80  const Geometry* poly,
+
81  bool isNodeAtVertex,
+
82  const CoordinateXY* v0,
+
83  const CoordinateXY nodePt,
+
84  const CoordinateXY* v1)
+
85  : m_isA(isA)
+
86  , m_dim(dim)
+
87  , m_id(id)
+
88  , m_ringId(ringId)
+
89  , m_poly(poly)
+
90  , m_isNodeAtVertex(isNodeAtVertex)
+
91  , m_v0(v0)
+
92  , m_nodePt(nodePt)
+
93  , m_v1(v1)
+
94  {};
+
95 
+
96  NodeSection(const NodeSection* ns)
+
97  : m_isA(ns->isA())
+
98  , m_dim(ns->dimension())
+
99  , m_id(ns->id())
+
100  , m_ringId(ns->ringId())
+
101  , m_poly(ns->getPolygonal())
+
102  , m_isNodeAtVertex(ns->isNodeAtVertex())
+
103  , m_v0(ns->getVertex(0))
+
104  , m_nodePt(ns->nodePt())
+
105  , m_v1(ns->getVertex(1))
+
106  {};
+
107 
+
108  const CoordinateXY* getVertex(int i) const;
+
109 
+
110  const CoordinateXY& nodePt() const;
+
111 
+
112  int dimension() const;
+
113 
+
114  int id() const;
+
115 
+
116  int ringId() const;
+
117 
+
124  const Geometry* getPolygonal() const;
+
125 
+
126  bool isShell() const;
+
127 
+
128  bool isArea() const;
+
129 
+
130  static bool isAreaArea(const NodeSection& a, const NodeSection& b);
+
131 
+
132  bool isA() const;
+
133 
+
134  bool isSameGeometry(const NodeSection& ns) const;
+
135 
+
136  bool isSamePolygon(const NodeSection& ns) const;
+
137 
+
138  bool isNodeAtVertex() const;
+
139 
+
140  bool isProper() const;
+
141 
+
142  static bool isProper(const NodeSection& a, const NodeSection& b);
+
143 
+
144  std::string toString() const;
+
145 
+
146  static std::string edgeRep(const CoordinateXY* p0, const CoordinateXY* p1);
+
147 
+
148  friend std::ostream& operator<<(std::ostream& os, const NodeSection& ns);
+
149 
+
155  int compareTo(const NodeSection& o) const;
+
156 
+
157 
+
158 };
159 
-
160 
-
161 };
-
162 
-
163 } // namespace geos.operation.relateng
-
164 } // namespace geos.operation
-
165 } // namespace geos
-
166 
+
160 } // namespace geos.operation.relateng
+
161 } // namespace geos.operation
+
162 } // namespace geos
+
163 
Basic implementation of Geometry, constructed and destructed by GeometryFactory.
Definition: Geometry.h:197
-
Definition: NodeSection.h:55
+
Definition: NodeSection.h:50
const Geometry * getPolygonal() const
int compareTo(const NodeSection &o) const
Basic namespace for all GEOS functionalities.
Definition: Angle.h:25
diff --git a/doxygen/NodeSections_8h_source.html b/doxygen/NodeSections_8h_source.html index e8a671907b..13040773b0 100644 --- a/doxygen/NodeSections_8h_source.html +++ b/doxygen/NodeSections_8h_source.html @@ -80,66 +80,63 @@
31 }
32 namespace geom {
33  class CoordinateXY;
-
34  class Geometry;
+
34  class Geometry;
35 }
36 }
37 
-
38 
-
39 using geos::geom::CoordinateXY;
-
40 using geos::geom::Geometry;
+
38 namespace geos { // geos.
+
39 namespace operation { // geos.operation
+
40 namespace relateng { // geos.operation.relateng
41 
42 
-
43 namespace geos { // geos.
-
44 namespace operation { // geos.operation
-
45 namespace relateng { // geos.operation.relateng
+
43 class GEOS_DLL NodeSections {
+
44  using CoordinateXY = geos::geom::CoordinateXY;
+
45  using Geometry = geos::geom::Geometry;
46 
-
47 
-
48 class GEOS_DLL NodeSections {
-
49 
-
50 private:
-
51 
-
52  // Members
-
53  const CoordinateXY* nodePt;
-
54  std::vector<std::unique_ptr<NodeSection>> sections;
-
55 
-
56  // Methods
-
57 
-
63  void prepareSections();
-
64 
-
65  static bool hasMultiplePolygonSections(
-
66  std::vector<std::unique_ptr<NodeSection>>& sections,
-
67  std::size_t i);
-
68 
-
69  static std::vector<const NodeSection*> collectPolygonSections(
-
70  std::vector<std::unique_ptr<NodeSection>>& sections,
-
71  std::size_t i);
+
47 private:
+
48 
+
49  // Members
+
50  const CoordinateXY* nodePt;
+
51  std::vector<std::unique_ptr<NodeSection>> sections;
+
52 
+
53  // Methods
+
54 
+
60  void prepareSections();
+
61 
+
62  static bool hasMultiplePolygonSections(
+
63  std::vector<std::unique_ptr<NodeSection>>& sections,
+
64  std::size_t i);
+
65 
+
66  static std::vector<const NodeSection*> collectPolygonSections(
+
67  std::vector<std::unique_ptr<NodeSection>>& sections,
+
68  std::size_t i);
+
69 
+
70 
+
71 public:
72 
-
73 
-
74 public:
-
75 
-
76  NodeSections(const CoordinateXY* pt)
-
77  : nodePt(pt)
-
78  {};
-
79 
-
80  const CoordinateXY* getCoordinate() const;
-
81 
-
82  void addNodeSection(NodeSection* e);
-
83 
-
84  bool hasInteractionAB() const;
-
85 
-
86  const Geometry* getPolygonal(bool isA) const;
-
87 
-
88  std::unique_ptr<RelateNode> createNode();
-
89 
-
94  NodeSections(const NodeSections&) = delete;
-
95  NodeSections& operator=(const NodeSections&) = delete;
-
96 
-
97 };
-
98 
-
99 } // namespace geos.operation.relateng
-
100 } // namespace geos.operation
-
101 } // namespace geos
-
102 
+
73  NodeSections(const CoordinateXY* pt)
+
74  : nodePt(pt)
+
75  {};
+
76 
+
77  const CoordinateXY* getCoordinate() const;
+
78 
+
79  void addNodeSection(NodeSection* e);
+
80 
+
81  bool hasInteractionAB() const;
+
82 
+
83  const Geometry* getPolygonal(bool isA) const;
+
84 
+
85  std::unique_ptr<RelateNode> createNode();
+
86 
+
91  NodeSections(const NodeSections&) = delete;
+
92  NodeSections& operator=(const NodeSections&) = delete;
+
93 
+
94 };
+
95 
+
96 } // namespace geos.operation.relateng
+
97 } // namespace geos.operation
+
98 } // namespace geos
+
99 
Basic implementation of Geometry, constructed and destructed by GeometryFactory.
Definition: Geometry.h:197
Basic namespace for all GEOS functionalities.
Definition: Angle.h:25
diff --git a/doxygen/OffsetCurveBuilder_8h_source.html b/doxygen/OffsetCurveBuilder_8h_source.html index bae91e5647..ea4faf1dc2 100644 --- a/doxygen/OffsetCurveBuilder_8h_source.html +++ b/doxygen/OffsetCurveBuilder_8h_source.html @@ -84,19 +84,19 @@
35 // Forward declarations
36 namespace geos {
37 namespace geom {
-
38 class CoordinateSequence;
-
39 class PrecisionModel;
+
38 class CoordinateSequence;
+
39 class PrecisionModel;
40 }
41 }
42 
-
43 using geos::geom::CoordinateSequence;
-
44 using geos::geom::PrecisionModel;
-
45 
-
46 namespace geos {
-
47 namespace operation { // geos.operation
-
48 namespace buffer { // geos.operation.buffer
-
49 
-
68 class GEOS_DLL OffsetCurveBuilder {
+
43 namespace geos {
+
44 namespace operation { // geos.operation
+
45 namespace buffer { // geos.operation.buffer
+
46 
+
65 class GEOS_DLL OffsetCurveBuilder {
+
66  using CoordinateSequence = geos::geom::CoordinateSequence;
+
67  using PrecisionModel = geos::geom::PrecisionModel;
+
68 
69 public:
70 
71  /*
@@ -199,7 +199,7 @@
Coordinate is the lightweight class used to store coordinates.
Definition: Coordinate.h:217
Specifies the precision model of the Coordinate in a Geometry.
Definition: PrecisionModel.h:88
Contains the parameters which describe how a buffer should be constructed.
Definition: BufferParameters.h:56
-
Computes the raw offset curve for a single Geometry component (ring, line or point).
Definition: OffsetCurveBuilder.h:68
+
Computes the raw offset curve for a single Geometry component (ring, line or point).
Definition: OffsetCurveBuilder.h:65
std::unique_ptr< CoordinateSequence > getLineCurve(const CoordinateSequence *inputPts, double pDistance)
void getLineCurve(const CoordinateSequence *inputPts, double distance, std::vector< CoordinateSequence * > &lineList)
This method handles single points as well as lines.
const BufferParameters & getBufferParameters() const
Gets the buffer parameters being used to generate the curve.
Definition: OffsetCurveBuilder.h:92
diff --git a/doxygen/OffsetCurveSection_8h_source.html b/doxygen/OffsetCurveSection_8h_source.html index 7d089f0b33..6718ee82c6 100644 --- a/doxygen/OffsetCurveSection_8h_source.html +++ b/doxygen/OffsetCurveSection_8h_source.html @@ -72,78 +72,77 @@
23 // Forward declarations
24 namespace geos {
25 namespace geom {
-
26 class Coordinate;
-
27 class CoordinateSequence;
-
28 class Geometry;
-
29 class GeometryFactory;
-
30 class LineString;
+
26 class Coordinate;
+
27 class CoordinateSequence;
+
28 class Geometry;
+
29 class GeometryFactory;
+
30 class LineString;
31 }
32 }
33 
-
34 using geos::geom::Coordinate;
-
35 using geos::geom::CoordinateSequence;
-
36 using geos::geom::Geometry;
-
37 using geos::geom::GeometryFactory;
-
38 using geos::geom::LineString;
-
39 
-
40 namespace geos { // geos.
-
41 namespace operation { // geos.operation
-
42 namespace buffer { // geos.operation.buffer
-
43 
-
55 class GEOS_DLL OffsetCurveSection {
-
56 
-
57 private:
-
58 
-
59  std::unique_ptr<CoordinateSequence> sectionPts;
-
60  double location;
-
61  double locLast;
-
62 
-
63  bool isEndInSameSegment(double nextLoc) const;
+
34 namespace geos { // geos.
+
35 namespace operation { // geos.operation
+
36 namespace buffer { // geos.operation.buffer
+
37 
+
49 class GEOS_DLL OffsetCurveSection {
+
50  using Coordinate = geos::geom::Coordinate;
+
51  using CoordinateSequence = geos::geom::CoordinateSequence;
+
52  using Geometry = geos::geom::Geometry;
+
53  using GeometryFactory = geos::geom::GeometryFactory;
+
54  using LineString = geos::geom::LineString;
+
55 
+
56 private:
+
57 
+
58  std::unique_ptr<CoordinateSequence> sectionPts;
+
59  double location;
+
60  double locLast;
+
61 
+
62  bool isEndInSameSegment(double nextLoc) const;
+
63 
64 
-
65 
-
66 public:
-
67 
-
68  OffsetCurveSection(std::unique_ptr<CoordinateSequence> && secPts, double pLoc, double pLocLast)
-
69  : sectionPts(std::move(secPts))
-
70  , location(pLoc)
-
71  , locLast(pLocLast)
-
72  {};
-
73 
-
74  const CoordinateSequence* getCoordinates() const;
-
75  std::unique_ptr<CoordinateSequence> releaseCoordinates();
-
76 
-
77  double getLocation() const { return location; };
-
78 
-
88  static std::unique_ptr<Geometry> toLine(
-
89  std::vector<std::unique_ptr<OffsetCurveSection>>& sections,
-
90  const GeometryFactory* geomFactory);
-
91 
-
92  static std::unique_ptr<Geometry> toGeometry(
-
93  std::vector<std::unique_ptr<OffsetCurveSection>>& sections,
-
94  const GeometryFactory* geomFactory);
-
95 
-
96  static std::unique_ptr<OffsetCurveSection> create(
-
97  const CoordinateSequence* srcPts,
-
98  std::size_t start, std::size_t end,
-
99  double loc, double locLast);
-
100 
-
101  static bool OffsetCurveSectionComparator(
-
102  const std::unique_ptr<OffsetCurveSection>& a,
-
103  const std::unique_ptr<OffsetCurveSection>& b);
-
104 
-
105 };
+
65 public:
+
66 
+
67  OffsetCurveSection(std::unique_ptr<CoordinateSequence> && secPts, double pLoc, double pLocLast)
+
68  : sectionPts(std::move(secPts))
+
69  , location(pLoc)
+
70  , locLast(pLocLast)
+
71  {};
+
72 
+
73  const CoordinateSequence* getCoordinates() const;
+
74  std::unique_ptr<CoordinateSequence> releaseCoordinates();
+
75 
+
76  double getLocation() const { return location; };
+
77 
+
87  static std::unique_ptr<Geometry> toLine(
+
88  std::vector<std::unique_ptr<OffsetCurveSection>>& sections,
+
89  const GeometryFactory* geomFactory);
+
90 
+
91  static std::unique_ptr<Geometry> toGeometry(
+
92  std::vector<std::unique_ptr<OffsetCurveSection>>& sections,
+
93  const GeometryFactory* geomFactory);
+
94 
+
95  static std::unique_ptr<OffsetCurveSection> create(
+
96  const CoordinateSequence* srcPts,
+
97  std::size_t start, std::size_t end,
+
98  double loc, double locLast);
+
99 
+
100  static bool OffsetCurveSectionComparator(
+
101  const std::unique_ptr<OffsetCurveSection>& a,
+
102  const std::unique_ptr<OffsetCurveSection>& b);
+
103 
+
104 };
+
105 
106 
-
107 
-
108 } // namespace geos.operation.buffer
-
109 } // namespace geos.operation
-
110 } // namespace geos
-
111 
+
107 } // namespace geos.operation.buffer
+
108 } // namespace geos.operation
+
109 } // namespace geos
+
110 
The internal representation of a list of coordinates inside a Geometry.
Definition: CoordinateSequence.h:56
Coordinate is the lightweight class used to store coordinates.
Definition: Coordinate.h:217
Supplies a set of utility methods for building Geometry objects from CoordinateSequence or other Geom...
Definition: GeometryFactory.h:70
Basic implementation of Geometry, constructed and destructed by GeometryFactory.
Definition: Geometry.h:197
Definition: LineString.h:66
-
Definition: OffsetCurveSection.h:55
+
Definition: OffsetCurveSection.h:49
static std::unique_ptr< Geometry > toLine(std::vector< std::unique_ptr< OffsetCurveSection >> &sections, const GeometryFactory *geomFactory)
Basic namespace for all GEOS functionalities.
Definition: Angle.h:25
diff --git a/doxygen/OffsetCurve_8h_source.html b/doxygen/OffsetCurve_8h_source.html index f48cc47f68..a2febbe605 100644 --- a/doxygen/OffsetCurve_8h_source.html +++ b/doxygen/OffsetCurve_8h_source.html @@ -72,11 +72,11 @@
23 // Forward declarations
24 namespace geos {
25 namespace geom {
-
26 class Coordinate;
-
27 class CoordinateSequence;
-
28 class Geometry;
-
29 class LineString;
-
30 class Polygon;
+
26 class Coordinate;
+
27 class CoordinateSequence;
+
28 class Geometry;
+
29 class LineString;
+
30 class Polygon;
31 }
32 namespace operation {
33 namespace buffer {
@@ -86,157 +86,155 @@
37 }
38 }
39 
-
40 using geos::geom::Coordinate;
-
41 using geos::geom::CoordinateSequence;
-
42 using geos::geom::Geometry;
-
43 using geos::geom::GeometryFactory;
-
44 using geos::geom::LineString;
-
45 using geos::geom::Polygon;
-
46 
-
47 namespace geos {
-
48 namespace operation {
-
49 namespace buffer {
-
50 
-
90 class GEOS_DLL OffsetCurve {
-
91 
+
40 namespace geos {
+
41 namespace operation {
+
42 namespace buffer {
+
43 
+
83 class GEOS_DLL OffsetCurve {
+
84  using Coordinate = geos::geom::Coordinate;
+
85  using CoordinateSequence = geos::geom::CoordinateSequence;
+
86  using Geometry = geos::geom::Geometry;
+
87  using GeometryFactory = geos::geom::GeometryFactory;
+
88  using LineString = geos::geom::LineString;
+
89  using Polygon = geos::geom::Polygon;
+
90 
+
91 private:
92 
-
93 private:
-
94 
-
95  // Members
-
96  const Geometry& inputGeom;
-
97  double distance;
-
98  bool isJoined = false;
-
99 
-
100  BufferParameters bufferParams;
-
101  double matchDistance;
-
102  const GeometryFactory* geomFactory;
+
93  // Members
+
94  const Geometry& inputGeom;
+
95  double distance;
+
96  bool isJoined = false;
+
97 
+
98  BufferParameters bufferParams;
+
99  double matchDistance;
+
100  const GeometryFactory* geomFactory;
+
101 
+
102  // Methods
103 
-
104  // Methods
-
105 
-
106  std::unique_ptr<Geometry> computeCurve(
-
107  const LineString& lineGeom, double distance);
-
108 
-
109  std::vector<std::unique_ptr<OffsetCurveSection>> computeSections(
-
110  const LineString& lineGeom, double distance);
-
111 
-
112  std::unique_ptr<LineString> offsetSegment(
-
113  const CoordinateSequence* pts, double distance);
-
114 
-
115  static std::unique_ptr<Polygon> getBufferOriented(
-
116  const LineString& geom, double distance,
-
117  BufferParameters& bufParams);
-
118 
-
127  static const Polygon* extractMaxAreaPolygon(const Geometry* geom);
-
128 
-
129  void computeCurveSections(
-
130  const CoordinateSequence* bufferRingPts,
-
131  const CoordinateSequence& rawCurve,
-
132  std::vector<std::unique_ptr<OffsetCurveSection>>& sections);
-
133 
-
146  std::size_t matchSegments(
-
147  const Coordinate& raw0, const Coordinate& raw1,
-
148  std::size_t rawCurveIndex,
-
149  SegmentMCIndex& bufferSegIndex,
-
150  const CoordinateSequence* bufferPts,
-
151  std::vector<double>& rawCurvePos);
-
152 
-
153  static double segmentMatchFrac(
-
154  const Coordinate& p0, const Coordinate& p1,
-
155  const Coordinate& seg0, const Coordinate& seg1,
-
156  double matchDistance);
-
157 
-
169  void extractSections(
-
170  const CoordinateSequence* ringPts,
-
171  std::vector<double>& rawCurveLoc,
-
172  std::size_t startIndex,
-
173  std::vector<std::unique_ptr<OffsetCurveSection>>& sections);
-
174 
-
175  std::size_t findSectionStart(
-
176  const std::vector<double>& loc,
-
177  std::size_t end);
-
178 
-
179  std::size_t findSectionEnd(
-
180  const std::vector<double>& loc,
-
181  std::size_t start,
-
182  std::size_t firstStartIndex);
-
183 
-
184  static std::size_t nextIndex(std::size_t i, std::size_t size);
-
185  static std::size_t prevIndex(std::size_t i, std::size_t size);
-
186 
+
104  std::unique_ptr<Geometry> computeCurve(
+
105  const LineString& lineGeom, double distance);
+
106 
+
107  std::vector<std::unique_ptr<OffsetCurveSection>> computeSections(
+
108  const LineString& lineGeom, double distance);
+
109 
+
110  std::unique_ptr<LineString> offsetSegment(
+
111  const CoordinateSequence* pts, double distance);
+
112 
+
113  static std::unique_ptr<Polygon> getBufferOriented(
+
114  const LineString& geom, double distance,
+
115  BufferParameters& bufParams);
+
116 
+
125  static const Polygon* extractMaxAreaPolygon(const Geometry* geom);
+
126 
+
127  void computeCurveSections(
+
128  const CoordinateSequence* bufferRingPts,
+
129  const CoordinateSequence& rawCurve,
+
130  std::vector<std::unique_ptr<OffsetCurveSection>>& sections);
+
131 
+
144  std::size_t matchSegments(
+
145  const Coordinate& raw0, const Coordinate& raw1,
+
146  std::size_t rawCurveIndex,
+
147  SegmentMCIndex& bufferSegIndex,
+
148  const CoordinateSequence* bufferPts,
+
149  std::vector<double>& rawCurvePos);
+
150 
+
151  static double segmentMatchFrac(
+
152  const Coordinate& p0, const Coordinate& p1,
+
153  const Coordinate& seg0, const Coordinate& seg1,
+
154  double matchDistance);
+
155 
+
167  void extractSections(
+
168  const CoordinateSequence* ringPts,
+
169  std::vector<double>& rawCurveLoc,
+
170  std::size_t startIndex,
+
171  std::vector<std::unique_ptr<OffsetCurveSection>>& sections);
+
172 
+
173  std::size_t findSectionStart(
+
174  const std::vector<double>& loc,
+
175  std::size_t end);
+
176 
+
177  std::size_t findSectionEnd(
+
178  const std::vector<double>& loc,
+
179  std::size_t start,
+
180  std::size_t firstStartIndex);
+
181 
+
182  static std::size_t nextIndex(std::size_t i, std::size_t size);
+
183  static std::size_t prevIndex(std::size_t i, std::size_t size);
+
184 
+
185 
+
186 public:
187 
-
188 public:
-
189 
-
190  // Constants
-
191  static constexpr int MATCH_DISTANCE_FACTOR = 10000;
-
192 
-
197  static constexpr int MIN_QUADRANT_SEGMENTS = 8;
-
198 
-
209  OffsetCurve(const Geometry& geom, double dist)
-
210  : inputGeom(geom)
-
211  , distance(dist)
-
212  , matchDistance(std::abs(dist)/MATCH_DISTANCE_FACTOR)
-
213  , geomFactory(geom.getFactory())
-
214  {
-
215  if (!std::isfinite(dist)) {
-
216  throw util::IllegalArgumentException("OffsetCurve distance must be a finite value");
-
217  }
-
218  };
-
219 
-
229  OffsetCurve(const Geometry& geom, double dist, BufferParameters& bp)
-
230  : inputGeom(geom)
-
231  , distance(dist)
-
232  , matchDistance(std::abs(dist)/MATCH_DISTANCE_FACTOR)
-
233  , geomFactory(geom.getFactory())
-
234  {
-
235  if (!std::isfinite(dist)) {
-
236  throw util::IllegalArgumentException("OffsetCurve distance must be a finite value");
-
237  }
-
238  //-- set buffer params, leaving cap style as the default CAP_ROUND
-
239 
-
244  int quadSegs = bp.getQuadrantSegments();
-
245  if (quadSegs < MIN_QUADRANT_SEGMENTS) {
-
246  quadSegs = MIN_QUADRANT_SEGMENTS;
-
247  }
-
248  bufferParams.setQuadrantSegments(quadSegs);
-
249 
-
250  bufferParams.setJoinStyle( bp.getJoinStyle());
-
251  bufferParams.setMitreLimit( bp.getMitreLimit());
-
252  };
-
253 
-
261  void setJoined(bool pIsJoined);
-
262 
-
263  static std::unique_ptr<Geometry> getCurve(
-
264  const Geometry& geom,
-
265  double dist,
-
266  int quadSegs,
-
267  BufferParameters::JoinStyle joinStyle,
-
268  double mitreLimit);
-
269 
-
270  static std::unique_ptr<Geometry> getCurve(
-
271  const Geometry& geom, double dist);
-
272 
-
281  static std::unique_ptr<Geometry> getCurveJoined(
-
282  const Geometry& geom, double dist);
-
283 
-
289  std::unique_ptr<Geometry> getCurve();
-
290 
-
304  static std::unique_ptr<CoordinateSequence> rawOffsetCurve(
-
305  const LineString& line,
-
306  double distance,
-
307  BufferParameters& bufParams);
-
308 
-
317  static std::unique_ptr<CoordinateSequence> rawOffset(
-
318  const LineString& line,
-
319  double distance);
+
188  // Constants
+
189  static constexpr int MATCH_DISTANCE_FACTOR = 10000;
+
190 
+
195  static constexpr int MIN_QUADRANT_SEGMENTS = 8;
+
196 
+
207  OffsetCurve(const Geometry& geom, double dist)
+
208  : inputGeom(geom)
+
209  , distance(dist)
+
210  , matchDistance(std::abs(dist)/MATCH_DISTANCE_FACTOR)
+
211  , geomFactory(geom.getFactory())
+
212  {
+
213  if (!std::isfinite(dist)) {
+
214  throw util::IllegalArgumentException("OffsetCurve distance must be a finite value");
+
215  }
+
216  };
+
217 
+
227  OffsetCurve(const Geometry& geom, double dist, BufferParameters& bp)
+
228  : inputGeom(geom)
+
229  , distance(dist)
+
230  , matchDistance(std::abs(dist)/MATCH_DISTANCE_FACTOR)
+
231  , geomFactory(geom.getFactory())
+
232  {
+
233  if (!std::isfinite(dist)) {
+
234  throw util::IllegalArgumentException("OffsetCurve distance must be a finite value");
+
235  }
+
236  //-- set buffer params, leaving cap style as the default CAP_ROUND
+
237 
+
242  int quadSegs = bp.getQuadrantSegments();
+
243  if (quadSegs < MIN_QUADRANT_SEGMENTS) {
+
244  quadSegs = MIN_QUADRANT_SEGMENTS;
+
245  }
+
246  bufferParams.setQuadrantSegments(quadSegs);
+
247 
+
248  bufferParams.setJoinStyle( bp.getJoinStyle());
+
249  bufferParams.setMitreLimit( bp.getMitreLimit());
+
250  };
+
251 
+
259  void setJoined(bool pIsJoined);
+
260 
+
261  static std::unique_ptr<Geometry> getCurve(
+
262  const Geometry& geom,
+
263  double dist,
+
264  int quadSegs,
+
265  BufferParameters::JoinStyle joinStyle,
+
266  double mitreLimit);
+
267 
+
268  static std::unique_ptr<Geometry> getCurve(
+
269  const Geometry& geom, double dist);
+
270 
+
279  static std::unique_ptr<Geometry> getCurveJoined(
+
280  const Geometry& geom, double dist);
+
281 
+
287  std::unique_ptr<Geometry> getCurve();
+
288 
+
302  static std::unique_ptr<CoordinateSequence> rawOffsetCurve(
+
303  const LineString& line,
+
304  double distance,
+
305  BufferParameters& bufParams);
+
306 
+
315  static std::unique_ptr<CoordinateSequence> rawOffset(
+
316  const LineString& line,
+
317  double distance);
+
318 
+
319 };
320 
-
321 };
-
322 
-
323 } // namespace geos::operation::buffer
-
324 } // namespace geos::operation
-
325 } // namespace geos
+
321 } // namespace geos::operation::buffer
+
322 } // namespace geos::operation
+
323 } // namespace geos
+
324 
+
325 
326 
-
327 
-
328 
The internal representation of a list of coordinates inside a Geometry.
Definition: CoordinateSequence.h:56
Coordinate is the lightweight class used to store coordinates.
Definition: Coordinate.h:217
Supplies a set of utility methods for building Geometry objects from CoordinateSequence or other Geom...
Definition: GeometryFactory.h:70
@@ -251,14 +249,14 @@
int getQuadrantSegments() const
Definition: BufferParameters.h:137
void setQuadrantSegments(int quadSegs)
Sets the number of line segments used to approximate an angle fillet.
JoinStyle
Join styles.
Definition: BufferParameters.h:74
-
Definition: OffsetCurve.h:90
-
OffsetCurve(const Geometry &geom, double dist, BufferParameters &bp)
Definition: OffsetCurve.h:229
+
Definition: OffsetCurve.h:83
+
OffsetCurve(const Geometry &geom, double dist, BufferParameters &bp)
Definition: OffsetCurve.h:227
std::unique_ptr< Geometry > getCurve()
static std::unique_ptr< CoordinateSequence > rawOffset(const LineString &line, double distance)
void setJoined(bool pIsJoined)
static std::unique_ptr< CoordinateSequence > rawOffsetCurve(const LineString &line, double distance, BufferParameters &bufParams)
static std::unique_ptr< Geometry > getCurveJoined(const Geometry &geom, double dist)
-
OffsetCurve(const Geometry &geom, double dist)
Definition: OffsetCurve.h:209
+
OffsetCurve(const Geometry &geom, double dist)
Definition: OffsetCurve.h:207
Indicates one or more illegal arguments.
Definition: IllegalArgumentException.h:33
Basic namespace for all GEOS functionalities.
Definition: Angle.h:25
diff --git a/doxygen/OuterShellsExtracter_8h_source.html b/doxygen/OuterShellsExtracter_8h_source.html index 81ca2c854a..db9a7e077c 100644 --- a/doxygen/OuterShellsExtracter_8h_source.html +++ b/doxygen/OuterShellsExtracter_8h_source.html @@ -67,55 +67,49 @@
18 
19 namespace geos {
20 namespace geom {
-
21 class Coordinate;
-
22 class CoordinateSequence;
-
23 class Envelope;
-
24 class Geometry;
-
25 class GeometryCollection;
-
26 class GeometryFactory;
-
27 class LinearRing;
-
28 class Polygon;
-
29 }
-
30 }
-
31 
-
32 using geos::geom::Geometry;
-
33 using geos::geom::LinearRing;
-
34 
-
35 namespace geos {
-
36 namespace algorithm { // geos::algorithm
-
37 namespace hull { // geos::algorithm::hull
-
38 
-
46 class OuterShellsExtracter {
-
47 private:
+
21 class Geometry;
+
22 class LinearRing;
+
23 }
+
24 }
+
25 
+
26 namespace geos {
+
27 namespace algorithm { // geos::algorithm
+
28 namespace hull { // geos::algorithm::hull
+
29 
+
37 class OuterShellsExtracter {
+
38  using Geometry = geos::geom::Geometry;
+
39  using LinearRing = geos::geom::LinearRing;
+
40 
+
41 private:
+
42 
+
43  OuterShellsExtracter(const Geometry& g);
+
44 
+
45  void extractOuterShells(std::vector<const LinearRing*>& outerShells);
+
46 
+
47  bool isOuter(const LinearRing& shell, std::vector<const LinearRing*>& outerShells);
48 
-
49  OuterShellsExtracter(const Geometry& g);
+
49  bool covers(const LinearRing& shellA, const LinearRing& shellB);
50 
-
51  void extractOuterShells(std::vector<const LinearRing*>& outerShells);
+
51  bool isPointInRing(const LinearRing& shell, const LinearRing& shellRing);
52 
-
53  bool isOuter(const LinearRing& shell, std::vector<const LinearRing*>& outerShells);
+
53  static void extractShellRings(const Geometry& polygons, std::vector<const LinearRing*>& shells);
54 
-
55  bool covers(const LinearRing& shellA, const LinearRing& shellB);
-
56 
-
57  bool isPointInRing(const LinearRing& shell, const LinearRing& shellRing);
+
55  static bool envelopeAreaComparator(
+
56  const LinearRing* g1,
+
57  const LinearRing* g2);
58 
-
59  static void extractShellRings(const Geometry& polygons, std::vector<const LinearRing*>& shells);
+
59  const Geometry& geom;
60 
-
61  static bool envelopeAreaComparator(
-
62  const LinearRing* g1,
-
63  const LinearRing* g2);
-
64 
-
65  const Geometry& geom;
-
66 
-
67 public:
-
68  static void extractShells(const Geometry* polygons, std::vector<const LinearRing*>& shells);
+
61 public:
+
62  static void extractShells(const Geometry* polygons, std::vector<const LinearRing*>& shells);
+
63 
+
64 };
+
65 
+
66 } // geos::algorithm::hull
+
67 } // geos::algorithm
+
68 } // geos
69 
-
70 };
-
71 
-
72 } // geos::algorithm::hull
-
73 } // geos::algorithm
-
74 } // geos
-
75 
-
Definition: OuterShellsExtracter.h:46
+
Definition: OuterShellsExtracter.h:37
Basic implementation of Geometry, constructed and destructed by GeometryFactory.
Definition: Geometry.h:197
Models an OGC SFS LinearRing. A LinearRing is a LineString which is both closed and simple.
Definition: LinearRing.h:54
Basic namespace for all GEOS functionalities.
Definition: Angle.h:25
diff --git a/doxygen/OverlayEdgeRing_8h_source.html b/doxygen/OverlayEdgeRing_8h_source.html index c9f7060243..1ccd46b5f6 100644 --- a/doxygen/OverlayEdgeRing_8h_source.html +++ b/doxygen/OverlayEdgeRing_8h_source.html @@ -93,72 +93,75 @@
44 namespace operation { // geos.operation
45 namespace overlayng { // geos.operation.overlayng
46 
-
47 using namespace geos::geom;
-
48 using algorithm::locate::PointOnGeometryLocator;
-
49 using algorithm::locate::IndexedPointInAreaLocator;
-
50 
-
51 class GEOS_DLL OverlayEdgeRing {
-
52 
-
53 private:
-
54 
-
55  // Members
-
56  OverlayEdge* startEdge;
-
57  std::unique_ptr<LinearRing> ring;
-
58  bool m_isHole;
-
59  std::unique_ptr<IndexedPointInAreaLocator> locator;
-
60  OverlayEdgeRing* shell;
-
61  // a list of EdgeRings which are holes in this EdgeRing
-
62  std::vector<OverlayEdgeRing*> holes;
-
63 
-
64  // Methods
-
65  void computeRingPts(OverlayEdge* start, CoordinateSequence& pts);
-
66  void computeRing(std::unique_ptr<CoordinateSequence> && ringPts, const GeometryFactory* geometryFactory);
-
67 
-
73  const CoordinateSequence& getCoordinates();
-
74  PointOnGeometryLocator* getLocator();
-
75  static void closeRing(CoordinateSequence& pts);
-
76 
-
77 
-
78 public:
+
47 class GEOS_DLL OverlayEdgeRing {
+
48  using Coordinate = geos::geom::Coordinate;
+
49  using CoordinateSequence = geos::geom::CoordinateSequence;
+
50  using GeometryFactory = geos::geom::GeometryFactory;
+
51  using LinearRing = geos::geom::LinearRing;
+
52  using Polygon = geos::geom::Polygon;
+
53  using PointOnGeometryLocator = algorithm::locate::PointOnGeometryLocator;
+
54  using IndexedPointInAreaLocator = algorithm::locate::IndexedPointInAreaLocator;
+
55 
+
56 private:
+
57 
+
58  // Members
+
59  OverlayEdge* startEdge;
+
60  std::unique_ptr<LinearRing> ring;
+
61  bool m_isHole;
+
62  std::unique_ptr<IndexedPointInAreaLocator> locator;
+
63  OverlayEdgeRing* shell;
+
64  // a list of EdgeRings which are holes in this EdgeRing
+
65  std::vector<OverlayEdgeRing*> holes;
+
66 
+
67  // Methods
+
68  void computeRingPts(OverlayEdge* start, CoordinateSequence& pts);
+
69  void computeRing(std::unique_ptr<CoordinateSequence> && ringPts, const GeometryFactory* geometryFactory);
+
70 
+
76  const CoordinateSequence& getCoordinates();
+
77  PointOnGeometryLocator* getLocator();
+
78  static void closeRing(CoordinateSequence& pts);
79 
-
80  OverlayEdgeRing(OverlayEdge* start, const GeometryFactory* geometryFactory);
-
81 
-
82  std::unique_ptr<LinearRing> getRing();
-
83  const LinearRing* getRingPtr() const;
+
80 
+
81 public:
+
82 
+
83  OverlayEdgeRing(OverlayEdge* start, const GeometryFactory* geometryFactory);
84 
-
89  bool isHole() const;
-
90 
-
96  void setShell(OverlayEdgeRing* p_shell);
-
97 
-
103  bool hasShell() const;
-
104 
-
110  const OverlayEdgeRing* getShell() const;
-
111 
-
112  void addHole(OverlayEdgeRing* ring);
-
113 
-
114  bool isInRing(const Coordinate& pt);
-
115 
-
116  const Coordinate& getCoordinate();
-
117 
-
122  std::unique_ptr<Polygon> toPolygon(const GeometryFactory* factory);
-
123 
-
124  OverlayEdge* getEdge();
-
125 
-
144  OverlayEdgeRing* findEdgeRingContaining(const std::vector<OverlayEdgeRing*>& erList);
-
145 
-
146 
-
147 };
+
85  std::unique_ptr<LinearRing> getRing();
+
86  const LinearRing* getRingPtr() const;
+
87 
+
92  bool isHole() const;
+
93 
+
99  void setShell(OverlayEdgeRing* p_shell);
+
100 
+
106  bool hasShell() const;
+
107 
+
113  const OverlayEdgeRing* getShell() const;
+
114 
+
115  void addHole(OverlayEdgeRing* ring);
+
116 
+
117  bool isInRing(const Coordinate& pt);
+
118 
+
119  const Coordinate& getCoordinate();
+
120 
+
125  std::unique_ptr<Polygon> toPolygon(const GeometryFactory* factory);
+
126 
+
127  OverlayEdge* getEdge();
+
128 
+
147  OverlayEdgeRing* findEdgeRingContaining(const std::vector<OverlayEdgeRing*>& erList);
148 
149 
-
150 } // namespace geos.operation.overlayng
-
151 } // namespace geos.operation
-
152 } // namespace geos
-
153 
+
150 };
+
151 
+
152 
+
153 } // namespace geos.operation.overlayng
+
154 } // namespace geos.operation
+
155 } // namespace geos
+
156 
The internal representation of a list of coordinates inside a Geometry.
Definition: CoordinateSequence.h:56
Coordinate is the lightweight class used to store coordinates.
Definition: Coordinate.h:217
Supplies a set of utility methods for building Geometry objects from CoordinateSequence or other Geom...
Definition: GeometryFactory.h:70
Models an OGC SFS LinearRing. A LinearRing is a LineString which is both closed and simple.
Definition: LinearRing.h:54
-
Definition: Angle.h:26
+
Represents a linear polygon, which may include holes.
Definition: Polygon.h:61
Basic namespace for all GEOS functionalities.
Definition: Angle.h:25
diff --git a/doxygen/OverlayEdge_8h_source.html b/doxygen/OverlayEdge_8h_source.html index 7430957758..ad3154bbb0 100644 --- a/doxygen/OverlayEdge_8h_source.html +++ b/doxygen/OverlayEdge_8h_source.html @@ -75,8 +75,8 @@
26 // Forward declarations
27 namespace geos {
28 namespace geom {
-
29 class Coordinate;
-
30 class CoordinateSequence;
+
29 class Coordinate;
+
30 class CoordinateSequence;
31 }
32 namespace operation {
33 namespace overlayng {
@@ -86,237 +86,236 @@
37 }
38 }
39 
-
40 using geos::geom::Coordinate;
-
41 using geos::geom::CoordinateXYZM;
-
42 using geos::geom::CoordinateSequence;
-
43 using geos::geom::Location;
-
44 
-
45 namespace geos { // geos.
-
46 namespace operation { // geos.operation
-
47 namespace overlayng { // geos.operation.overlayng
-
48 
-
52 class GEOS_DLL OverlayEdge : public edgegraph::HalfEdge {
-
53 
-
54 private:
-
55 
-
56  // Members
-
57  const CoordinateSequence* pts;
-
63  bool direction;
-
64  CoordinateXYZM dirPt;
-
65  OverlayLabel* label;
-
66  bool m_isInResultArea;
-
67  bool m_isInResultLine;
-
68  bool m_isVisited;
-
69  OverlayEdge* nextResultEdge;
-
70  const OverlayEdgeRing* edgeRing;
-
71  const MaximalEdgeRing* maxEdgeRing;
-
72  OverlayEdge* nextResultMaxEdge;
-
73 
-
74  void markVisited()
-
75  {
-
76  m_isVisited = true;
-
77  };
+
40 namespace geos { // geos.
+
41 namespace operation { // geos.operation
+
42 namespace overlayng { // geos.operation.overlayng
+
43 
+
47 class GEOS_DLL OverlayEdge : public edgegraph::HalfEdge {
+
48  using Coordinate = geos::geom::Coordinate;
+
49  using CoordinateXYZM = geos::geom::CoordinateXYZM;
+
50  using CoordinateSequence = geos::geom::CoordinateSequence;
+
51  using Location = geos::geom::Location;
+
52 
+
53 private:
+
54 
+
55  // Members
+
56  const CoordinateSequence* pts;
+
62  bool direction;
+
63  CoordinateXYZM dirPt;
+
64  OverlayLabel* label;
+
65  bool m_isInResultArea;
+
66  bool m_isInResultLine;
+
67  bool m_isVisited;
+
68  OverlayEdge* nextResultEdge;
+
69  const OverlayEdgeRing* edgeRing;
+
70  const MaximalEdgeRing* maxEdgeRing;
+
71  OverlayEdge* nextResultMaxEdge;
+
72 
+
73  void markVisited()
+
74  {
+
75  m_isVisited = true;
+
76  };
+
77 
78 
-
79 
-
80 public:
-
81 
-
82  OverlayEdge(const CoordinateXYZM& p_orig, const CoordinateXYZM& p_dirPt,
-
83  bool p_direction, OverlayLabel* p_label,
-
84  const CoordinateSequence* p_pts)
-
85  : HalfEdge(p_orig)
-
86  , pts(p_pts)
-
87  , direction(p_direction)
-
88  , dirPt(p_dirPt)
-
89  , label(p_label)
-
90  , m_isInResultArea(false)
-
91  , m_isInResultLine(false)
-
92  , m_isVisited(false)
-
93  , nextResultEdge(nullptr)
-
94  , edgeRing(nullptr)
-
95  , maxEdgeRing(nullptr)
-
96  , nextResultMaxEdge(nullptr)
-
97  {}
-
98 
-
99  ~OverlayEdge() override {};
-
100 
-
101  bool isForward() const
-
102  {
-
103  return direction;
-
104  };
-
105 
-
106  const CoordinateXYZM& directionPt() const override
-
107  {
-
108  return dirPt;
-
109  };
-
110 
-
111  OverlayLabel* getLabel() const
-
112  {
-
113  return label;
-
114  };
-
115 
-
116  Location getLocation(uint8_t index, int position) const
-
117  {
-
118  return label->getLocation(index, position, direction);
-
119  };
-
120 
-
121  const CoordinateXYZM& getCoordinate() const
-
122  {
-
123  return orig();
-
124  };
-
125 
-
126  const CoordinateSequence* getCoordinatesRO() const
-
127  {
-
128  return pts;
-
129  };
-
130 
-
131  std::unique_ptr<CoordinateSequence> getCoordinates()
-
132  {
-
133  // return a copy of pts
-
134  return pts->clone();
-
135  };
-
136 
-
137  std::unique_ptr<CoordinateSequence> getCoordinatesOriented();
-
138 
-
148  void addCoordinates(CoordinateSequence* coords) const;
-
149 
-
150  OverlayEdge* symOE() const
-
151  {
-
152  return static_cast<OverlayEdge*>(sym());
-
153  };
-
154 
-
155  OverlayEdge* oNextOE() const
-
156  {
-
157  return static_cast<OverlayEdge*>(oNext());
-
158  };
-
159 
-
160  bool isInResultArea() const
-
161  {
-
162  return m_isInResultArea;
-
163  };
-
164 
-
165  bool isInResultAreaBoth() const
-
166  {
-
167  return m_isInResultArea && symOE()->m_isInResultArea;
-
168  };
-
169 
-
170  bool isInResultEither() const
-
171  {
-
172  return isInResult() || symOE()->isInResult();
-
173  };
-
174 
-
175  void unmarkFromResultAreaBoth()
-
176  {
-
177  m_isInResultArea = false;
-
178  symOE()->m_isInResultArea = false;
-
179  };
-
180 
-
181  void markInResultArea()
-
182  {
-
183  m_isInResultArea = true;
-
184  };
-
185 
-
186  void markInResultAreaBoth()
-
187  {
-
188  m_isInResultArea = true;
-
189  symOE()->m_isInResultArea = true;
-
190  };
-
191 
-
192  bool isInResultLine() const
-
193  {
-
194  return m_isInResultLine;
-
195  };
-
196 
-
197  void markInResultLine()
-
198  {
-
199  m_isInResultLine = true;
-
200  symOE()->m_isInResultLine = true;
-
201  };
-
202 
-
203  bool isInResult() const
-
204  {
-
205  return m_isInResultArea || m_isInResultLine;
-
206  };
-
207 
-
208  void setNextResult(OverlayEdge* e)
-
209  {
-
210  // Assert: e.orig() == this.dest();
-
211  nextResultEdge = e;
-
212  };
-
213 
-
214  OverlayEdge* nextResult() const
-
215  {
-
216  return nextResultEdge;
-
217  };
-
218 
-
219  bool isResultLinked() const
-
220  {
-
221  return nextResultEdge != nullptr;
-
222  };
-
223 
-
224  void setNextResultMax(OverlayEdge* e)
-
225  {
-
226  // Assert: e.orig() == this.dest();
-
227  nextResultMaxEdge = e;
-
228  };
-
229 
-
230  OverlayEdge* nextResultMax() const
-
231  {
-
232  return nextResultMaxEdge;
-
233  };
-
234 
-
235  bool isResultMaxLinked() const
-
236  {
-
237  return nextResultMaxEdge != nullptr;
-
238  };
-
239 
-
240  bool isVisited() const
-
241  {
-
242  return m_isVisited;
-
243  };
-
244 
-
245  void markVisitedBoth()
-
246  {
-
247  markVisited();
-
248  symOE()->markVisited();
-
249  };
-
250 
-
251  void setEdgeRing(const OverlayEdgeRing* p_edgeRing)
-
252  {
-
253  edgeRing = p_edgeRing;
-
254  };
-
255 
-
256  const OverlayEdgeRing* getEdgeRing() const
-
257  {
-
258  return edgeRing;
-
259  };
-
260 
-
261  const MaximalEdgeRing* getEdgeRingMax() const
-
262  {
-
263  return maxEdgeRing;
-
264  };
-
265 
-
266  void setEdgeRingMax(const MaximalEdgeRing* p_maximalEdgeRing)
-
267  {
-
268  maxEdgeRing = p_maximalEdgeRing;
-
269  };
-
270 
-
271  friend std::ostream& operator<<(std::ostream& os, const OverlayEdge& oe);
-
272  std::string resultSymbol() const;
-
273 
-
274 };
+
79 public:
+
80 
+
81  OverlayEdge(const CoordinateXYZM& p_orig, const CoordinateXYZM& p_dirPt,
+
82  bool p_direction, OverlayLabel* p_label,
+
83  const CoordinateSequence* p_pts)
+
84  : HalfEdge(p_orig)
+
85  , pts(p_pts)
+
86  , direction(p_direction)
+
87  , dirPt(p_dirPt)
+
88  , label(p_label)
+
89  , m_isInResultArea(false)
+
90  , m_isInResultLine(false)
+
91  , m_isVisited(false)
+
92  , nextResultEdge(nullptr)
+
93  , edgeRing(nullptr)
+
94  , maxEdgeRing(nullptr)
+
95  , nextResultMaxEdge(nullptr)
+
96  {}
+
97 
+
98  ~OverlayEdge() override {};
+
99 
+
100  bool isForward() const
+
101  {
+
102  return direction;
+
103  };
+
104 
+
105  const CoordinateXYZM& directionPt() const override
+
106  {
+
107  return dirPt;
+
108  };
+
109 
+
110  OverlayLabel* getLabel() const
+
111  {
+
112  return label;
+
113  };
+
114 
+
115  Location getLocation(uint8_t index, int position) const
+
116  {
+
117  return label->getLocation(index, position, direction);
+
118  };
+
119 
+
120  const CoordinateXYZM& getCoordinate() const
+
121  {
+
122  return orig();
+
123  };
+
124 
+
125  const CoordinateSequence* getCoordinatesRO() const
+
126  {
+
127  return pts;
+
128  };
+
129 
+
130  std::unique_ptr<CoordinateSequence> getCoordinates()
+
131  {
+
132  // return a copy of pts
+
133  return pts->clone();
+
134  };
+
135 
+
136  std::unique_ptr<CoordinateSequence> getCoordinatesOriented();
+
137 
+
147  void addCoordinates(CoordinateSequence* coords) const;
+
148 
+
149  OverlayEdge* symOE() const
+
150  {
+
151  return static_cast<OverlayEdge*>(sym());
+
152  };
+
153 
+
154  OverlayEdge* oNextOE() const
+
155  {
+
156  return static_cast<OverlayEdge*>(oNext());
+
157  };
+
158 
+
159  bool isInResultArea() const
+
160  {
+
161  return m_isInResultArea;
+
162  };
+
163 
+
164  bool isInResultAreaBoth() const
+
165  {
+
166  return m_isInResultArea && symOE()->m_isInResultArea;
+
167  };
+
168 
+
169  bool isInResultEither() const
+
170  {
+
171  return isInResult() || symOE()->isInResult();
+
172  };
+
173 
+
174  void unmarkFromResultAreaBoth()
+
175  {
+
176  m_isInResultArea = false;
+
177  symOE()->m_isInResultArea = false;
+
178  };
+
179 
+
180  void markInResultArea()
+
181  {
+
182  m_isInResultArea = true;
+
183  };
+
184 
+
185  void markInResultAreaBoth()
+
186  {
+
187  m_isInResultArea = true;
+
188  symOE()->m_isInResultArea = true;
+
189  };
+
190 
+
191  bool isInResultLine() const
+
192  {
+
193  return m_isInResultLine;
+
194  };
+
195 
+
196  void markInResultLine()
+
197  {
+
198  m_isInResultLine = true;
+
199  symOE()->m_isInResultLine = true;
+
200  };
+
201 
+
202  bool isInResult() const
+
203  {
+
204  return m_isInResultArea || m_isInResultLine;
+
205  };
+
206 
+
207  void setNextResult(OverlayEdge* e)
+
208  {
+
209  // Assert: e.orig() == this.dest();
+
210  nextResultEdge = e;
+
211  };
+
212 
+
213  OverlayEdge* nextResult() const
+
214  {
+
215  return nextResultEdge;
+
216  };
+
217 
+
218  bool isResultLinked() const
+
219  {
+
220  return nextResultEdge != nullptr;
+
221  };
+
222 
+
223  void setNextResultMax(OverlayEdge* e)
+
224  {
+
225  // Assert: e.orig() == this.dest();
+
226  nextResultMaxEdge = e;
+
227  };
+
228 
+
229  OverlayEdge* nextResultMax() const
+
230  {
+
231  return nextResultMaxEdge;
+
232  };
+
233 
+
234  bool isResultMaxLinked() const
+
235  {
+
236  return nextResultMaxEdge != nullptr;
+
237  };
+
238 
+
239  bool isVisited() const
+
240  {
+
241  return m_isVisited;
+
242  };
+
243 
+
244  void markVisitedBoth()
+
245  {
+
246  markVisited();
+
247  symOE()->markVisited();
+
248  };
+
249 
+
250  void setEdgeRing(const OverlayEdgeRing* p_edgeRing)
+
251  {
+
252  edgeRing = p_edgeRing;
+
253  };
+
254 
+
255  const OverlayEdgeRing* getEdgeRing() const
+
256  {
+
257  return edgeRing;
+
258  };
+
259 
+
260  const MaximalEdgeRing* getEdgeRingMax() const
+
261  {
+
262  return maxEdgeRing;
+
263  };
+
264 
+
265  void setEdgeRingMax(const MaximalEdgeRing* p_maximalEdgeRing)
+
266  {
+
267  maxEdgeRing = p_maximalEdgeRing;
+
268  };
+
269 
+
270  friend std::ostream& operator<<(std::ostream& os, const OverlayEdge& oe);
+
271  std::string resultSymbol() const;
+
272 
+
273 };
+
274 
275 
-
276 
-
277 } // namespace geos.operation.overlayng
-
278 } // namespace geos.operation
-
279 } // namespace geos
+
276 } // namespace geos.operation.overlayng
+
277 } // namespace geos.operation
+
278 } // namespace geos
Definition: HalfEdge.h:56
The internal representation of a list of coordinates inside a Geometry.
Definition: CoordinateSequence.h:56
Coordinate is the lightweight class used to store coordinates.
Definition: Coordinate.h:217
-
Definition: OverlayEdge.h:52
-
const CoordinateXYZM & directionPt() const override
Definition: OverlayEdge.h:106
+
Definition: OverlayEdge.h:47
+
const CoordinateXYZM & directionPt() const override
Definition: OverlayEdge.h:105
void addCoordinates(CoordinateSequence *coords) const
-
Definition: OverlayLabel.h:89
-
Location getLocation(uint8_t index) const
Definition: OverlayLabel.h:371
+
Definition: OverlayLabel.h:86
+
Location getLocation(uint8_t index) const
Definition: OverlayLabel.h:370
std::unique_ptr< CoordinateSequence > clone() const
Returns a heap-allocated deep copy of this CoordinateSequence.
Location
Constants representing the location of a point relative to a geometry.
Definition: Location.h:32
Basic namespace for all GEOS functionalities.
Definition: Angle.h:25
diff --git a/doxygen/OverlayGraph_8h_source.html b/doxygen/OverlayGraph_8h_source.html index ca5701204f..65d770d2fb 100644 --- a/doxygen/OverlayGraph_8h_source.html +++ b/doxygen/OverlayGraph_8h_source.html @@ -88,9 +88,9 @@
39 namespace operation { // geos.operation
40 namespace overlayng { // geos.operation.overlayng
41 
-
42 using namespace geos::geom;
-
43 
-
54 class GEOS_DLL OverlayGraph {
+
52 class GEOS_DLL OverlayGraph {
+
53  using Coordinate = geos::geom::Coordinate;
+
54  using CoordinateSequence = geos::geom::CoordinateSequence;
55 
56 private:
57 
@@ -145,8 +145,8 @@
The internal representation of a list of coordinates inside a Geometry.
Definition: CoordinateSequence.h:56
Coordinate is the lightweight class used to store coordinates.
Definition: Coordinate.h:217
Definition: operation/overlayng/Edge.h:55
-
Definition: OverlayEdge.h:52
-
Definition: OverlayGraph.h:54
+
Definition: OverlayEdge.h:47
+
Definition: OverlayGraph.h:52
std::vector< OverlayEdge * > getNodeEdges()
std::vector< OverlayEdge * > & getEdges()
std::vector< OverlayEdge * > getResultAreaEdges()
@@ -154,8 +154,7 @@
OverlayEdge * addEdge(Edge *edge)
OverlayGraph()
OverlayEdge * getNodeEdge(const Coordinate &nodePt) const
-
Definition: OverlayLabel.h:89
-
Definition: Angle.h:26
+
Definition: OverlayLabel.h:86
Basic namespace for all GEOS functionalities.
Definition: Angle.h:25
diff --git a/doxygen/OverlayLabel_8h_source.html b/doxygen/OverlayLabel_8h_source.html index cf94a35d86..f38a9fd300 100644 --- a/doxygen/OverlayLabel_8h_source.html +++ b/doxygen/OverlayLabel_8h_source.html @@ -69,284 +69,281 @@
20 #include <geos/geom/Position.h>
21 #include <geos/export.h>
22 
-
23 using geos::geom::Location;
-
24 using geos::geom::Position;
-
25 
-
26 namespace geos { // geos.
-
27 namespace operation { // geos.operation
-
28 namespace overlayng { // geos.operation.overlayng
-
29 
-
89 class GEOS_DLL OverlayLabel {
-
90 
-
91 private:
-
92 
-
93  // Members
-
94  int aDim = DIM_NOT_PART;
-
95  bool aIsHole = false;
-
96  Location aLocLeft = LOC_UNKNOWN;
-
97  Location aLocRight = LOC_UNKNOWN;
-
98  Location aLocLine = LOC_UNKNOWN;
-
99  int bDim = DIM_NOT_PART;
-
100  bool bIsHole = false;
-
101  Location bLocLeft = LOC_UNKNOWN;
-
102  Location bLocRight = LOC_UNKNOWN;
-
103  Location bLocLine = LOC_UNKNOWN;
-
104 
-
105  std::string dimensionSymbol(int dim) const;
-
106  void locationString(uint8_t index, bool isForward, std::ostream& os) const;
+
23 namespace geos { // geos.
+
24 namespace operation { // geos.operation
+
25 namespace overlayng { // geos.operation.overlayng
+
26 
+
86 class GEOS_DLL OverlayLabel {
+
87  using Location = geos::geom::Location;
+
88  using Position = geos::geom::Position;
+
89 
+
90 private:
+
91 
+
92  // Members
+
93  int aDim = DIM_NOT_PART;
+
94  bool aIsHole = false;
+
95  Location aLocLeft = LOC_UNKNOWN;
+
96  Location aLocRight = LOC_UNKNOWN;
+
97  Location aLocLine = LOC_UNKNOWN;
+
98  int bDim = DIM_NOT_PART;
+
99  bool bIsHole = false;
+
100  Location bLocLeft = LOC_UNKNOWN;
+
101  Location bLocRight = LOC_UNKNOWN;
+
102  Location bLocLine = LOC_UNKNOWN;
+
103 
+
104  std::string dimensionSymbol(int dim) const;
+
105  void locationString(uint8_t index, bool isForward, std::ostream& os) const;
+
106 
107 
-
108 
-
109 public:
-
110 
-
111  static constexpr Location LOC_UNKNOWN = Location::NONE;
-
112 
-
113  enum {
-
114  DIM_UNKNOWN = -1,
-
115  DIM_NOT_PART = -1,
-
116  DIM_LINE = 1,
-
117  DIM_BOUNDARY = 2,
-
118  DIM_COLLAPSE = 3
-
119  };
-
120 
-
121  OverlayLabel()
-
122  : aDim(DIM_NOT_PART)
-
123  , aIsHole(false)
-
124  , aLocLeft(LOC_UNKNOWN)
-
125  , aLocRight(LOC_UNKNOWN)
-
126  , aLocLine(LOC_UNKNOWN)
-
127  , bDim(DIM_NOT_PART)
-
128  , bIsHole(false)
-
129  , bLocLeft(LOC_UNKNOWN)
-
130  , bLocRight(LOC_UNKNOWN)
-
131  , bLocLine(LOC_UNKNOWN) {};
-
132 
-
133  explicit OverlayLabel(uint8_t p_index)
-
134  : OverlayLabel()
-
135  {
-
136  initLine(p_index);
-
137  };
-
138 
-
139  OverlayLabel(uint8_t p_index, Location p_locLeft, Location p_locRight, bool p_isHole)
-
140  : OverlayLabel()
-
141  {
-
142  initBoundary(p_index, p_locLeft, p_locRight, p_isHole);
-
143  };
-
144 
-
145  int dimension(uint8_t index) const { return index == 0 ? aDim : bDim; };
-
146  void initBoundary(uint8_t index, Location locLeft, Location locRight, bool p_isHole);
-
147  void initCollapse(uint8_t index, bool p_isHole);
-
148  void initLine(uint8_t index);
-
149  void initNotPart(uint8_t index);
-
150 
-
160  void setLocationLine(uint8_t index, Location loc);
-
161  void setLocationAll(uint8_t index, Location loc);
-
162  void setLocationCollapse(uint8_t index);
-
163 
-
164  /*
-
165  * Tests whether at least one of the sources is a Line.
-
166  *
-
167  * @return true if at least one source is a line
-
168  */
-
169  bool isLine() const
-
170  {
-
171  return aDim == DIM_LINE || bDim == DIM_LINE;
-
172  };
-
173 
-
174  bool isLine(uint8_t index) const
-
175  {
-
176  return index == 0 ? aDim == DIM_LINE : bDim == DIM_LINE;
-
177  };
-
178 
-
179  bool isLinear(uint8_t index) const
-
180  {
-
181  if (index == 0) {
-
182  return aDim == DIM_LINE || aDim == DIM_COLLAPSE;
-
183  }
-
184  return bDim == DIM_LINE || bDim == DIM_COLLAPSE;
-
185  };
-
186 
-
187  bool isKnown(uint8_t index) const
-
188  {
-
189  if (index == 0) {
-
190  return aDim != DIM_UNKNOWN;
-
191  }
-
192  return bDim != DIM_UNKNOWN;
-
193  };
-
194 
-
195  bool isNotPart(uint8_t index) const
-
196  {
-
197  if (index == 0) {
-
198  return aDim == DIM_NOT_PART;
-
199  }
-
200  return bDim == DIM_NOT_PART;
-
201  };
-
202 
-
203  bool isBoundaryEither() const
-
204  {
-
205  return aDim == DIM_BOUNDARY || bDim == DIM_BOUNDARY;
-
206  };
-
207 
-
208  bool isBoundaryBoth() const
-
209  {
-
210  return aDim == DIM_BOUNDARY && bDim == DIM_BOUNDARY;
-
211  };
-
212 
-
220  bool isBoundaryCollapse() const
-
221  {
-
222  if (isLine()) return false;
-
223  return ! isBoundaryBoth();
-
224  };
-
225 
-
230  bool isBoundaryTouch() const
-
231  {
-
232  return isBoundaryBoth() &&
-
233  getLocation(0, Position::RIGHT, true) != getLocation(1, Position::RIGHT, true);
-
234  };
-
235 
-
236  bool isBoundary(uint8_t index) const
-
237  {
-
238  if (index == 0) {
-
239  return aDim == DIM_BOUNDARY;
-
240  }
-
241  return bDim == DIM_BOUNDARY;
-
242  };
-
243 
-
244  bool isLineLocationUnknown(int index) const
-
245  {
-
246  if (index == 0) {
-
247  return aLocLine == LOC_UNKNOWN;
-
248  }
-
249  else {
-
250  return bLocLine == LOC_UNKNOWN;
-
251  }
-
252  };
-
253 
-
258  bool isBoundarySingleton() const
-
259  {
-
260  if (aDim == DIM_BOUNDARY && bDim == DIM_NOT_PART) {
-
261  return true;
-
262  }
-
263 
-
264  if (bDim == DIM_BOUNDARY && aDim == DIM_NOT_PART) {
-
265  return true;
-
266  }
-
267 
-
268  return false;
-
269  };
-
270 
-
276  bool isLineInArea(int8_t index) const
-
277  {
-
278  if (index == 0) {
-
279  return aLocLine == Location::INTERIOR;
-
280  }
-
281  return bLocLine == Location::INTERIOR;
-
282  };
-
283 
-
284  bool isHole(uint8_t index) const
-
285  {
-
286  if (index == 0) {
-
287  return aIsHole;
-
288  }
-
289  else {
-
290  return bIsHole;
-
291  }
-
292  };
-
293 
-
294  bool isCollapse(uint8_t index) const
-
295  {
-
296  return dimension(index) == DIM_COLLAPSE;
-
297  };
-
298 
-
299  Location getLineLocation(uint8_t index) const
-
300  {
-
301  if (index == 0) {
-
302  return aLocLine;
-
303  }
-
304  else {
-
305  return bLocLine;
-
306  }
-
307  };
-
308 
-
313  bool isInteriorCollapse() const
-
314  {
-
315  if (aDim == DIM_COLLAPSE && aLocLine == Location::INTERIOR)
-
316  return true;
-
317  if (bDim == DIM_COLLAPSE && bLocLine == Location::INTERIOR)
-
318  return true;
-
319 
-
320  return false;
-
321  };
-
322 
-
327  bool isCollapseAndNotPartInterior() const;
-
328 
-
335  bool isLineInterior(uint8_t index) const
-
336  {
-
337  if (index == 0) {
-
338  return aLocLine == Location::INTERIOR;
-
339  }
-
340  return bLocLine == Location::INTERIOR;
-
341  };
-
342 
-
354  Location getLocationBoundaryOrLine(
-
355  uint8_t index,
-
356  int position,
-
357  bool isForward) const
-
358  {
-
359  if (isBoundary(index)) {
-
360  return getLocation(index, position, isForward);
-
361  }
-
362  return getLineLocation(index);
-
363  };
-
364 
-
371  Location getLocation(uint8_t index) const {
-
372  if (index == 0) {
-
373  return aLocLine;
-
374  }
-
375  return bLocLine;
-
376  };
-
377 
-
378  Location getLocation(uint8_t index, int position, bool isForward) const;
-
379 
-
380  bool hasSides(uint8_t index) const {
-
381  if (index == 0) {
-
382  return aLocLeft != LOC_UNKNOWN
-
383  || aLocRight != LOC_UNKNOWN;
-
384  }
-
385  return bLocLeft != LOC_UNKNOWN
-
386  || bLocRight != LOC_UNKNOWN;
-
387  };
-
388 
-
389  OverlayLabel copy() const
-
390  {
-
391  OverlayLabel lbl = *this;
-
392  return lbl;
-
393  };
-
394 
-
395  friend std::ostream& operator<<(std::ostream& os, const OverlayLabel& ol);
-
396  void toString(bool isForward, std::ostream& os) const;
+
108 public:
+
109 
+
110  static constexpr Location LOC_UNKNOWN = Location::NONE;
+
111 
+
112  enum {
+
113  DIM_UNKNOWN = -1,
+
114  DIM_NOT_PART = -1,
+
115  DIM_LINE = 1,
+
116  DIM_BOUNDARY = 2,
+
117  DIM_COLLAPSE = 3
+
118  };
+
119 
+
120  OverlayLabel()
+
121  : aDim(DIM_NOT_PART)
+
122  , aIsHole(false)
+
123  , aLocLeft(LOC_UNKNOWN)
+
124  , aLocRight(LOC_UNKNOWN)
+
125  , aLocLine(LOC_UNKNOWN)
+
126  , bDim(DIM_NOT_PART)
+
127  , bIsHole(false)
+
128  , bLocLeft(LOC_UNKNOWN)
+
129  , bLocRight(LOC_UNKNOWN)
+
130  , bLocLine(LOC_UNKNOWN) {};
+
131 
+
132  explicit OverlayLabel(uint8_t p_index)
+
133  : OverlayLabel()
+
134  {
+
135  initLine(p_index);
+
136  };
+
137 
+
138  OverlayLabel(uint8_t p_index, Location p_locLeft, Location p_locRight, bool p_isHole)
+
139  : OverlayLabel()
+
140  {
+
141  initBoundary(p_index, p_locLeft, p_locRight, p_isHole);
+
142  };
+
143 
+
144  int dimension(uint8_t index) const { return index == 0 ? aDim : bDim; };
+
145  void initBoundary(uint8_t index, Location locLeft, Location locRight, bool p_isHole);
+
146  void initCollapse(uint8_t index, bool p_isHole);
+
147  void initLine(uint8_t index);
+
148  void initNotPart(uint8_t index);
+
149 
+
159  void setLocationLine(uint8_t index, Location loc);
+
160  void setLocationAll(uint8_t index, Location loc);
+
161  void setLocationCollapse(uint8_t index);
+
162 
+
163  /*
+
164  * Tests whether at least one of the sources is a Line.
+
165  *
+
166  * @return true if at least one source is a line
+
167  */
+
168  bool isLine() const
+
169  {
+
170  return aDim == DIM_LINE || bDim == DIM_LINE;
+
171  };
+
172 
+
173  bool isLine(uint8_t index) const
+
174  {
+
175  return index == 0 ? aDim == DIM_LINE : bDim == DIM_LINE;
+
176  };
+
177 
+
178  bool isLinear(uint8_t index) const
+
179  {
+
180  if (index == 0) {
+
181  return aDim == DIM_LINE || aDim == DIM_COLLAPSE;
+
182  }
+
183  return bDim == DIM_LINE || bDim == DIM_COLLAPSE;
+
184  };
+
185 
+
186  bool isKnown(uint8_t index) const
+
187  {
+
188  if (index == 0) {
+
189  return aDim != DIM_UNKNOWN;
+
190  }
+
191  return bDim != DIM_UNKNOWN;
+
192  };
+
193 
+
194  bool isNotPart(uint8_t index) const
+
195  {
+
196  if (index == 0) {
+
197  return aDim == DIM_NOT_PART;
+
198  }
+
199  return bDim == DIM_NOT_PART;
+
200  };
+
201 
+
202  bool isBoundaryEither() const
+
203  {
+
204  return aDim == DIM_BOUNDARY || bDim == DIM_BOUNDARY;
+
205  };
+
206 
+
207  bool isBoundaryBoth() const
+
208  {
+
209  return aDim == DIM_BOUNDARY && bDim == DIM_BOUNDARY;
+
210  };
+
211 
+
219  bool isBoundaryCollapse() const
+
220  {
+
221  if (isLine()) return false;
+
222  return ! isBoundaryBoth();
+
223  };
+
224 
+
229  bool isBoundaryTouch() const
+
230  {
+
231  return isBoundaryBoth() &&
+
232  getLocation(0, Position::RIGHT, true) != getLocation(1, Position::RIGHT, true);
+
233  };
+
234 
+
235  bool isBoundary(uint8_t index) const
+
236  {
+
237  if (index == 0) {
+
238  return aDim == DIM_BOUNDARY;
+
239  }
+
240  return bDim == DIM_BOUNDARY;
+
241  };
+
242 
+
243  bool isLineLocationUnknown(int index) const
+
244  {
+
245  if (index == 0) {
+
246  return aLocLine == LOC_UNKNOWN;
+
247  }
+
248  else {
+
249  return bLocLine == LOC_UNKNOWN;
+
250  }
+
251  };
+
252 
+
257  bool isBoundarySingleton() const
+
258  {
+
259  if (aDim == DIM_BOUNDARY && bDim == DIM_NOT_PART) {
+
260  return true;
+
261  }
+
262 
+
263  if (bDim == DIM_BOUNDARY && aDim == DIM_NOT_PART) {
+
264  return true;
+
265  }
+
266 
+
267  return false;
+
268  };
+
269 
+
275  bool isLineInArea(int8_t index) const
+
276  {
+
277  if (index == 0) {
+
278  return aLocLine == Location::INTERIOR;
+
279  }
+
280  return bLocLine == Location::INTERIOR;
+
281  };
+
282 
+
283  bool isHole(uint8_t index) const
+
284  {
+
285  if (index == 0) {
+
286  return aIsHole;
+
287  }
+
288  else {
+
289  return bIsHole;
+
290  }
+
291  };
+
292 
+
293  bool isCollapse(uint8_t index) const
+
294  {
+
295  return dimension(index) == DIM_COLLAPSE;
+
296  };
+
297 
+
298  Location getLineLocation(uint8_t index) const
+
299  {
+
300  if (index == 0) {
+
301  return aLocLine;
+
302  }
+
303  else {
+
304  return bLocLine;
+
305  }
+
306  };
+
307 
+
312  bool isInteriorCollapse() const
+
313  {
+
314  if (aDim == DIM_COLLAPSE && aLocLine == Location::INTERIOR)
+
315  return true;
+
316  if (bDim == DIM_COLLAPSE && bLocLine == Location::INTERIOR)
+
317  return true;
+
318 
+
319  return false;
+
320  };
+
321 
+
326  bool isCollapseAndNotPartInterior() const;
+
327 
+
334  bool isLineInterior(uint8_t index) const
+
335  {
+
336  if (index == 0) {
+
337  return aLocLine == Location::INTERIOR;
+
338  }
+
339  return bLocLine == Location::INTERIOR;
+
340  };
+
341 
+
353  Location getLocationBoundaryOrLine(
+
354  uint8_t index,
+
355  int position,
+
356  bool isForward) const
+
357  {
+
358  if (isBoundary(index)) {
+
359  return getLocation(index, position, isForward);
+
360  }
+
361  return getLineLocation(index);
+
362  };
+
363 
+
370  Location getLocation(uint8_t index) const {
+
371  if (index == 0) {
+
372  return aLocLine;
+
373  }
+
374  return bLocLine;
+
375  };
+
376 
+
377  Location getLocation(uint8_t index, int position, bool isForward) const;
+
378 
+
379  bool hasSides(uint8_t index) const {
+
380  if (index == 0) {
+
381  return aLocLeft != LOC_UNKNOWN
+
382  || aLocRight != LOC_UNKNOWN;
+
383  }
+
384  return bLocLeft != LOC_UNKNOWN
+
385  || bLocRight != LOC_UNKNOWN;
+
386  };
+
387 
+
388  OverlayLabel copy() const
+
389  {
+
390  OverlayLabel lbl = *this;
+
391  return lbl;
+
392  };
+
393 
+
394  friend std::ostream& operator<<(std::ostream& os, const OverlayLabel& ol);
+
395  void toString(bool isForward, std::ostream& os) const;
+
396 
397 
-
398 
-
399 };
+
398 };
+
399 
400 
-
401 
-
402 } // namespace geos.operation.overlayng
-
403 } // namespace geos.operation
-
404 } // namespace geos
+
401 } // namespace geos.operation.overlayng
+
402 } // namespace geos.operation
+
403 } // namespace geos
A Position indicates the position of a Location relative to a graph component (Node,...
Definition: Position.h:37
-
@ RIGHT
An indicator that a Location is to the right of a GraphComponent.
Definition: Position.h:56
-
Definition: OverlayLabel.h:89
+
Definition: OverlayLabel.h:86
void setLocationLine(uint8_t index, Location loc)
-
Location getLocation(uint8_t index) const
Definition: OverlayLabel.h:371
-
bool isLineInterior(uint8_t index) const
Definition: OverlayLabel.h:335
-
bool isBoundaryCollapse() const
Definition: OverlayLabel.h:220
-
bool isInteriorCollapse() const
Definition: OverlayLabel.h:313
+
Location getLocation(uint8_t index) const
Definition: OverlayLabel.h:370
+
bool isLineInterior(uint8_t index) const
Definition: OverlayLabel.h:334
+
bool isBoundaryCollapse() const
Definition: OverlayLabel.h:219
+
bool isInteriorCollapse() const
Definition: OverlayLabel.h:312
bool isCollapseAndNotPartInterior() const
-
Location getLocationBoundaryOrLine(uint8_t index, int position, bool isForward) const
Definition: OverlayLabel.h:354
-
bool isBoundaryTouch() const
Definition: OverlayLabel.h:230
-
bool isLineInArea(int8_t index) const
Definition: OverlayLabel.h:276
-
bool isBoundarySingleton() const
Definition: OverlayLabel.h:258
+
Location getLocationBoundaryOrLine(uint8_t index, int position, bool isForward) const
Definition: OverlayLabel.h:353
+
bool isBoundaryTouch() const
Definition: OverlayLabel.h:229
+
bool isLineInArea(int8_t index) const
Definition: OverlayLabel.h:275
+
bool isBoundarySingleton() const
Definition: OverlayLabel.h:257
Location
Constants representing the location of a point relative to a geometry.
Definition: Location.h:32
-
@ NONE
Basic namespace for all GEOS functionalities.
Definition: Angle.h:25
diff --git a/doxygen/OverlayLabeller_8h_source.html b/doxygen/OverlayLabeller_8h_source.html index 6706dfc385..1051fb75d7 100644 --- a/doxygen/OverlayLabeller_8h_source.html +++ b/doxygen/OverlayLabeller_8h_source.html @@ -73,7 +73,7 @@
24 // Forward declarations
25 namespace geos {
26 namespace geom {
-
27 class Coordinate;
+
27 class Coordinate;
28 }
29 namespace operation {
30 namespace overlayng {
@@ -148,7 +148,6 @@
205 } // namespace geos.operation
206 } // namespace geos
207 
-
Coordinate is the lightweight class used to store coordinates.
Definition: Coordinate.h:217
Location
Constants representing the location of a point relative to a geometry.
Definition: Location.h:32
Basic namespace for all GEOS functionalities.
Definition: Angle.h:25
diff --git a/doxygen/OverlayMixedPoints_8h_source.html b/doxygen/OverlayMixedPoints_8h_source.html index a0fcb1d270..3b888aa8bb 100644 --- a/doxygen/OverlayMixedPoints_8h_source.html +++ b/doxygen/OverlayMixedPoints_8h_source.html @@ -95,79 +95,90 @@
46 namespace operation { // geos.operation
47 namespace overlayng { // geos.operation.overlayng
48 
-
49 using namespace geos::geom;
-
50 using algorithm::locate::PointOnGeometryLocator;
-
51 
-
79 class GEOS_DLL OverlayMixedPoints {
-
80 
-
81 private:
-
82 
-
83  // Members
-
84  int opCode;
-
85  const PrecisionModel* pm;
-
86  const Geometry* geomPoint;
-
87  const Geometry* geomNonPointInput;
-
88  const GeometryFactory* geometryFactory;
-
89  bool isPointRHS;
-
90 
-
91  std::unique_ptr<Geometry> geomNonPoint;
-
92  int geomNonPointDim;
-
93  std::unique_ptr<PointOnGeometryLocator> locator;
-
94  int resultDim;
-
95 
-
96  // Methods
-
97  std::unique_ptr<PointOnGeometryLocator> createLocator(const Geometry* geomNonPoint);
-
98 
-
99  std::unique_ptr<Geometry> prepareNonPoint(const Geometry* geomInput);
-
100 
-
101  std::unique_ptr<Geometry> computeIntersection(const CoordinateSequence* coords) const;
+
76 class GEOS_DLL OverlayMixedPoints {
+
77  using GeometryFactory = geos::geom::GeometryFactory;
+
78  using PrecisionModel = geos::geom::PrecisionModel;
+
79  using Geometry = geos::geom::Geometry;
+
80  using Coordinate = geos::geom::Coordinate;
+
81  using CoordinateXY = geos::geom::CoordinateXY;
+
82  using CoordinateSequence = geos::geom::CoordinateSequence;
+
83  using Point = geos::geom::Point;
+
84  using Polygon = geos::geom::Polygon;
+
85  using LineString = geos::geom::LineString;
+
86  using PointOnGeometryLocator = algorithm::locate::PointOnGeometryLocator;
+
87 
+
88 private:
+
89 
+
90  // Members
+
91  int opCode;
+
92  const PrecisionModel* pm;
+
93  const Geometry* geomPoint;
+
94  const Geometry* geomNonPointInput;
+
95  const GeometryFactory* geometryFactory;
+
96  bool isPointRHS;
+
97 
+
98  std::unique_ptr<Geometry> geomNonPoint;
+
99  int geomNonPointDim;
+
100  std::unique_ptr<PointOnGeometryLocator> locator;
+
101  int resultDim;
102 
-
103  std::unique_ptr<Geometry> computeUnion(const CoordinateSequence* coords);
-
104 
-
105  std::unique_ptr<Geometry> computeDifference(const CoordinateSequence* coords);
-
106 
-
107  std::unique_ptr<Geometry> createPointResult(std::vector<std::unique_ptr<Point>>& points) const;
-
108 
-
109  std::vector<std::unique_ptr<Point>> findPoints(bool isCovered, const CoordinateSequence* coords) const;
-
110 
-
111  std::vector<std::unique_ptr<Point>> createPoints(const CoordinateSequence& coords) const;
-
112 
-
113  bool hasLocation(bool isCovered, const CoordinateXY& coord) const;
-
114 
-
115  std::unique_ptr<Geometry> copyNonPoint() const;
-
116 
-
117  std::unique_ptr<CoordinateSequence> extractCoordinates(const Geometry* points, const PrecisionModel* pm) const;
-
118 
-
119  std::vector<std::unique_ptr<Polygon>> extractPolygons(const Geometry* geom) const;
-
120 
-
121  std::vector<std::unique_ptr<LineString>> extractLines(const Geometry* geom) const;
-
122 
+
103  // Methods
+
104  std::unique_ptr<PointOnGeometryLocator> createLocator(const Geometry* geomNonPoint);
+
105 
+
106  std::unique_ptr<Geometry> prepareNonPoint(const Geometry* geomInput);
+
107 
+
108  std::unique_ptr<Geometry> computeIntersection(const CoordinateSequence* coords) const;
+
109 
+
110  std::unique_ptr<Geometry> computeUnion(const CoordinateSequence* coords);
+
111 
+
112  std::unique_ptr<Geometry> computeDifference(const CoordinateSequence* coords);
+
113 
+
114  std::unique_ptr<Geometry> createPointResult(std::vector<std::unique_ptr<Point>>& points) const;
+
115 
+
116  std::vector<std::unique_ptr<Point>> findPoints(bool isCovered, const CoordinateSequence* coords) const;
+
117 
+
118  std::vector<std::unique_ptr<Point>> createPoints(const CoordinateSequence& coords) const;
+
119 
+
120  bool hasLocation(bool isCovered, const CoordinateXY& coord) const;
+
121 
+
122  std::unique_ptr<Geometry> copyNonPoint() const;
123 
-
124 
-
125 public:
-
126 
-
127  OverlayMixedPoints(int p_opCode, const Geometry* geom0, const Geometry* geom1, const PrecisionModel* p_pm);
-
128 
-
129  static std::unique_ptr<Geometry> overlay(int opCode, const Geometry* geom0, const Geometry* geom1, const PrecisionModel* pm);
+
124  std::unique_ptr<CoordinateSequence> extractCoordinates(const Geometry* points, const PrecisionModel* pm) const;
+
125 
+
126  std::vector<std::unique_ptr<Polygon>> extractPolygons(const Geometry* geom) const;
+
127 
+
128  std::vector<std::unique_ptr<LineString>> extractLines(const Geometry* geom) const;
+
129 
130 
-
131  std::unique_ptr<Geometry> getResult();
-
132 
+
131 
+
132 public:
133 
-
134 
+
134  OverlayMixedPoints(int p_opCode, const Geometry* geom0, const Geometry* geom1, const PrecisionModel* p_pm);
135 
-
136 };
+
136  static std::unique_ptr<Geometry> overlay(int opCode, const Geometry* geom0, const Geometry* geom1, const PrecisionModel* pm);
137 
-
138 
-
139 } // namespace geos.operation.overlayng
-
140 } // namespace geos.operation
-
141 } // namespace geos
+
138  std::unique_ptr<Geometry> getResult();
+
139 
+
140 
+
141 
142 
+
143 };
+
144 
+
145 
+
146 } // namespace geos.operation.overlayng
+
147 } // namespace geos.operation
+
148 } // namespace geos
+
149 
+
An interface for classes which determine the Location of points in Polygon or MultiPolygon geometries...
Definition: PointOnGeometryLocator.h:36
The internal representation of a list of coordinates inside a Geometry.
Definition: CoordinateSequence.h:56
+
Coordinate is the lightweight class used to store coordinates.
Definition: Coordinate.h:217
Supplies a set of utility methods for building Geometry objects from CoordinateSequence or other Geom...
Definition: GeometryFactory.h:70
Basic implementation of Geometry, constructed and destructed by GeometryFactory.
Definition: Geometry.h:197
+
Definition: LineString.h:66
+
Definition: Point.h:61
+
Represents a linear polygon, which may include holes.
Definition: Polygon.h:61
Specifies the precision model of the Coordinate in a Geometry.
Definition: PrecisionModel.h:88
-
Definition: OverlayMixedPoints.h:79
-
Definition: Angle.h:26
+
Definition: OverlayMixedPoints.h:76
Basic namespace for all GEOS functionalities.
Definition: Angle.h:25
diff --git a/doxygen/OverlayNGRobust_8h_source.html b/doxygen/OverlayNGRobust_8h_source.html index b3b6e52850..cc51b82322 100644 --- a/doxygen/OverlayNGRobust_8h_source.html +++ b/doxygen/OverlayNGRobust_8h_source.html @@ -86,83 +86,84 @@
37 
38 
64 class GEOS_DLL OverlayNGRobust {
-
65 
-
66 private:
-
67 
+
65  using Geometry = geos::geom::Geometry;
+
66 
+
67 private:
68 
-
69  // Constants
-
70  static constexpr int NUM_SNAP_TRIES = 5;
-
75  static constexpr double SNAP_TOL_FACTOR = 1e12;
-
76 
-
77  static std::unique_ptr<Geometry> overlaySnapping(
-
78  const Geometry* geom0, const Geometry* geom1, int opCode, double snapTol);
-
79 
-
80  static std::unique_ptr<Geometry> overlaySnapBoth(
-
81  const Geometry* geom0, const Geometry* geom1, int opCode, double snapTol);
-
82 
-
83  static std::unique_ptr<Geometry> overlaySnapTol(
-
84  const Geometry* geom0, const Geometry* geom1, int opCode, double snapTol);
-
85 
-
86  static double snapTolerance(const Geometry* geom);
-
87 
-
95  static double ordinateMagnitude(const Geometry* geom);
-
96 
-
104  static std::unique_ptr<Geometry>
-
105  overlaySR(const Geometry* geom0, const Geometry* geom1, int opCode);
-
106 
-
118  static std::unique_ptr<Geometry>
-
119  snapSelf(const Geometry* geom, double snapTol);
-
120 
+
69 
+
70  // Constants
+
71  static constexpr int NUM_SNAP_TRIES = 5;
+
76  static constexpr double SNAP_TOL_FACTOR = 1e12;
+
77 
+
78  static std::unique_ptr<Geometry> overlaySnapping(
+
79  const Geometry* geom0, const Geometry* geom1, int opCode, double snapTol);
+
80 
+
81  static std::unique_ptr<Geometry> overlaySnapBoth(
+
82  const Geometry* geom0, const Geometry* geom1, int opCode, double snapTol);
+
83 
+
84  static std::unique_ptr<Geometry> overlaySnapTol(
+
85  const Geometry* geom0, const Geometry* geom1, int opCode, double snapTol);
+
86 
+
87  static double snapTolerance(const Geometry* geom);
+
88 
+
96  static double ordinateMagnitude(const Geometry* geom);
+
97 
+
105  static std::unique_ptr<Geometry>
+
106  overlaySR(const Geometry* geom0, const Geometry* geom1, int opCode);
+
107 
+
119  static std::unique_ptr<Geometry>
+
120  snapSelf(const Geometry* geom, double snapTol);
121 
-
122 public:
-
123 
-
124  class SRUnionStrategy : public operation::geounion::UnionStrategy {
-
125 
-
126  std::unique_ptr<geom::Geometry> Union(const geom::Geometry* g0, const geom::Geometry* g1) override
-
127  {
-
128  return OverlayNGRobust::Overlay(g0, g1, OverlayNG::UNION);
-
129  };
-
130 
-
131  bool isFloatingPrecision() const override
-
132  {
-
133  return true;
-
134  };
-
135 
-
136  };
-
137 
-
138  static std::unique_ptr<Geometry> Intersection(
-
139  const Geometry* g0, const Geometry* g1);
-
140 
-
141  static std::unique_ptr<Geometry> Union(
-
142  const Geometry* g0, const Geometry* g1);
-
143 
-
144  static std::unique_ptr<Geometry> Difference(
-
145  const Geometry* g0, const Geometry* g1);
-
146 
-
147  static std::unique_ptr<Geometry> SymDifference(
-
148  const Geometry* g0, const Geometry* g1);
-
149 
-
150  static std::unique_ptr<Geometry> Union(
-
151  const Geometry* a);
-
152 
-
153  static std::unique_ptr<Geometry> Overlay(
-
154  const Geometry* geom0, const Geometry* geom1, int opCode);
-
155 
-
156  static std::unique_ptr<Geometry> overlaySnapTries(
-
157  const Geometry* geom0, const Geometry* geom1, int opCode);
-
158 
-
163  static double snapTolerance(const Geometry* geom0, const Geometry* geom1);
-
164 
+
122 
+
123 public:
+
124 
+
125  class SRUnionStrategy : public operation::geounion::UnionStrategy {
+
126 
+
127  std::unique_ptr<geom::Geometry> Union(const geom::Geometry* g0, const geom::Geometry* g1) override
+
128  {
+
129  return OverlayNGRobust::Overlay(g0, g1, OverlayNG::UNION);
+
130  };
+
131 
+
132  bool isFloatingPrecision() const override
+
133  {
+
134  return true;
+
135  };
+
136 
+
137  };
+
138 
+
139  static std::unique_ptr<Geometry> Intersection(
+
140  const Geometry* g0, const Geometry* g1);
+
141 
+
142  static std::unique_ptr<Geometry> Union(
+
143  const Geometry* g0, const Geometry* g1);
+
144 
+
145  static std::unique_ptr<Geometry> Difference(
+
146  const Geometry* g0, const Geometry* g1);
+
147 
+
148  static std::unique_ptr<Geometry> SymDifference(
+
149  const Geometry* g0, const Geometry* g1);
+
150 
+
151  static std::unique_ptr<Geometry> Union(
+
152  const Geometry* a);
+
153 
+
154  static std::unique_ptr<Geometry> Overlay(
+
155  const Geometry* geom0, const Geometry* geom1, int opCode);
+
156 
+
157  static std::unique_ptr<Geometry> overlaySnapTries(
+
158  const Geometry* geom0, const Geometry* geom1, int opCode);
+
159 
+
164  static double snapTolerance(const Geometry* geom0, const Geometry* geom1);
165 
166 
167 
-
168 };
-
169 
+
168 
+
169 };
170 
-
171 } // namespace geos.operation.overlayng
-
172 } // namespace geos.operation
-
173 } // namespace geos
-
174 
+
171 
+
172 } // namespace geos.operation.overlayng
+
173 } // namespace geos.operation
+
174 } // namespace geos
+
175 
Basic implementation of Geometry, constructed and destructed by GeometryFactory.
Definition: Geometry.h:197
Definition: UnionStrategy.h:40
Definition: OverlayNGRobust.h:64
diff --git a/doxygen/OverlayNG_8h_source.html b/doxygen/OverlayNG_8h_source.html index 1e747f33d4..5c9dc267c3 100644 --- a/doxygen/OverlayNG_8h_source.html +++ b/doxygen/OverlayNG_8h_source.html @@ -95,146 +95,150 @@
46 namespace overlayng { // geos.operation.overlayng
47 
120 class GEOS_DLL OverlayNG {
-
121 
-
122 private:
-
123 
-
124  // Members
-
125  const geom::PrecisionModel* pm;
-
126  InputGeometry inputGeom;
-
127  const geom::GeometryFactory* geomFact;
-
128  int opCode;
-
129  noding::Noder* noder;
-
130  bool isStrictMode;
-
131  bool isOptimized;
-
132  bool isAreaResultOnly;
-
133  bool isOutputEdges;
-
134  bool isOutputResultEdges;
-
135  bool isOutputNodedEdges;
-
136 
-
137  // Methods
-
138  std::unique_ptr<geom::Geometry> computeEdgeOverlay();
-
139  void labelGraph(OverlayGraph* graph);
-
140 
-
155  std::unique_ptr<geom::Geometry> extractResult(int opCode, OverlayGraph* graph);
-
156  std::unique_ptr<geom::Geometry> createEmptyResult();
-
157 
-
158 
-
159 
-
160 public:
-
170  static constexpr bool STRICT_MODE_DEFAULT = false;
-
171 
-
172  static constexpr int INTERSECTION = 1;
-
173  static constexpr int UNION = 2;
-
174  static constexpr int DIFFERENCE = 3;
-
175  static constexpr int SYMDIFFERENCE = 4;
-
176 
-
182  OverlayNG(const geom::Geometry* geom0, const geom::Geometry* geom1, const geom::GeometryFactory* p_geomFact, int p_opCode)
-
183  : pm(p_geomFact->getPrecisionModel())
-
184  , inputGeom(geom0, geom1)
-
185  , geomFact(p_geomFact)
-
186  , opCode(p_opCode)
-
187  , noder(nullptr)
-
188  , isStrictMode(STRICT_MODE_DEFAULT)
-
189  , isOptimized(true)
-
190  , isAreaResultOnly(false)
-
191  , isOutputEdges(false)
-
192  , isOutputResultEdges(false)
-
193  , isOutputNodedEdges(false)
-
194  {}
-
195 
-
201  OverlayNG(const geom::Geometry* geom0, const geom::Geometry* geom1, const geom::PrecisionModel* p_pm, int p_opCode)
-
202  : pm(p_pm)
-
203  , inputGeom(geom0, geom1)
-
204  , geomFact(geom0->getFactory())
-
205  , opCode(p_opCode)
-
206  , noder(nullptr)
-
207  , isStrictMode(STRICT_MODE_DEFAULT)
-
208  , isOptimized(true)
-
209  , isAreaResultOnly(false)
-
210  , isOutputEdges(false)
-
211  , isOutputResultEdges(false)
-
212  , isOutputNodedEdges(false)
-
213  {}
-
214 
-
228  OverlayNG(const geom::Geometry* geom0, const geom::Geometry* geom1, int p_opCode)
-
229  : OverlayNG(geom0, geom1, geom0->getFactory()->getPrecisionModel(), p_opCode)
-
230  {}
-
231 
-
232  OverlayNG(const geom::Geometry* geom0, const geom::PrecisionModel* p_pm)
-
233  : OverlayNG(geom0, nullptr, p_pm, UNION)
-
234  {}
-
235 
-
244  void setOptimized(bool p_isOptimized) { isOptimized = p_isOptimized; }
-
245  void setStrictMode(bool p_isStrictMode) { isStrictMode = p_isStrictMode; }
-
246  void setAreaResultOnly(bool p_areaResultOnly) { isAreaResultOnly = p_areaResultOnly; }
-
247  void setOutputEdges(bool p_isOutputEdges) { isOutputEdges = p_isOutputEdges; }
-
248  void setOutputResultEdges(bool p_isOutputResultEdges) { isOutputResultEdges = p_isOutputResultEdges; }
-
249  void setNoder(noding::Noder* p_noder) { noder = p_noder; }
-
250 
-
251  void setOutputNodedEdges(bool p_isOutputNodedEdges)
-
252  {
-
253  isOutputEdges = true;
-
254  isOutputNodedEdges = p_isOutputNodedEdges;
-
255  }
-
256 
-
265  std::unique_ptr<Geometry> getResult();
-
266 
-
275  static bool isResultOfOpPoint(const OverlayLabel* label, int opCode);
-
276 
-
288  static bool isResultOfOp(int overlayOpCode, Location loc0, Location loc1);
-
289 
-
301  static std::unique_ptr<Geometry>
-
302  overlay(const Geometry* geom0, const Geometry* geom1,
-
303  int opCode, const PrecisionModel* pm);
-
304 
-
305 
-
317  static std::unique_ptr<Geometry>
-
318  overlay(const Geometry* geom0, const Geometry* geom1,
-
319  int opCode, const PrecisionModel* pm, noding::Noder* noder);
-
320 
-
321 
-
332  static std::unique_ptr<Geometry>
-
333  overlay(const Geometry* geom0, const Geometry* geom1,
-
334  int opCode, noding::Noder* noder);
-
335 
-
356  static std::unique_ptr<Geometry>
-
357  overlay(const Geometry* geom0, const Geometry* geom1, int opCode);
-
358 
-
359 
-
379  static std::unique_ptr<Geometry>
-
380  geomunion(const Geometry* geom, const PrecisionModel* pm);
-
381 
-
382 
-
399  static std::unique_ptr<Geometry>
-
400  geomunion(const Geometry* geom, const PrecisionModel* pm, noding::Noder* noder);
-
401 
-
402 
-
403 
+
121  using Geometry = geos::geom::Geometry;
+
122  using PrecisionModel = geos::geom::PrecisionModel;
+
123  using Location = geos::geom::Location;
+
124 
+
125 private:
+
126 
+
127  // Members
+
128  const geom::PrecisionModel* pm;
+
129  InputGeometry inputGeom;
+
130  const geom::GeometryFactory* geomFact;
+
131  int opCode;
+
132  noding::Noder* noder;
+
133  bool isStrictMode;
+
134  bool isOptimized;
+
135  bool isAreaResultOnly;
+
136  bool isOutputEdges;
+
137  bool isOutputResultEdges;
+
138  bool isOutputNodedEdges;
+
139 
+
140  // Methods
+
141  std::unique_ptr<geom::Geometry> computeEdgeOverlay();
+
142  void labelGraph(OverlayGraph* graph);
+
143 
+
158  std::unique_ptr<geom::Geometry> extractResult(int opCode, OverlayGraph* graph);
+
159  std::unique_ptr<geom::Geometry> createEmptyResult();
+
160 
+
161 
+
162 
+
163 public:
+
173  static constexpr bool STRICT_MODE_DEFAULT = false;
+
174 
+
175  static constexpr int INTERSECTION = 1;
+
176  static constexpr int UNION = 2;
+
177  static constexpr int DIFFERENCE = 3;
+
178  static constexpr int SYMDIFFERENCE = 4;
+
179 
+
185  OverlayNG(const geom::Geometry* geom0, const geom::Geometry* geom1, const geom::GeometryFactory* p_geomFact, int p_opCode)
+
186  : pm(p_geomFact->getPrecisionModel())
+
187  , inputGeom(geom0, geom1)
+
188  , geomFact(p_geomFact)
+
189  , opCode(p_opCode)
+
190  , noder(nullptr)
+
191  , isStrictMode(STRICT_MODE_DEFAULT)
+
192  , isOptimized(true)
+
193  , isAreaResultOnly(false)
+
194  , isOutputEdges(false)
+
195  , isOutputResultEdges(false)
+
196  , isOutputNodedEdges(false)
+
197  {}
+
198 
+
204  OverlayNG(const geom::Geometry* geom0, const geom::Geometry* geom1, const geom::PrecisionModel* p_pm, int p_opCode)
+
205  : pm(p_pm)
+
206  , inputGeom(geom0, geom1)
+
207  , geomFact(geom0->getFactory())
+
208  , opCode(p_opCode)
+
209  , noder(nullptr)
+
210  , isStrictMode(STRICT_MODE_DEFAULT)
+
211  , isOptimized(true)
+
212  , isAreaResultOnly(false)
+
213  , isOutputEdges(false)
+
214  , isOutputResultEdges(false)
+
215  , isOutputNodedEdges(false)
+
216  {}
+
217 
+
231  OverlayNG(const geom::Geometry* geom0, const geom::Geometry* geom1, int p_opCode)
+
232  : OverlayNG(geom0, geom1, geom0->getFactory()->getPrecisionModel(), p_opCode)
+
233  {}
+
234 
+
235  OverlayNG(const geom::Geometry* geom0, const geom::PrecisionModel* p_pm)
+
236  : OverlayNG(geom0, nullptr, p_pm, UNION)
+
237  {}
+
238 
+
247  void setOptimized(bool p_isOptimized) { isOptimized = p_isOptimized; }
+
248  void setStrictMode(bool p_isStrictMode) { isStrictMode = p_isStrictMode; }
+
249  void setAreaResultOnly(bool p_areaResultOnly) { isAreaResultOnly = p_areaResultOnly; }
+
250  void setOutputEdges(bool p_isOutputEdges) { isOutputEdges = p_isOutputEdges; }
+
251  void setOutputResultEdges(bool p_isOutputResultEdges) { isOutputResultEdges = p_isOutputResultEdges; }
+
252  void setNoder(noding::Noder* p_noder) { noder = p_noder; }
+
253 
+
254  void setOutputNodedEdges(bool p_isOutputNodedEdges)
+
255  {
+
256  isOutputEdges = true;
+
257  isOutputNodedEdges = p_isOutputNodedEdges;
+
258  }
+
259 
+
268  std::unique_ptr<Geometry> getResult();
+
269 
+
278  static bool isResultOfOpPoint(const OverlayLabel* label, int opCode);
+
279 
+
291  static bool isResultOfOp(int overlayOpCode, Location loc0, Location loc1);
+
292 
+
304  static std::unique_ptr<Geometry>
+
305  overlay(const Geometry* geom0, const Geometry* geom1,
+
306  int opCode, const PrecisionModel* pm);
+
307 
+
308 
+
320  static std::unique_ptr<Geometry>
+
321  overlay(const Geometry* geom0, const Geometry* geom1,
+
322  int opCode, const PrecisionModel* pm, noding::Noder* noder);
+
323 
+
324 
+
335  static std::unique_ptr<Geometry>
+
336  overlay(const Geometry* geom0, const Geometry* geom1,
+
337  int opCode, noding::Noder* noder);
+
338 
+
359  static std::unique_ptr<Geometry>
+
360  overlay(const Geometry* geom0, const Geometry* geom1, int opCode);
+
361 
+
362 
+
382  static std::unique_ptr<Geometry>
+
383  geomunion(const Geometry* geom, const PrecisionModel* pm);
+
384 
+
385 
+
402  static std::unique_ptr<Geometry>
+
403  geomunion(const Geometry* geom, const PrecisionModel* pm, noding::Noder* noder);
404 
-
405 };
+
405 
406 
407 
-
408 } // namespace geos.operation.overlayng
-
409 } // namespace geos.operation
-
410 } // namespace geos
+
408 };
+
409 
+
410 
+
411 } // namespace geos.operation.overlayng
+
412 } // namespace geos.operation
+
413 } // namespace geos
Supplies a set of utility methods for building Geometry objects from CoordinateSequence or other Geom...
Definition: GeometryFactory.h:70
Basic implementation of Geometry, constructed and destructed by GeometryFactory.
Definition: Geometry.h:197
Specifies the precision model of the Coordinate in a Geometry.
Definition: PrecisionModel.h:88
Computes all intersections between segments in a set of SegmentString.
Definition: Noder.h:46
-
Definition: OverlayGraph.h:54
-
Definition: OverlayLabel.h:89
+
Definition: InputGeometry.h:41
+
Definition: OverlayGraph.h:52
+
Definition: OverlayLabel.h:86
Definition: OverlayNG.h:120
-
void setOptimized(bool p_isOptimized)
Definition: OverlayNG.h:244
-
OverlayNG(const geom::Geometry *geom0, const geom::Geometry *geom1, const geom::GeometryFactory *p_geomFact, int p_opCode)
Definition: OverlayNG.h:182
+
void setOptimized(bool p_isOptimized)
Definition: OverlayNG.h:247
+
OverlayNG(const geom::Geometry *geom0, const geom::Geometry *geom1, const geom::GeometryFactory *p_geomFact, int p_opCode)
Definition: OverlayNG.h:185
static std::unique_ptr< Geometry > overlay(const Geometry *geom0, const Geometry *geom1, int opCode, noding::Noder *noder)
static std::unique_ptr< Geometry > geomunion(const Geometry *geom, const PrecisionModel *pm)
static std::unique_ptr< Geometry > overlay(const Geometry *geom0, const Geometry *geom1, int opCode, const PrecisionModel *pm)
std::unique_ptr< Geometry > getResult()
static std::unique_ptr< Geometry > overlay(const Geometry *geom0, const Geometry *geom1, int opCode)
-
OverlayNG(const geom::Geometry *geom0, const geom::Geometry *geom1, const geom::PrecisionModel *p_pm, int p_opCode)
Definition: OverlayNG.h:201
+
OverlayNG(const geom::Geometry *geom0, const geom::Geometry *geom1, const geom::PrecisionModel *p_pm, int p_opCode)
Definition: OverlayNG.h:204
static std::unique_ptr< Geometry > overlay(const Geometry *geom0, const Geometry *geom1, int opCode, const PrecisionModel *pm, noding::Noder *noder)
static bool isResultOfOpPoint(const OverlayLabel *label, int opCode)
-
OverlayNG(const geom::Geometry *geom0, const geom::Geometry *geom1, int p_opCode)
Definition: OverlayNG.h:228
+
OverlayNG(const geom::Geometry *geom0, const geom::Geometry *geom1, int p_opCode)
Definition: OverlayNG.h:231
static bool isResultOfOp(int overlayOpCode, Location loc0, Location loc1)
static std::unique_ptr< Geometry > geomunion(const Geometry *geom, const PrecisionModel *pm, noding::Noder *noder)
Location
Constants representing the location of a point relative to a geometry.
Definition: Location.h:32
diff --git a/doxygen/OverlayPoints_8h_source.html b/doxygen/OverlayPoints_8h_source.html index 56a0337225..77291a25bd 100644 --- a/doxygen/OverlayPoints_8h_source.html +++ b/doxygen/OverlayPoints_8h_source.html @@ -86,71 +86,78 @@
37 namespace operation { // geos.operation
38 namespace overlayng { // geos.operation.overlayng
39 
-
40 using namespace geos::geom;
-
41 
-
55 class GEOS_DLL OverlayPoints {
-
56 
-
57 private:
-
58 
-
59  // Members
-
60  int opCode;
-
61  const Geometry* geom0;
-
62  const Geometry* geom1;
-
63  const PrecisionModel* pm;
-
64  const GeometryFactory* geometryFactory;
-
65  std::vector<std::unique_ptr<Point>> resultList;
-
66 
-
67  using PointMap = std::map<CoordinateXY, std::unique_ptr<Point>>;
-
68 
-
69  // Methods
-
70  void
-
71  computeIntersection(PointMap& map0,
-
72  PointMap& map1,
-
73  std::vector<std::unique_ptr<Point>>& resultList);
-
74 
+
53 class GEOS_DLL OverlayPoints {
+
54  using Coordinate = geos::geom::Coordinate;
+
55  using CoordinateXY = geos::geom::CoordinateXY;
+
56  using CoordinateSequence = geos::geom::CoordinateSequence;
+
57  using GeometryFactory = geos::geom::GeometryFactory;
+
58  using Geometry = geos::geom::Geometry;
+
59  using Point = geos::geom::Point;
+
60  using PrecisionModel = geos::geom::PrecisionModel;
+
61 
+
62 private:
+
63 
+
64  // Members
+
65  int opCode;
+
66  const Geometry* geom0;
+
67  const Geometry* geom1;
+
68  const PrecisionModel* pm;
+
69  const GeometryFactory* geometryFactory;
+
70  std::vector<std::unique_ptr<Point>> resultList;
+
71 
+
72  using PointMap = std::map<CoordinateXY, std::unique_ptr<Point>>;
+
73 
+
74  // Methods
75  void
-
76  computeDifference(PointMap& map0,
-
77  PointMap& map1,
-
78  std::vector<std::unique_ptr<Point>>& resultList);
+
76  computeIntersection(PointMap& map0,
+
77  PointMap& map1,
+
78  std::vector<std::unique_ptr<Point>>& resultList);
79 
80  void
-
81  computeUnion(PointMap& map0,
-
82  PointMap& map1,
-
83  std::vector<std::unique_ptr<Point>>& resultList);
+
81  computeDifference(PointMap& map0,
+
82  PointMap& map1,
+
83  std::vector<std::unique_ptr<Point>>& resultList);
84 
-
85  PointMap buildPointMap(const Geometry* geom);
-
86 
-
87 public:
-
88 
-
92  OverlayPoints(int p_opCode, const Geometry* p_geom0, const Geometry* p_geom1, const PrecisionModel* p_pm)
-
93  : opCode(p_opCode)
-
94  , geom0(p_geom0)
-
95  , geom1(p_geom1)
-
96  , pm(p_pm)
-
97  , geometryFactory(p_geom0->getFactory()) {}
-
98 
-
99  OverlayPoints(const OverlayPoints&) = delete;
-
100  OverlayPoints& operator=(const OverlayPoints&) = delete;
-
101 
-
105  static std::unique_ptr<Geometry> overlay(int opCode, const Geometry* geom0, const Geometry* geom1, const PrecisionModel* pm);
+
85  void
+
86  computeUnion(PointMap& map0,
+
87  PointMap& map1,
+
88  std::vector<std::unique_ptr<Point>>& resultList);
+
89 
+
90  PointMap buildPointMap(const Geometry* geom);
+
91 
+
92 public:
+
93 
+
97  OverlayPoints(int p_opCode, const Geometry* p_geom0, const Geometry* p_geom1, const PrecisionModel* p_pm)
+
98  : opCode(p_opCode)
+
99  , geom0(p_geom0)
+
100  , geom1(p_geom1)
+
101  , pm(p_pm)
+
102  , geometryFactory(p_geom0->getFactory()) {}
+
103 
+
104  OverlayPoints(const OverlayPoints&) = delete;
+
105  OverlayPoints& operator=(const OverlayPoints&) = delete;
106 
-
112  std::unique_ptr<Geometry> getResult();
-
113 
-
114 
-
115 };
-
116 
-
117 
-
118 } // namespace geos.operation.overlayng
-
119 } // namespace geos.operation
-
120 } // namespace geos
+
110  static std::unique_ptr<Geometry> overlay(int opCode, const Geometry* geom0, const Geometry* geom1, const PrecisionModel* pm);
+
111 
+
117  std::unique_ptr<Geometry> getResult();
+
118 
+
119 
+
120 };
+
121 
+
122 
+
123 } // namespace geos.operation.overlayng
+
124 } // namespace geos.operation
+
125 } // namespace geos
+
The internal representation of a list of coordinates inside a Geometry.
Definition: CoordinateSequence.h:56
+
Coordinate is the lightweight class used to store coordinates.
Definition: Coordinate.h:217
Supplies a set of utility methods for building Geometry objects from CoordinateSequence or other Geom...
Definition: GeometryFactory.h:70
Basic implementation of Geometry, constructed and destructed by GeometryFactory.
Definition: Geometry.h:197
+
Definition: Point.h:61
Specifies the precision model of the Coordinate in a Geometry.
Definition: PrecisionModel.h:88
-
Definition: OverlayPoints.h:55
+
Definition: OverlayPoints.h:53
static std::unique_ptr< Geometry > overlay(int opCode, const Geometry *geom0, const Geometry *geom1, const PrecisionModel *pm)
std::unique_ptr< Geometry > getResult()
-
OverlayPoints(int p_opCode, const Geometry *p_geom0, const Geometry *p_geom1, const PrecisionModel *p_pm)
Definition: OverlayPoints.h:92
-
Definition: Angle.h:26
+
OverlayPoints(int p_opCode, const Geometry *p_geom0, const Geometry *p_geom1, const PrecisionModel *p_pm)
Definition: OverlayPoints.h:97
Basic namespace for all GEOS functionalities.
Definition: Angle.h:25
diff --git a/doxygen/OverlayUtil_8h_source.html b/doxygen/OverlayUtil_8h_source.html index 159523d347..500e45c659 100644 --- a/doxygen/OverlayUtil_8h_source.html +++ b/doxygen/OverlayUtil_8h_source.html @@ -90,93 +90,103 @@
41 }
42 }
43 
-
44 
-
45 namespace geos { // geos.
-
46 namespace operation { // geos.operation
-
47 namespace overlayng { // geos.operation.overlayng
-
48 
-
49 using namespace geos::geom;
-
50 
-
57 class GEOS_DLL OverlayUtil {
-
58 
-
59 private:
-
60 
-
61  static constexpr double SAFE_ENV_BUFFER_FACTOR = 0.1;
-
62  static constexpr int SAFE_ENV_GRID_FACTOR = 3;
-
63  static constexpr double AREA_HEURISTIC_TOLERANCE = 0.1;
+
44 namespace geos { // geos.
+
45 namespace operation { // geos.operation
+
46 namespace overlayng { // geos.operation.overlayng
+
47 
+
54 class GEOS_DLL OverlayUtil {
+
55  using Geometry = geos::geom::Geometry;
+
56  using Coordinate = geos::geom::Coordinate;
+
57  using CoordinateSequence = geos::geom::CoordinateSequence;
+
58  using Envelope = geos::geom::Envelope;
+
59  using Point = geos::geom::Point;
+
60  using LineString = geos::geom::LineString;
+
61  using Polygon = geos::geom::Polygon;
+
62  using GeometryFactory = geos::geom::GeometryFactory;
+
63  using PrecisionModel = geos::geom::PrecisionModel;
64 
-
76  static bool resultEnvelope(int opCode, const InputGeometry* inputGeom, const PrecisionModel* pm, Envelope& rsltEnvelope);
-
77  static double safeExpandDistance(const Envelope* env, const PrecisionModel* pm);
-
78  static bool safeEnv(const Envelope* env, const PrecisionModel* pm, Envelope& rsltEnvelope);
-
79 
-
80  static bool isEmpty(const Geometry* geom);
-
81 
-
87  static bool isDisjoint(const Envelope* envA, const Envelope* envB, const PrecisionModel* pm);
-
88 
-
89  static bool isLess(double v1, double v2, double tol) {
-
90  return v1 <= v2 * (1 + tol);
-
91  };
-
92 
-
93  static bool isGreater(double v1, double v2, double tol) {
-
94  return v1 >= v2 * (1 - tol);
-
95  }
-
96 
-
97 
-
98 public:
-
99 
-
100  static bool isFloating(const PrecisionModel* pm);
-
101 
-
117  static bool clippingEnvelope(int opCode, const InputGeometry* inputGeom, const PrecisionModel* pm, Envelope& rsltEnvelope);
-
118 
-
125  static bool isEmptyResult(int opCode, const Geometry* a, const Geometry* b, const PrecisionModel* pm);
-
126 
-
132  static bool isEnvDisjoint(const Geometry* a, const Geometry* b, const PrecisionModel* pm);
-
133 
-
141  static std::unique_ptr<Geometry> createEmptyResult(int dim, const GeometryFactory* geomFact);
-
142 
-
156  static int resultDimension(int opCode, int dim0, int dim1);
-
157 
-
161  static std::unique_ptr<Geometry> createResultGeometry(
-
162  std::vector<std::unique_ptr<Polygon>>& resultPolyList,
-
163  std::vector<std::unique_ptr<LineString>>& resultLineList,
-
164  std::vector<std::unique_ptr<Point>>& resultPointList,
-
165  const GeometryFactory* geometryFactory);
-
166 
-
167  static std::unique_ptr<Geometry> toLines(OverlayGraph* graph, bool isOutputEdges, const GeometryFactory* geomFact);
-
168 
-
185  static bool isResultAreaConsistent(
-
186  const Geometry* geom0, const Geometry* geom1,
-
187  int opCode, const Geometry* result);
-
188 
-
193  static bool round(const Point* pt, const PrecisionModel* pm, Coordinate& rsltCoord);
+
65 private:
+
66 
+
67  static constexpr double SAFE_ENV_BUFFER_FACTOR = 0.1;
+
68  static constexpr int SAFE_ENV_GRID_FACTOR = 3;
+
69  static constexpr double AREA_HEURISTIC_TOLERANCE = 0.1;
+
70 
+
82  static bool resultEnvelope(int opCode, const InputGeometry* inputGeom, const PrecisionModel* pm, Envelope& rsltEnvelope);
+
83  static double safeExpandDistance(const Envelope* env, const PrecisionModel* pm);
+
84  static bool safeEnv(const Envelope* env, const PrecisionModel* pm, Envelope& rsltEnvelope);
+
85 
+
86  static bool isEmpty(const Geometry* geom);
+
87 
+
93  static bool isDisjoint(const Envelope* envA, const Envelope* envB, const PrecisionModel* pm);
+
94 
+
95  static bool isLess(double v1, double v2, double tol) {
+
96  return v1 <= v2 * (1 + tol);
+
97  };
+
98 
+
99  static bool isGreater(double v1, double v2, double tol) {
+
100  return v1 >= v2 * (1 - tol);
+
101  }
+
102 
+
103 
+
104 public:
+
105 
+
106  static bool isFloating(const PrecisionModel* pm);
+
107 
+
123  static bool clippingEnvelope(int opCode, const InputGeometry* inputGeom, const PrecisionModel* pm, Envelope& rsltEnvelope);
+
124 
+
131  static bool isEmptyResult(int opCode, const Geometry* a, const Geometry* b, const PrecisionModel* pm);
+
132 
+
138  static bool isEnvDisjoint(const Geometry* a, const Geometry* b, const PrecisionModel* pm);
+
139 
+
147  static std::unique_ptr<Geometry> createEmptyResult(int dim, const GeometryFactory* geomFact);
+
148 
+
162  static int resultDimension(int opCode, int dim0, int dim1);
+
163 
+
167  static std::unique_ptr<Geometry> createResultGeometry(
+
168  std::vector<std::unique_ptr<Polygon>>& resultPolyList,
+
169  std::vector<std::unique_ptr<LineString>>& resultLineList,
+
170  std::vector<std::unique_ptr<Point>>& resultPointList,
+
171  const GeometryFactory* geometryFactory);
+
172 
+
173  static std::unique_ptr<Geometry> toLines(OverlayGraph* graph, bool isOutputEdges, const GeometryFactory* geomFact);
+
174 
+
191  static bool isResultAreaConsistent(
+
192  const Geometry* geom0, const Geometry* geom1,
+
193  int opCode, const Geometry* result);
194 
-
195  template<typename T>
-
196  static void moveGeometry(std::vector<std::unique_ptr<T>>& inGeoms, std::vector<std::unique_ptr<Geometry>>& outGeoms)
-
197  {
-
198  static_assert(std::is_base_of<Geometry, T>::value, "");
-
199  for (auto& geom: inGeoms) {
-
200  Geometry* outGeom = static_cast<Geometry*>(geom.release());
-
201  outGeoms.emplace_back(outGeom);
-
202  }
-
203  return;
-
204  }
-
205 
-
206 
-
207 };
-
208 
-
209 
-
210 } // namespace geos.operation.overlayng
-
211 } // namespace geos.operation
-
212 } // namespace geos
-
213 
+
199  static bool round(const Point* pt, const PrecisionModel* pm, Coordinate& rsltCoord);
+
200 
+
201  template<typename T>
+
202  static void moveGeometry(std::vector<std::unique_ptr<T>>& inGeoms, std::vector<std::unique_ptr<Geometry>>& outGeoms)
+
203  {
+
204  static_assert(std::is_base_of<Geometry, T>::value, "");
+
205  for (auto& geom: inGeoms) {
+
206  Geometry* outGeom = static_cast<Geometry*>(geom.release());
+
207  outGeoms.emplace_back(outGeom);
+
208  }
+
209  return;
+
210  }
+
211 
+
212 
+
213 };
+
214 
+
215 
+
216 } // namespace geos.operation.overlayng
+
217 } // namespace geos.operation
+
218 } // namespace geos
+
219 
+
The internal representation of a list of coordinates inside a Geometry.
Definition: CoordinateSequence.h:56
Coordinate is the lightweight class used to store coordinates.
Definition: Coordinate.h:217
An Envelope defines a rectangulare region of the 2D coordinate plane.
Definition: Envelope.h:59
Supplies a set of utility methods for building Geometry objects from CoordinateSequence or other Geom...
Definition: GeometryFactory.h:70
Basic implementation of Geometry, constructed and destructed by GeometryFactory.
Definition: Geometry.h:197
+
Definition: LineString.h:66
Definition: Point.h:61
+
Represents a linear polygon, which may include holes.
Definition: Polygon.h:61
Specifies the precision model of the Coordinate in a Geometry.
Definition: PrecisionModel.h:88
-
Definition: OverlayGraph.h:54
-
Definition: OverlayUtil.h:57
+
Definition: InputGeometry.h:41
+
Definition: OverlayGraph.h:52
+
Definition: OverlayUtil.h:54
static bool round(const Point *pt, const PrecisionModel *pm, Coordinate &rsltCoord)
static int resultDimension(int opCode, int dim0, int dim1)
static std::unique_ptr< Geometry > createResultGeometry(std::vector< std::unique_ptr< Polygon >> &resultPolyList, std::vector< std::unique_ptr< LineString >> &resultLineList, std::vector< std::unique_ptr< Point >> &resultPointList, const GeometryFactory *geometryFactory)
@@ -185,7 +195,6 @@
static bool isEnvDisjoint(const Geometry *a, const Geometry *b, const PrecisionModel *pm)
static bool isResultAreaConsistent(const Geometry *geom0, const Geometry *geom1, int opCode, const Geometry *result)
static bool clippingEnvelope(int opCode, const InputGeometry *inputGeom, const PrecisionModel *pm, Envelope &rsltEnvelope)
-
Definition: Angle.h:26
Basic namespace for all GEOS functionalities.
Definition: Angle.h:25
diff --git a/doxygen/PolygonEarClipper_8h_source.html b/doxygen/PolygonEarClipper_8h_source.html index 8cfe989aca..bd1de08d1f 100644 --- a/doxygen/PolygonEarClipper_8h_source.html +++ b/doxygen/PolygonEarClipper_8h_source.html @@ -75,107 +75,108 @@
26 // Forward declarations
27 namespace geos {
28 namespace geom {
-
29 class Coordinate;
-
30 class Polygon;
-
31 class Envelope;
+
29 class Coordinate;
+
30 class Polygon;
+
31 class Envelope;
32 }
33 }
34 
-
35 using geos::geom::Coordinate;
-
36 using geos::geom::Polygon;
-
37 using geos::geom::Envelope;
-
38 using geos::triangulate::tri::Tri;
-
39 using geos::triangulate::tri::TriList;
-
40 using geos::index::VertexSequencePackedRtree;
-
41 
-
42 namespace geos {
-
43 namespace triangulate {
-
44 namespace polygon {
-
45 
-
46 
-
67 class GEOS_DLL PolygonEarClipper {
-
68 
-
69 private:
-
70 
-
71  // Members
-
72 
-
73  bool isFlatCornersSkipped = false;
-
74 
-
80  const CoordinateSequence& vertex;
-
81  std::vector<std::size_t> vertexNext;
-
82  std::size_t vertexSize;
-
83 
-
84  // first available vertex index
-
85  std::size_t vertexFirst;
-
86 
-
87  // indices for current corner
-
88  std::array<std::size_t, 3> cornerIndex;
-
89 
-
94  VertexSequencePackedRtree vertexCoordIndex;
-
95 
-
96  // Methods
-
97 
-
98  std::vector<std::size_t> createNextLinks(std::size_t size) const;
-
99 
-
100  bool isValidEar(std::size_t cornerIndex, const std::array<Coordinate, 3>& corner);
-
101 
-
114  std::size_t findIntersectingVertex(std::size_t cornerIndex, const std::array<Coordinate, 3>& corner) const;
-
115 
-
125  bool isValidEarScan(std::size_t cornerIndex, const std::array<Coordinate, 3>& corner) const;
-
126 
-
127  /* private */
-
128  static Envelope envelope(const std::array<Coordinate, 3>& corner);
-
129 
-
133  void removeCorner();
-
134 
-
135  bool isRemoved(std::size_t vertexIndex) const;
-
136 
-
137  void initCornerIndex();
-
138 
-
144  void fetchCorner(std::array<Coordinate, 3>& cornerVertex) const;
-
145 
-
149  void nextCorner(std::array<Coordinate, 3>& cornerVertex);
-
150 
-
158  std::size_t nextIndex(std::size_t index) const;
-
159 
-
160  bool isConvex(const std::array<Coordinate, 3>& pts) const;
-
161 
-
162  bool isFlat(const std::array<Coordinate, 3>& pts) const;
-
163 
-
169  bool isCornerInvalid(const std::array<Coordinate, 3>& pts) const;
-
170 
+
35 namespace geos {
+
36 namespace triangulate {
+
37 namespace polygon {
+
38 
+
39 
+
60 class GEOS_DLL PolygonEarClipper {
+
61  using Coordinate = geos::geom::Coordinate;
+
62  using CoordinateSequence = geos::geom::CoordinateSequence;
+
63  using Polygon = geos::geom::Polygon;
+
64  using Envelope = geos::geom::Envelope;
+
65  using Tri = geos::triangulate::tri::Tri;
+
66  template<typename TriType>
+
67  using TriList = geos::triangulate::tri::TriList<TriType>;
+
68  using VertexSequencePackedRtree = geos::index::VertexSequencePackedRtree;
+
69 
+
70 private:
+
71 
+
72  // Members
+
73 
+
74  bool isFlatCornersSkipped = false;
+
75 
+
81  const CoordinateSequence& vertex;
+
82  std::vector<std::size_t> vertexNext;
+
83  std::size_t vertexSize;
+
84 
+
85  // first available vertex index
+
86  std::size_t vertexFirst;
+
87 
+
88  // indices for current corner
+
89  std::array<std::size_t, 3> cornerIndex;
+
90 
+
95  VertexSequencePackedRtree vertexCoordIndex;
+
96 
+
97  // Methods
+
98 
+
99  std::vector<std::size_t> createNextLinks(std::size_t size) const;
+
100 
+
101  bool isValidEar(std::size_t cornerIndex, const std::array<Coordinate, 3>& corner);
+
102 
+
115  std::size_t findIntersectingVertex(std::size_t cornerIndex, const std::array<Coordinate, 3>& corner) const;
+
116 
+
126  bool isValidEarScan(std::size_t cornerIndex, const std::array<Coordinate, 3>& corner) const;
+
127 
+
128  /* private */
+
129  static Envelope envelope(const std::array<Coordinate, 3>& corner);
+
130 
+
134  void removeCorner();
+
135 
+
136  bool isRemoved(std::size_t vertexIndex) const;
+
137 
+
138  void initCornerIndex();
+
139 
+
145  void fetchCorner(std::array<Coordinate, 3>& cornerVertex) const;
+
146 
+
150  void nextCorner(std::array<Coordinate, 3>& cornerVertex);
+
151 
+
159  std::size_t nextIndex(std::size_t index) const;
+
160 
+
161  bool isConvex(const std::array<Coordinate, 3>& pts) const;
+
162 
+
163  bool isFlat(const std::array<Coordinate, 3>& pts) const;
+
164 
+
170  bool isCornerInvalid(const std::array<Coordinate, 3>& pts) const;
171 
-
172 public:
-
173 
-
179  PolygonEarClipper(const geom::CoordinateSequence& polyShell);
-
180 
-
187  static void triangulate(const geom::CoordinateSequence& polyShell, TriList<Tri>& triListResult);
-
188 
-
205  void setSkipFlatCorners(bool p_isFlatCornersSkipped);
-
206 
-
207  void compute(TriList<Tri>& triList);
-
208 
-
209  std::unique_ptr<Polygon> toGeometry() const;
-
210 
+
172 
+
173 public:
+
174 
+
180  PolygonEarClipper(const geom::CoordinateSequence& polyShell);
+
181 
+
188  static void triangulate(const geom::CoordinateSequence& polyShell, TriList<Tri>& triListResult);
+
189 
+
206  void setSkipFlatCorners(bool p_isFlatCornersSkipped);
+
207 
+
208  void compute(TriList<Tri>& triList);
+
209 
+
210  std::unique_ptr<Polygon> toGeometry() const;
211 
-
212 };
-
213 
+
212 
+
213 };
214 
215 
-
216 } // namespace geos.triangulate.polygon
-
217 } // namespace geos.triangulate
-
218 } // namespace geos
+
216 
+
217 } // namespace geos.triangulate.polygon
+
218 } // namespace geos.triangulate
+
219 } // namespace geos
The internal representation of a list of coordinates inside a Geometry.
Definition: CoordinateSequence.h:56
Coordinate is the lightweight class used to store coordinates.
Definition: Coordinate.h:217
An Envelope defines a rectangulare region of the 2D coordinate plane.
Definition: Envelope.h:59
Represents a linear polygon, which may include holes.
Definition: Polygon.h:61
-
Definition: VertexSequencePackedRtree.h:54
-
Definition: PolygonEarClipper.h:67
+
Definition: VertexSequencePackedRtree.h:49
+
Definition: PolygonEarClipper.h:60
static void triangulate(const geom::CoordinateSequence &polyShell, TriList< Tri > &triListResult)
void setSkipFlatCorners(bool p_isFlatCornersSkipped)
PolygonEarClipper(const geom::CoordinateSequence &polyShell)
-
Definition: TriList.h:54
-
Definition: Tri.h:49
+
Definition: TriList.h:50
+
Definition: Tri.h:45
Basic namespace for all GEOS functionalities.
Definition: Angle.h:25
diff --git a/doxygen/PolygonHoleJoiner_8h_source.html b/doxygen/PolygonHoleJoiner_8h_source.html index 48ec8220a6..c17289de70 100644 --- a/doxygen/PolygonHoleJoiner_8h_source.html +++ b/doxygen/PolygonHoleJoiner_8h_source.html @@ -79,138 +79,136 @@
30 namespace geom {
31 class Envelope;
32 class Geometry;
-
33 class LinearRing;
-
34 class Polygon;
+
33 class LinearRing;
+
34 class Polygon;
35 }
36 namespace noding {
37 }
38 }
39 
-
40 using geos::geom::Coordinate;
-
41 using geos::geom::CoordinateSequence;
-
42 using geos::geom::Polygon;
-
43 using geos::geom::LinearRing;
-
44 using geos::noding::BasicSegmentString;
-
45 using geos::noding::SegmentSetMutualIntersector;
-
46 
-
47 
-
48 namespace geos {
-
49 namespace triangulate {
-
50 namespace polygon {
-
51 
-
52 
-
53 
-
70 class GEOS_DLL PolygonHoleJoiner {
+
40 namespace geos {
+
41 namespace triangulate {
+
42 namespace polygon {
+
43 
+
44 
+
45 
+
62 class GEOS_DLL PolygonHoleJoiner {
+
63  using Coordinate = geos::geom::Coordinate;
+
64  using CoordinateSequence = geos::geom::CoordinateSequence;
+
65  using Polygon = geos::geom::Polygon;
+
66  using LinearRing = geos::geom::LinearRing;
+
67  using BasicSegmentString = geos::noding::BasicSegmentString;
+
68  using SegmentSetMutualIntersector = geos::noding::SegmentSetMutualIntersector;
+
69 
+
70 private:
71 
-
72 private:
+
72  // Members
73 
-
74  // Members
+
74  const Polygon* inputPolygon;
75 
-
76  const Polygon* inputPolygon;
-
77 
-
78  //-- normalized, sorted and noded polygon rings
-
79  std::unique_ptr<CoordinateSequence> shellRing;
-
80  std::vector<std::unique_ptr<CoordinateSequence>> holeRings;
-
81 
-
82  //-- indicates whether a hole should be testing for touching
-
83  std::vector<bool> isHoleTouchingHint;
+
76  //-- normalized, sorted and noded polygon rings
+
77  std::unique_ptr<CoordinateSequence> shellRing;
+
78  std::vector<std::unique_ptr<CoordinateSequence>> holeRings;
+
79 
+
80  //-- indicates whether a hole should be testing for touching
+
81  std::vector<bool> isHoleTouchingHint;
+
82 
+
83  CoordinateSequence joinedRing;
84 
-
85  CoordinateSequence joinedRing;
-
86 
-
87  // a sorted and searchable version of the joinedRing
-
88  std::set<Coordinate> joinedPts;
+
85  // a sorted and searchable version of the joinedRing
+
86  std::set<Coordinate> joinedPts;
+
87 
+
88  std::unique_ptr<SegmentSetMutualIntersector> boundaryIntersector;
89 
-
90  std::unique_ptr<SegmentSetMutualIntersector> boundaryIntersector;
-
91 
-
92  // holding place for some BasicSegmentStrings
-
93  std::vector<std::unique_ptr<BasicSegmentString>> polySegStringStore;
-
94 
-
95 
-
96  // Classes
-
97  class InteriorIntersectionDetector;
-
98  friend class PolygonHoleJoiner::InteriorIntersectionDetector;
-
99 
-
100 
-
101  void extractOrientedRings(const Polygon* polygon);
-
102  static std::unique_ptr<CoordinateSequence> extractOrientedRing(const LinearRing* ring, bool isCW);
-
103  void nodeRings();
-
104  void joinHoles();
+
90  // holding place for some BasicSegmentStrings
+
91  std::vector<std::unique_ptr<BasicSegmentString>> polySegStringStore;
+
92 
+
93 
+
94  // Classes
+
95  class InteriorIntersectionDetector;
+
96  friend class PolygonHoleJoiner::InteriorIntersectionDetector;
+
97 
+
98 
+
99  void extractOrientedRings(const Polygon* polygon);
+
100  static std::unique_ptr<CoordinateSequence> extractOrientedRing(const LinearRing* ring, bool isCW);
+
101  void nodeRings();
+
102  void joinHoles();
+
103 
+
104  void joinHole(std::size_t index, const CoordinateSequence& holeCoords);
105 
-
106  void joinHole(std::size_t index, const CoordinateSequence& holeCoords);
-
107 
-
115  bool joinTouchingHole(const CoordinateSequence& holeCoords);
-
116 
-
126  std::size_t findHoleTouchIndex(const CoordinateSequence& holeCoords);
-
127 
-
133  void joinNonTouchingHole(
-
134  const CoordinateSequence& holeCoords);
-
135 
-
136  const Coordinate& findJoinableVertex(
-
137  const Coordinate& holeJoinCoord);
-
138 
-
149  std::size_t findJoinIndex(
-
150  const Coordinate& joinCoord,
-
151  const Coordinate& holeJoinCoord);
-
152 
-
162  static bool isLineInterior(
-
163  const CoordinateSequence& ring,
-
164  std::size_t ringIndex,
-
165  const Coordinate& linePt);
-
166 
-
167  static std::size_t prev(std::size_t i, std::size_t size);
-
168  static std::size_t next(std::size_t i, std::size_t size);
-
169 
-
182  void addJoinedHole(
-
183  std::size_t joinIndex,
-
184  const CoordinateSequence& holeCoords,
-
185  std::size_t holeJoinIndex);
-
186 
-
197  std::vector<Coordinate> createHoleSection(
-
198  const CoordinateSequence& holeCoords,
-
199  std::size_t holeJoinIndex,
-
200  const Coordinate& joinPt);
-
201 
-
208  static std::vector<const LinearRing*> sortHoles(
-
209  const Polygon* poly);
-
210 
-
211  static std::size_t findLowestLeftVertexIndex(
-
212  const CoordinateSequence& holeCoords);
-
213 
-
222  bool intersectsBoundary(
-
223  const Coordinate& p0,
-
224  const Coordinate& p1);
+
113  bool joinTouchingHole(const CoordinateSequence& holeCoords);
+
114 
+
124  std::size_t findHoleTouchIndex(const CoordinateSequence& holeCoords);
+
125 
+
131  void joinNonTouchingHole(
+
132  const CoordinateSequence& holeCoords);
+
133 
+
134  const Coordinate& findJoinableVertex(
+
135  const Coordinate& holeJoinCoord);
+
136 
+
147  std::size_t findJoinIndex(
+
148  const Coordinate& joinCoord,
+
149  const Coordinate& holeJoinCoord);
+
150 
+
160  static bool isLineInterior(
+
161  const CoordinateSequence& ring,
+
162  std::size_t ringIndex,
+
163  const Coordinate& linePt);
+
164 
+
165  static std::size_t prev(std::size_t i, std::size_t size);
+
166  static std::size_t next(std::size_t i, std::size_t size);
+
167 
+
180  void addJoinedHole(
+
181  std::size_t joinIndex,
+
182  const CoordinateSequence& holeCoords,
+
183  std::size_t holeJoinIndex);
+
184 
+
195  std::vector<Coordinate> createHoleSection(
+
196  const CoordinateSequence& holeCoords,
+
197  std::size_t holeJoinIndex,
+
198  const Coordinate& joinPt);
+
199 
+
206  static std::vector<const LinearRing*> sortHoles(
+
207  const Polygon* poly);
+
208 
+
209  static std::size_t findLowestLeftVertexIndex(
+
210  const CoordinateSequence& holeCoords);
+
211 
+
220  bool intersectsBoundary(
+
221  const Coordinate& p0,
+
222  const Coordinate& p1);
+
223 
+
224  std::unique_ptr<SegmentSetMutualIntersector> createBoundaryIntersector();
225 
-
226  std::unique_ptr<SegmentSetMutualIntersector> createBoundaryIntersector();
-
227 
+
226 
+
227 public:
228 
-
229 public:
-
230 
-
231  PolygonHoleJoiner(const Polygon* p_inputPolygon)
-
232  : inputPolygon(p_inputPolygon)
-
233  , boundaryIntersector(nullptr)
-
234  {};
-
235 
-
243  static std::unique_ptr<Polygon> joinAsPolygon(
-
244  const Polygon* p_inputPolygon);
-
245 
-
253  static std::unique_ptr<CoordinateSequence> join(
-
254  const Polygon* p_inputPolygon);
-
255 
-
261  std::unique_ptr<CoordinateSequence> compute();
+
229  PolygonHoleJoiner(const Polygon* p_inputPolygon)
+
230  : inputPolygon(p_inputPolygon)
+
231  , boundaryIntersector(nullptr)
+
232  {};
+
233 
+
241  static std::unique_ptr<Polygon> joinAsPolygon(
+
242  const Polygon* p_inputPolygon);
+
243 
+
251  static std::unique_ptr<CoordinateSequence> join(
+
252  const Polygon* p_inputPolygon);
+
253 
+
259  std::unique_ptr<CoordinateSequence> compute();
+
260 
+
261 };
262 
-
263 };
-
264 
-
265 
-
266 } // namespace geos.triangulate.polygon
-
267 } // namespace geos.triangulate
-
268 } // namespace geos
+
263 
+
264 } // namespace geos.triangulate.polygon
+
265 } // namespace geos.triangulate
+
266 } // namespace geos
The internal representation of a list of coordinates inside a Geometry.
Definition: CoordinateSequence.h:56
Coordinate is the lightweight class used to store coordinates.
Definition: Coordinate.h:217
Models an OGC SFS LinearRing. A LinearRing is a LineString which is both closed and simple.
Definition: LinearRing.h:54
Represents a linear polygon, which may include holes.
Definition: Polygon.h:61
Represents a list of contiguous line segments, and supports noding the segments.
Definition: BasicSegmentString.h:44
An intersector for the red-blue intersection problem.
Definition: SegmentSetMutualIntersector.h:36
-
Definition: PolygonHoleJoiner.h:70
+
Definition: PolygonHoleJoiner.h:62
static std::unique_ptr< Polygon > joinAsPolygon(const Polygon *p_inputPolygon)
std::unique_ptr< CoordinateSequence > compute()
static std::unique_ptr< CoordinateSequence > join(const Polygon *p_inputPolygon)
diff --git a/doxygen/PolygonHullSimplifier_8h_source.html b/doxygen/PolygonHullSimplifier_8h_source.html index 448c7a7655..823e79955a 100644 --- a/doxygen/PolygonHullSimplifier_8h_source.html +++ b/doxygen/PolygonHullSimplifier_8h_source.html @@ -70,10 +70,10 @@
21 
22 namespace geos {
23 namespace geom {
-
24 class GeometryFactory;
-
25 class LinearRing;
-
26 class MultiPolygon;
-
27 class Polygon;
+
24 class GeometryFactory;
+
25 class LinearRing;
+
26 class MultiPolygon;
+
27 class Polygon;
28 }
29 namespace algorithm {
30 namespace hull {
@@ -82,106 +82,103 @@
33 }
34 }
35 
-
36 
-
37 using geos::geom::Envelope;
-
38 using geos::geom::Geometry;
-
39 using geos::geom::GeometryFactory;
-
40 using geos::geom::LinearRing;
-
41 using geos::geom::MultiPolygon;
-
42 using geos::geom::Polygon;
-
43 
-
44 
-
45 namespace geos {
-
46 namespace simplify { // geos::simplify
-
47 
-
85 class GEOS_DLL PolygonHullSimplifier
-
86 {
-
87 
-
88 public:
-
89 
-
99  PolygonHullSimplifier(const Geometry* geom, bool bOuter)
-
100  : inputGeom(geom)
-
101  , geomFactory(geom->getFactory())
-
102  , isOuter(bOuter)
-
103  , vertexNumFraction(-1.0)
-
104  , areaDeltaRatio(-1.0)
-
105  {
-
106  if (!geom->isPolygonal()) {
-
107  throw util::IllegalArgumentException("Input geometry must be polygonal");
-
108  }
-
109  };
-
110 
-
124  static std::unique_ptr<Geometry> hull(
-
125  const Geometry* geom,
-
126  bool isOuter,
-
127  double vertexNumFraction);
-
128 
-
142  static std::unique_ptr<Geometry> hullByAreaDelta(
-
143  const Geometry* geom,
-
144  bool isOuter,
-
145  double areaDeltaRatio);
-
146 
-
147 
-
155  void setVertexNumFraction(double p_vertexNumFraction);
-
162  void setAreaDeltaRatio(double p_areaDeltaRatio);
-
163 
-
169  std::unique_ptr<Geometry> getResult();
-
170 
+
36 namespace geos {
+
37 namespace simplify { // geos::simplify
+
38 
+
76 class GEOS_DLL PolygonHullSimplifier
+
77 {
+
78  using Envelope = geos::geom::Envelope;
+
79  using Geometry = geos::geom::Geometry;
+
80  using GeometryFactory = geos::geom::GeometryFactory;
+
81  using LinearRing = geos::geom::LinearRing;
+
82  using MultiPolygon = geos::geom::MultiPolygon;
+
83  using Polygon = geos::geom::Polygon;
+
84 
+
85 public:
+
86 
+
96  PolygonHullSimplifier(const Geometry* geom, bool bOuter)
+
97  : inputGeom(geom)
+
98  , geomFactory(geom->getFactory())
+
99  , isOuter(bOuter)
+
100  , vertexNumFraction(-1.0)
+
101  , areaDeltaRatio(-1.0)
+
102  {
+
103  if (!geom->isPolygonal()) {
+
104  throw util::IllegalArgumentException("Input geometry must be polygonal");
+
105  }
+
106  };
+
107 
+
121  static std::unique_ptr<Geometry> hull(
+
122  const Geometry* geom,
+
123  bool isOuter,
+
124  double vertexNumFraction);
+
125 
+
139  static std::unique_ptr<Geometry> hullByAreaDelta(
+
140  const Geometry* geom,
+
141  bool isOuter,
+
142  double areaDeltaRatio);
+
143 
+
144 
+
152  void setVertexNumFraction(double p_vertexNumFraction);
+
159  void setAreaDeltaRatio(double p_areaDeltaRatio);
+
160 
+
166  std::unique_ptr<Geometry> getResult();
+
167 
+
168 
+
169 
+
170 private:
171 
-
172 
-
173 private:
-
174 
-
175  // Members
-
176  const Geometry* inputGeom;
-
177  const GeometryFactory* geomFactory;
-
178  bool isOuter;
-
179  double vertexNumFraction;
-
180  double areaDeltaRatio;
-
181  // Allocate the RingHull* in here so they are cleaned
-
182  // up with PolygonHullSimplifier
-
183  std::vector<std::unique_ptr<RingHull>> ringStore;
-
184 
-
192  std::unique_ptr<Geometry> computeMultiPolygonAll(const MultiPolygon* multiPoly);
-
193  std::unique_ptr<Geometry> computeMultiPolygonEach(const MultiPolygon* multiPoly);
-
194  std::unique_ptr<Polygon> computePolygon(const Polygon* poly);
-
195 
-
204  std::vector<RingHull*> initPolygon(const Polygon* poly,
-
205  RingHullIndex& hullIndex);
-
206 
-
207  double ringArea(const Polygon* poly) const;
-
208 
-
209  RingHull* createRingHull(
-
210  const LinearRing* ring,
-
211  bool isOuter,
-
212  double areaTotal,
-
213  RingHullIndex& hullIndex);
-
214 
-
215  std::unique_ptr<Polygon> polygonHull(
-
216  const Polygon* poly,
-
217  std::vector<RingHull*>& ringHulls,
-
218  RingHullIndex& hullIndex) const;
-
219 
-
224  PolygonHullSimplifier(const PolygonHullSimplifier&) = delete;
-
225  PolygonHullSimplifier& operator=(const PolygonHullSimplifier&) = delete;
+
172  // Members
+
173  const Geometry* inputGeom;
+
174  const GeometryFactory* geomFactory;
+
175  bool isOuter;
+
176  double vertexNumFraction;
+
177  double areaDeltaRatio;
+
178  // Allocate the RingHull* in here so they are cleaned
+
179  // up with PolygonHullSimplifier
+
180  std::vector<std::unique_ptr<RingHull>> ringStore;
+
181 
+
189  std::unique_ptr<Geometry> computeMultiPolygonAll(const MultiPolygon* multiPoly);
+
190  std::unique_ptr<Geometry> computeMultiPolygonEach(const MultiPolygon* multiPoly);
+
191  std::unique_ptr<Polygon> computePolygon(const Polygon* poly);
+
192 
+
201  std::vector<RingHull*> initPolygon(const Polygon* poly,
+
202  RingHullIndex& hullIndex);
+
203 
+
204  double ringArea(const Polygon* poly) const;
+
205 
+
206  RingHull* createRingHull(
+
207  const LinearRing* ring,
+
208  bool isOuter,
+
209  double areaTotal,
+
210  RingHullIndex& hullIndex);
+
211 
+
212  std::unique_ptr<Polygon> polygonHull(
+
213  const Polygon* poly,
+
214  std::vector<RingHull*>& ringHulls,
+
215  RingHullIndex& hullIndex) const;
+
216 
+
221  PolygonHullSimplifier(const PolygonHullSimplifier&) = delete;
+
222  PolygonHullSimplifier& operator=(const PolygonHullSimplifier&) = delete;
+
223 
+
224 }; // PolygonHullSimplifier
+
225 
226 
-
227 }; // PolygonHullSimplifier
-
228 
+
227 } // geos::simplify
+
228 } // geos
229 
-
230 } // geos::simplify
-
231 } // geos
-
232 
An Envelope defines a rectangulare region of the 2D coordinate plane.
Definition: Envelope.h:59
Supplies a set of utility methods for building Geometry objects from CoordinateSequence or other Geom...
Definition: GeometryFactory.h:70
Basic implementation of Geometry, constructed and destructed by GeometryFactory.
Definition: Geometry.h:197
Models an OGC SFS LinearRing. A LinearRing is a LineString which is both closed and simple.
Definition: LinearRing.h:54
Definition: MultiPolygon.h:58
Represents a linear polygon, which may include holes.
Definition: Polygon.h:61
-
Definition: PolygonHullSimplifier.h:86
+
Definition: PolygonHullSimplifier.h:77
static std::unique_ptr< Geometry > hullByAreaDelta(const Geometry *geom, bool isOuter, double areaDeltaRatio)
static std::unique_ptr< Geometry > hull(const Geometry *geom, bool isOuter, double vertexNumFraction)
void setAreaDeltaRatio(double p_areaDeltaRatio)
std::unique_ptr< Geometry > getResult()
-
PolygonHullSimplifier(const Geometry *geom, bool bOuter)
Definition: PolygonHullSimplifier.h:99
+
PolygonHullSimplifier(const Geometry *geom, bool bOuter)
Definition: PolygonHullSimplifier.h:96
void setVertexNumFraction(double p_vertexNumFraction)
Indicates one or more illegal arguments.
Definition: IllegalArgumentException.h:33
Basic namespace for all GEOS functionalities.
Definition: Angle.h:25
diff --git a/doxygen/PolygonIntersectionAnalyzer_8h_source.html b/doxygen/PolygonIntersectionAnalyzer_8h_source.html index 91acb02e35..edf8a472ab 100644 --- a/doxygen/PolygonIntersectionAnalyzer_8h_source.html +++ b/doxygen/PolygonIntersectionAnalyzer_8h_source.html @@ -85,88 +85,87 @@
36 namespace operation { // geos.operation
37 namespace valid { // geos.operation.valid
38 
-
39 using geos::geom::CoordinateXY;
-
40 using geos::noding::SegmentString;
-
41 
-
42 class GEOS_DLL PolygonIntersectionAnalyzer : public noding::SegmentIntersector {
-
43 
-
44 private:
-
45 
-
46  algorithm::LineIntersector li;
-
47  bool m_hasDoubleTouch = false;
-
48  bool isInvertedRingValid = false;
-
49  int invalidCode = TopologyValidationError::oNoInvalidIntersection;
-
50  CoordinateXY invalidLocation;
-
51  CoordinateXY doubleTouchLocation;
-
52 
-
53  int findInvalidIntersection(
-
54  const SegmentString* ss0, std::size_t segIndex0,
-
55  const SegmentString* ss1, std::size_t segIndex1);
-
56 
-
57  bool addDoubleTouch(
-
58  const SegmentString* ss0, const SegmentString* ss1,
-
59  const CoordinateXY& intPt);
-
60 
-
61  void addSelfTouch(
-
62  const SegmentString* ss, const CoordinateXY& intPt,
-
63  const CoordinateXY* e00, const CoordinateXY* e01,
-
64  const CoordinateXY* e10, const CoordinateXY* e11);
-
65 
-
66  const CoordinateXY& prevCoordinateInRing(
-
67  const SegmentString* ringSS, std::size_t segIndex) const;
-
68 
-
69  bool isAdjacentInRing(const SegmentString* ringSS,
-
70  std::size_t segIndex0, std::size_t segIndex1) const;
+
39 class GEOS_DLL PolygonIntersectionAnalyzer : public noding::SegmentIntersector {
+
40  using CoordinateXY = geos::geom::CoordinateXY;
+
41  using SegmentString = geos::noding::SegmentString;
+
42 
+
43 private:
+
44 
+
45  algorithm::LineIntersector li;
+
46  bool m_hasDoubleTouch = false;
+
47  bool isInvertedRingValid = false;
+
48  int invalidCode = TopologyValidationError::oNoInvalidIntersection;
+
49  CoordinateXY invalidLocation;
+
50  CoordinateXY doubleTouchLocation;
+
51 
+
52  int findInvalidIntersection(
+
53  const SegmentString* ss0, std::size_t segIndex0,
+
54  const SegmentString* ss1, std::size_t segIndex1);
+
55 
+
56  bool addDoubleTouch(
+
57  const SegmentString* ss0, const SegmentString* ss1,
+
58  const CoordinateXY& intPt);
+
59 
+
60  void addSelfTouch(
+
61  const SegmentString* ss, const CoordinateXY& intPt,
+
62  const CoordinateXY* e00, const CoordinateXY* e01,
+
63  const CoordinateXY* e10, const CoordinateXY* e11);
+
64 
+
65  const CoordinateXY& prevCoordinateInRing(
+
66  const SegmentString* ringSS, std::size_t segIndex) const;
+
67 
+
68  bool isAdjacentInRing(const SegmentString* ringSS,
+
69  std::size_t segIndex0, std::size_t segIndex1) const;
+
70 
71 
-
72 
-
73 public:
-
74 
-
80  PolygonIntersectionAnalyzer(bool p_isInvertedRingValid)
-
81  : isInvertedRingValid(p_isInvertedRingValid)
-
82  , invalidLocation(CoordinateXY::getNull())
-
83  , doubleTouchLocation(CoordinateXY::getNull())
-
84  {}
-
85 
-
86  void processIntersections(
-
87  SegmentString* ss0, std::size_t segIndex0,
-
88  SegmentString* ss1, std::size_t segIndex1) override;
-
89 
-
90  bool isDone() const override {
-
91  return isInvalid() || m_hasDoubleTouch;
-
92  };
-
93 
-
94  bool isInvalid() const
-
95  {
-
96  return invalidCode >= 0;
-
97  };
-
98 
-
99  int getInvalidCode() const
-
100  {
-
101  return invalidCode;
-
102  };
-
103 
-
104  const CoordinateXY& getInvalidLocation() const
-
105  {
-
106  return invalidLocation;
-
107  };
-
108 
-
109  bool hasDoubleTouch() const
-
110  {
-
111  return m_hasDoubleTouch;
-
112  };
-
113 
-
114  const CoordinateXY& getDoubleTouchLocation() const
-
115  {
-
116  return doubleTouchLocation;
-
117  };
-
118 
-
119 };
+
72 public:
+
73 
+
79  PolygonIntersectionAnalyzer(bool p_isInvertedRingValid)
+
80  : isInvertedRingValid(p_isInvertedRingValid)
+
81  , invalidLocation(CoordinateXY::getNull())
+
82  , doubleTouchLocation(CoordinateXY::getNull())
+
83  {}
+
84 
+
85  void processIntersections(
+
86  SegmentString* ss0, std::size_t segIndex0,
+
87  SegmentString* ss1, std::size_t segIndex1) override;
+
88 
+
89  bool isDone() const override {
+
90  return isInvalid() || m_hasDoubleTouch;
+
91  };
+
92 
+
93  bool isInvalid() const
+
94  {
+
95  return invalidCode >= 0;
+
96  };
+
97 
+
98  int getInvalidCode() const
+
99  {
+
100  return invalidCode;
+
101  };
+
102 
+
103  const CoordinateXY& getInvalidLocation() const
+
104  {
+
105  return invalidLocation;
+
106  };
+
107 
+
108  bool hasDoubleTouch() const
+
109  {
+
110  return m_hasDoubleTouch;
+
111  };
+
112 
+
113  const CoordinateXY& getDoubleTouchLocation() const
+
114  {
+
115  return doubleTouchLocation;
+
116  };
+
117 
+
118 };
+
119 
120 
-
121 
-
122 } // namespace geos.operation.valid
-
123 } // namespace geos.operation
-
124 } // namespace geos
-
125 
+
121 } // namespace geos.operation.valid
+
122 } // namespace geos.operation
+
123 } // namespace geos
+
124 
An interface for classes which represent a sequence of contiguous line segments.
Definition: SegmentString.h:47
Basic namespace for all GEOS functionalities.
Definition: Angle.h:25
diff --git a/doxygen/PolygonNodeConverter_8h_source.html b/doxygen/PolygonNodeConverter_8h_source.html index a969fc5647..69a9cda272 100644 --- a/doxygen/PolygonNodeConverter_8h_source.html +++ b/doxygen/PolygonNodeConverter_8h_source.html @@ -88,45 +88,46 @@
39 namespace relateng { // geos.operation.relateng
40 
66 class GEOS_DLL PolygonNodeConverter {
-
67 
-
68 public:
-
69 
-
78  static std::vector<std::unique_ptr<NodeSection>> convert(
-
79  std::vector<const NodeSection*>& polySections);
-
80 
+
67  using CoordinateXY = geos::geom::CoordinateXY;
+
68 
+
69 public:
+
70 
+
79  static std::vector<std::unique_ptr<NodeSection>> convert(
+
80  std::vector<const NodeSection*>& polySections);
81 
-
82 private:
-
83 
-
84  static std::size_t convertShellAndHoles(
-
85  std::vector<const NodeSection*>& sections,
-
86  std::size_t shellIndex,
-
87  std::vector<std::unique_ptr<NodeSection>>& convertedSections);
-
88 
-
89  static std::vector<std::unique_ptr<NodeSection>> convertHoles(
-
90  std::vector<const NodeSection*>& sections);
-
91 
-
92  static NodeSection* createSection(
-
93  const NodeSection* ns,
-
94  const CoordinateXY* v0,
-
95  const CoordinateXY* v1);
-
96 
-
97  static std::vector<const NodeSection*> extractUnique(
-
98  std::vector<const NodeSection*>& sections);
-
99 
-
100  static std::size_t next(
-
101  std::vector<const NodeSection *>& ns, std::size_t i);
-
102 
-
103  static std::size_t findShell(
-
104  std::vector<const NodeSection *>& polySections);
-
105 
+
82 
+
83 private:
+
84 
+
85  static std::size_t convertShellAndHoles(
+
86  std::vector<const NodeSection*>& sections,
+
87  std::size_t shellIndex,
+
88  std::vector<std::unique_ptr<NodeSection>>& convertedSections);
+
89 
+
90  static std::vector<std::unique_ptr<NodeSection>> convertHoles(
+
91  std::vector<const NodeSection*>& sections);
+
92 
+
93  static NodeSection* createSection(
+
94  const NodeSection* ns,
+
95  const CoordinateXY* v0,
+
96  const CoordinateXY* v1);
+
97 
+
98  static std::vector<const NodeSection*> extractUnique(
+
99  std::vector<const NodeSection*>& sections);
+
100 
+
101  static std::size_t next(
+
102  std::vector<const NodeSection *>& ns, std::size_t i);
+
103 
+
104  static std::size_t findShell(
+
105  std::vector<const NodeSection *>& polySections);
106 
-
107 };
-
108 
-
109 } // namespace geos.operation.relateng
-
110 } // namespace geos.operation
-
111 } // namespace geos
-
112 
-
Definition: NodeSection.h:55
+
107 
+
108 };
+
109 
+
110 } // namespace geos.operation.relateng
+
111 } // namespace geos.operation
+
112 } // namespace geos
+
113 
+
Definition: NodeSection.h:50
Definition: PolygonNodeConverter.h:66
static std::vector< std::unique_ptr< NodeSection > > convert(std::vector< const NodeSection * > &polySections)
Basic namespace for all GEOS functionalities.
Definition: Angle.h:25
diff --git a/doxygen/PolygonNodeTopology_8h_source.html b/doxygen/PolygonNodeTopology_8h_source.html index 89fe346fd9..c55dab291b 100644 --- a/doxygen/PolygonNodeTopology_8h_source.html +++ b/doxygen/PolygonNodeTopology_8h_source.html @@ -74,65 +74,63 @@
25 }
26 }
27 
-
28 using geos::geom::CoordinateXY;
-
29 
+
28 namespace geos {
+
29 namespace algorithm { // geos::algorithm
30 
-
31 namespace geos {
-
32 namespace algorithm { // geos::algorithm
-
33 
-
41 class GEOS_DLL PolygonNodeTopology {
+
38 class GEOS_DLL PolygonNodeTopology {
+
39  using CoordinateXY = geos::geom::CoordinateXY;
+
40 
+
41 public:
42 
-
43 public:
-
44 
-
45  /*
-
46  * Check if the segments at a node between two rings (or one ring) cross.
-
47  * The node is topologically valid if the rings do not cross.
-
48  * This function assumes that the segments are not collinear.
-
49  *
-
50  * @param nodePt the node location
-
51  * @param a0 the previous segment endpoint in a ring
-
52  * @param a1 the next segment endpoint in a ring
-
53  * @param b0 the previous segment endpoint in the other ring
-
54  * @param b1 the next segment endpoint in the other ring
-
55  * @return true if the rings cross at the node
-
56  */
-
57  static bool
-
58  isCrossing(const CoordinateXY* nodePt,
-
59  const CoordinateXY* a0, const CoordinateXY* a1,
-
60  const CoordinateXY* b0, const CoordinateXY* b1);
-
61 
-
62 
-
76  static bool isInteriorSegment(const CoordinateXY* nodePt,
-
77  const CoordinateXY* a0, const CoordinateXY* a1, const CoordinateXY* b);
-
78 
-
89  static int compareAngle(
-
90  const CoordinateXY* origin,
-
91  const CoordinateXY* p,
-
92  const CoordinateXY* q);
-
93 
+
43  /*
+
44  * Check if the segments at a node between two rings (or one ring) cross.
+
45  * The node is topologically valid if the rings do not cross.
+
46  * This function assumes that the segments are not collinear.
+
47  *
+
48  * @param nodePt the node location
+
49  * @param a0 the previous segment endpoint in a ring
+
50  * @param a1 the next segment endpoint in a ring
+
51  * @param b0 the previous segment endpoint in the other ring
+
52  * @param b1 the next segment endpoint in the other ring
+
53  * @return true if the rings cross at the node
+
54  */
+
55  static bool
+
56  isCrossing(const CoordinateXY* nodePt,
+
57  const CoordinateXY* a0, const CoordinateXY* a1,
+
58  const CoordinateXY* b0, const CoordinateXY* b1);
+
59 
+
60 
+
74  static bool isInteriorSegment(const CoordinateXY* nodePt,
+
75  const CoordinateXY* a0, const CoordinateXY* a1, const CoordinateXY* b);
+
76 
+
87  static int compareAngle(
+
88  const CoordinateXY* origin,
+
89  const CoordinateXY* p,
+
90  const CoordinateXY* q);
+
91 
+
92 
+
93 private:
94 
-
95 private:
-
96 
-
109  static bool isBetween(const CoordinateXY* origin,
-
110  const CoordinateXY* p,
-
111  const CoordinateXY* e0, const CoordinateXY* e1);
-
112 
-
126  static int compareBetween(const CoordinateXY* origin, const CoordinateXY* p,
-
127  const CoordinateXY* e0, const CoordinateXY* e1);
-
128 
-
129 
-
139  static bool isAngleGreater(const CoordinateXY* origin, const CoordinateXY* p, const CoordinateXY* q);
+
107  static bool isBetween(const CoordinateXY* origin,
+
108  const CoordinateXY* p,
+
109  const CoordinateXY* e0, const CoordinateXY* e1);
+
110 
+
124  static int compareBetween(const CoordinateXY* origin, const CoordinateXY* p,
+
125  const CoordinateXY* e0, const CoordinateXY* e1);
+
126 
+
127 
+
137  static bool isAngleGreater(const CoordinateXY* origin, const CoordinateXY* p, const CoordinateXY* q);
+
138 
+
139  static int quadrant(const CoordinateXY* origin, const CoordinateXY* p);
140 
-
141  static int quadrant(const CoordinateXY* origin, const CoordinateXY* p);
-
142 
+
141 
+
142 };
143 
-
144 };
-
145 
-
146 
-
147 } // namespace geos::algorithm
-
148 } // namespace geos
-
149 
-
Definition: PolygonNodeTopology.h:41
+
144 
+
145 } // namespace geos::algorithm
+
146 } // namespace geos
+
147 
+
Definition: PolygonNodeTopology.h:38
static int compareAngle(const CoordinateXY *origin, const CoordinateXY *p, const CoordinateXY *q)
static bool isInteriorSegment(const CoordinateXY *nodePt, const CoordinateXY *a0, const CoordinateXY *a1, const CoordinateXY *b)
Basic namespace for all GEOS functionalities.
Definition: Angle.h:25
diff --git a/doxygen/PolygonNoder_8h_source.html b/doxygen/PolygonNoder_8h_source.html index 32a520ff0f..b0fbec9600 100644 --- a/doxygen/PolygonNoder_8h_source.html +++ b/doxygen/PolygonNoder_8h_source.html @@ -68,88 +68,92 @@
19 //#include <geos/geom/CoordinateSequence.h>
20 
21 #include <geos/export.h>
-
22 
-
23 #include <map>
-
24 #include <memory>
-
25 #include <vector>
-
26 
-
27 // Forward declarations
-
28 namespace geos {
-
29 namespace geom {
-
30 class Coordinate;
-
31 class CoordinateSequence;
-
32 }
-
33 namespace noding {
-
34 class NodedSegmentString;
-
35 }
-
36 namespace algorithm {
-
37 class LineIntersector;
-
38 }
+
22 #include <geos/triangulate/tri/Tri.h>
+
23 
+
24 #include <map>
+
25 #include <memory>
+
26 #include <vector>
+
27 
+
28 // Forward declarations
+
29 namespace geos {
+
30 namespace geom {
+
31 class Coordinate;
+
32 class CoordinateSequence;
+
33 }
+
34 namespace noding {
+
35 class NodedSegmentString;
+
36 }
+
37 namespace algorithm {
+
38 class LineIntersector;
39 }
-
40 
-
41 using geos::geom::Coordinate;
-
42 using geos::geom::CoordinateSequence;
-
43 using geos::noding::NodedSegmentString;
-
44 using geos::algorithm::LineIntersector;
+
40 }
+
41 
+
42 namespace geos {
+
43 namespace triangulate {
+
44 namespace polygon {
45 
46 
-
47 namespace geos {
-
48 namespace triangulate {
-
49 namespace polygon {
-
50 
-
51 
-
62 class GEOS_DLL PolygonNoder {
-
63 
-
64 public:
+
57 class GEOS_DLL PolygonNoder {
+
58  using Coordinate = geos::geom::Coordinate;
+
59  using CoordinateSequence = geos::geom::CoordinateSequence;
+
60  using NodedSegmentString = geos::noding::NodedSegmentString;
+
61  using LineIntersector = geos::algorithm::LineIntersector;
+
62  using Tri = geos::triangulate::tri::Tri;
+
63  template<typename TriType>
+
64  using TriList = geos::triangulate::tri::TriList<TriType>;
65 
-
66  PolygonNoder(
-
67  std::unique_ptr<CoordinateSequence>& shellRing,
-
68  std::vector<std::unique_ptr<CoordinateSequence>>& holeRings);
-
69 
-
70  void node();
-
71  bool isShellNoded();
-
72  bool isHoleNoded(std::size_t i);
-
73  std::unique_ptr<CoordinateSequence> getNodedShell();
-
74  std::unique_ptr<CoordinateSequence> getNodedHole(std::size_t i);
-
75  std::vector<bool>& getHolesTouching();
-
76 
-
77 
+
66 public:
+
67 
+
68  PolygonNoder(
+
69  std::unique_ptr<CoordinateSequence>& shellRing,
+
70  std::vector<std::unique_ptr<CoordinateSequence>>& holeRings);
+
71 
+
72  void node();
+
73  bool isShellNoded();
+
74  bool isHoleNoded(std::size_t i);
+
75  std::unique_ptr<CoordinateSequence> getNodedShell();
+
76  std::unique_ptr<CoordinateSequence> getNodedHole(std::size_t i);
+
77  std::vector<bool>& getHolesTouching();
78 
-
79 private:
+
79 
80 
-
81  // Members
-
82  std::vector<bool> isHoleTouching;
-
83  std::map<NodedSegmentString*, std::size_t> nodedRingIndexes;
-
84  std::vector<std::unique_ptr<NodedSegmentString>> nodedRings;
-
85 
-
86  // Classes
-
87  class NodeAdder;
-
88  friend class PolygonNoder::NodeAdder;
-
89 
-
90  // Methods
-
91  NodedSegmentString*
-
92  createNodedSegString(std::unique_ptr<CoordinateSequence>& ringPts, std::size_t i);
-
93 
-
94  void createNodedSegmentStrings(
-
95  std::unique_ptr<CoordinateSequence>& shellRing,
-
96  std::vector<std::unique_ptr<CoordinateSequence>>& holeRings);
-
97 
-
98  /* Turn off copy constructors for MSVC */
-
99  PolygonNoder(const PolygonNoder&) = delete;
-
100  PolygonNoder& operator=(const PolygonNoder&) = delete;
-
101 
-
102 };
+
81 private:
+
82 
+
83  // Members
+
84  std::vector<bool> isHoleTouching;
+
85  std::map<NodedSegmentString*, std::size_t> nodedRingIndexes;
+
86  std::vector<std::unique_ptr<NodedSegmentString>> nodedRings;
+
87 
+
88  // Classes
+
89  class NodeAdder;
+
90  friend class PolygonNoder::NodeAdder;
+
91 
+
92  // Methods
+
93  NodedSegmentString*
+
94  createNodedSegString(std::unique_ptr<CoordinateSequence>& ringPts, std::size_t i);
+
95 
+
96  void createNodedSegmentStrings(
+
97  std::unique_ptr<CoordinateSequence>& shellRing,
+
98  std::vector<std::unique_ptr<CoordinateSequence>>& holeRings);
+
99 
+
100  /* Turn off copy constructors for MSVC */
+
101  PolygonNoder(const PolygonNoder&) = delete;
+
102  PolygonNoder& operator=(const PolygonNoder&) = delete;
103 
-
104 
+
104 };
105 
-
106 } // namespace geos.triangulate.polygon
-
107 } // namespace geos.triangulate
-
108 } // namespace geos
+
106 
+
107 
+
108 } // namespace geos.triangulate.polygon
+
109 } // namespace geos.triangulate
+
110 } // namespace geos
A LineIntersector is an algorithm that can both test whether two line segments intersect and compute ...
Definition: LineIntersector.h:53
The internal representation of a list of coordinates inside a Geometry.
Definition: CoordinateSequence.h:56
Coordinate is the lightweight class used to store coordinates.
Definition: Coordinate.h:217
Represents a list of contiguous line segments, and supports noding the segments.
Definition: NodedSegmentString.h:58
-
Definition: PolygonNoder.h:62
+
Definition: PolygonNoder.h:57
+
Definition: TriList.h:50
+
Definition: Tri.h:45
Basic namespace for all GEOS functionalities.
Definition: Angle.h:25
diff --git a/doxygen/PolygonRingSelfNode_8h_source.html b/doxygen/PolygonRingSelfNode_8h_source.html index c509cb7303..c29b126a61 100644 --- a/doxygen/PolygonRingSelfNode_8h_source.html +++ b/doxygen/PolygonRingSelfNode_8h_source.html @@ -75,46 +75,45 @@
26 namespace operation { // geos.operation
27 namespace valid { // geos.operation.valid
28 
-
29 using geos::geom::CoordinateXY;
-
30 
-
31 class GEOS_DLL PolygonRingSelfNode {
-
32 
-
33 private:
-
34 
-
35  CoordinateXY nodePt;
-
36  const CoordinateXY* e00;
-
37  const CoordinateXY* e01;
-
38  const CoordinateXY* e10;
-
39  const CoordinateXY* e11;
+
29 class GEOS_DLL PolygonRingSelfNode {
+
30  using CoordinateXY = geos::geom::CoordinateXY;
+
31 
+
32 private:
+
33 
+
34  CoordinateXY nodePt;
+
35  const CoordinateXY* e00;
+
36  const CoordinateXY* e01;
+
37  const CoordinateXY* e10;
+
38  const CoordinateXY* e11;
+
39 
40 
-
41 
-
42 public:
-
43 
-
44  PolygonRingSelfNode(
-
45  const CoordinateXY& p_nodePt,
-
46  const CoordinateXY* p_e00,
-
47  const CoordinateXY* p_e01,
-
48  const CoordinateXY* p_e10,
-
49  const CoordinateXY* p_e11)
-
50  : nodePt(p_nodePt)
-
51  , e00(p_e00)
-
52  , e01(p_e01)
-
53  , e10(p_e10)
-
54  , e11(p_e11)
-
55  {}
-
56 
-
62  const CoordinateXY* getCoordinate() const {
-
63  return &nodePt;
-
64  }
-
65 
-
77  bool isExterior(bool isInteriorOnRight) const;
-
78 
-
79 };
-
80 
-
81 } // namespace geos.operation.valid
-
82 } // namespace geos.operation
-
83 } // namespace geos
-
84 
+
41 public:
+
42 
+
43  PolygonRingSelfNode(
+
44  const CoordinateXY& p_nodePt,
+
45  const CoordinateXY* p_e00,
+
46  const CoordinateXY* p_e01,
+
47  const CoordinateXY* p_e10,
+
48  const CoordinateXY* p_e11)
+
49  : nodePt(p_nodePt)
+
50  , e00(p_e00)
+
51  , e01(p_e01)
+
52  , e10(p_e10)
+
53  , e11(p_e11)
+
54  {}
+
55 
+
61  const CoordinateXY* getCoordinate() const {
+
62  return &nodePt;
+
63  }
+
64 
+
76  bool isExterior(bool isInteriorOnRight) const;
+
77 
+
78 };
+
79 
+
80 } // namespace geos.operation.valid
+
81 } // namespace geos.operation
+
82 } // namespace geos
+
83 
Basic namespace for all GEOS functionalities.
Definition: Angle.h:25
diff --git a/doxygen/PolygonRingTouch_8h_source.html b/doxygen/PolygonRingTouch_8h_source.html index f8266049d0..bb402ff359 100644 --- a/doxygen/PolygonRingTouch_8h_source.html +++ b/doxygen/PolygonRingTouch_8h_source.html @@ -83,35 +83,34 @@
34 namespace operation { // geos.operation
35 namespace valid { // geos.operation.valid
36 
-
37 using geos::geom::CoordinateXY;
-
38 
-
39 class GEOS_DLL PolygonRingTouch {
-
40 
-
41 private:
-
42 
-
43  PolygonRing* ring;
-
44  CoordinateXY touchPt;
+
37 class GEOS_DLL PolygonRingTouch {
+
38  using CoordinateXY = geos::geom::CoordinateXY;
+
39 
+
40 private:
+
41 
+
42  PolygonRing* ring;
+
43  CoordinateXY touchPt;
+
44 
45 
-
46 
-
47 public:
-
48 
-
49  PolygonRingTouch(PolygonRing* p_ring, const CoordinateXY& p_pt)
-
50  : ring(p_ring)
-
51  , touchPt(p_pt)
-
52  {};
-
53 
-
54  const CoordinateXY* getCoordinate() const;
-
55 
-
56  PolygonRing* getRing() const;
-
57 
-
58  bool isAtLocation(const CoordinateXY& pt) const;
-
59 
-
60 };
-
61 
-
62 } // namespace geos.operation.valid
-
63 } // namespace geos.operation
-
64 } // namespace geos
-
65 
+
46 public:
+
47 
+
48  PolygonRingTouch(PolygonRing* p_ring, const CoordinateXY& p_pt)
+
49  : ring(p_ring)
+
50  , touchPt(p_pt)
+
51  {};
+
52 
+
53  const CoordinateXY* getCoordinate() const;
+
54 
+
55  PolygonRing* getRing() const;
+
56 
+
57  bool isAtLocation(const CoordinateXY& pt) const;
+
58 
+
59 };
+
60 
+
61 } // namespace geos.operation.valid
+
62 } // namespace geos.operation
+
63 } // namespace geos
+
64 
Basic namespace for all GEOS functionalities.
Definition: Angle.h:25
diff --git a/doxygen/PolygonRing_8h_source.html b/doxygen/PolygonRing_8h_source.html index b837a2242e..27b9eeb9fa 100644 --- a/doxygen/PolygonRing_8h_source.html +++ b/doxygen/PolygonRing_8h_source.html @@ -84,107 +84,105 @@
35 namespace operation { // geos.operation
36 namespace valid { // geos.operation.valid
37 
-
38 using geos::geom::CoordinateXY;
-
39 using geos::geom::LinearRing;
-
40 
+
38 class GEOS_DLL PolygonRing {
+
39  using CoordinateXY = geos::geom::CoordinateXY;
+
40  using LinearRing = geos::geom::LinearRing;
41 
-
42 class GEOS_DLL PolygonRing {
+
42 private:
43 
-
44 private:
-
45 
-
46  int id = -1;
-
47  PolygonRing* shell = nullptr;
-
48  const LinearRing* ring = nullptr;
-
49 
-
54  PolygonRing* touchSetRoot = nullptr;
-
55 
-
68  std::map<int, PolygonRingTouch> touches;
-
69 
-
74  std::vector<PolygonRingSelfNode> selfNodes;
+
44  int id = -1;
+
45  PolygonRing* shell = nullptr;
+
46  const LinearRing* ring = nullptr;
+
47 
+
52  PolygonRing* touchSetRoot = nullptr;
+
53 
+
66  std::map<int, PolygonRingTouch> touches;
+
67 
+
72  std::vector<PolygonRingSelfNode> selfNodes;
+
73 
+
74  /* METHODS */
75 
-
76  /* METHODS */
-
77 
-
86  bool isOnlyTouch(const PolygonRing* polyRing, const CoordinateXY& pt) const;
-
87 
-
96  const CoordinateXY* findHoleCycleLocation();
+
84  bool isOnlyTouch(const PolygonRing* polyRing, const CoordinateXY& pt) const;
+
85 
+
94  const CoordinateXY* findHoleCycleLocation();
+
95 
+
96  void init(PolygonRing* root, std::stack<PolygonRingTouch*>& touchStack);
97 
-
98  void init(PolygonRing* root, std::stack<PolygonRingTouch*>& touchStack);
-
99 
-
108  const CoordinateXY* scanForHoleCycle(PolygonRingTouch* currentTouch,
-
109  PolygonRing* root,
-
110  std::stack<PolygonRingTouch*>& touchStack);
-
111 
-
112 
-
113  bool isInTouchSet() const
-
114  {
-
115  return touchSetRoot != nullptr;
-
116  };
-
117 
-
118  void setTouchSetRoot(PolygonRing* polyRing)
-
119  {
-
120  touchSetRoot = polyRing;
-
121  };
-
122 
-
123  PolygonRing* getTouchSetRoot() const
-
124  {
-
125  return touchSetRoot;
-
126  };
-
127 
-
128  bool hasTouches() const
-
129  {
-
130  return ! touches.empty();
-
131  };
+
106  const CoordinateXY* scanForHoleCycle(PolygonRingTouch* currentTouch,
+
107  PolygonRing* root,
+
108  std::stack<PolygonRingTouch*>& touchStack);
+
109 
+
110 
+
111  bool isInTouchSet() const
+
112  {
+
113  return touchSetRoot != nullptr;
+
114  };
+
115 
+
116  void setTouchSetRoot(PolygonRing* polyRing)
+
117  {
+
118  touchSetRoot = polyRing;
+
119  };
+
120 
+
121  PolygonRing* getTouchSetRoot() const
+
122  {
+
123  return touchSetRoot;
+
124  };
+
125 
+
126  bool hasTouches() const
+
127  {
+
128  return ! touches.empty();
+
129  };
+
130 
+
131  std::vector<PolygonRingTouch*> getTouches() const;
132 
-
133  std::vector<PolygonRingTouch*> getTouches() const;
+
133  void addTouch(PolygonRing* polyRing, const CoordinateXY& pt);
134 
-
135  void addTouch(PolygonRing* polyRing, const CoordinateXY& pt);
-
136 
+
135 
+
136 public:
137 
-
138 public:
-
139 
-
146  PolygonRing(const LinearRing* p_ring, int p_index, PolygonRing* p_shell)
-
147  : id(p_index)
-
148  , shell(p_shell)
-
149  , ring(p_ring)
-
150  {};
-
151 
-
156  PolygonRing(const LinearRing* p_ring)
-
157  : PolygonRing(p_ring, -1, this)
-
158  {};
-
159 
-
166  static bool isShell(const PolygonRing* polyRing);
-
167 
-
177  static bool addTouch(PolygonRing* ring0, PolygonRing* ring1, const CoordinateXY& pt);
-
178 
-
188  static const CoordinateXY* findHoleCycleLocation(std::vector<PolygonRing*> polyRings);
-
189 
-
199  static const CoordinateXY* findInteriorSelfNode(std::vector<PolygonRing*> polyRings);
-
200 
-
201  bool isSamePolygon(const PolygonRing* polyRing) const
-
202  {
-
203  return shell == polyRing->shell;
-
204  };
-
205 
-
206  bool isShell() const
-
207  {
-
208  return shell == this;
-
209  };
-
210 
-
211  void addSelfTouch(const CoordinateXY& origin,
-
212  const CoordinateXY* e00, const CoordinateXY* e01,
-
213  const CoordinateXY* e10, const CoordinateXY* e11);
-
214 
-
221  const CoordinateXY* findInteriorSelfNode();
-
222 
+
144  PolygonRing(const LinearRing* p_ring, int p_index, PolygonRing* p_shell)
+
145  : id(p_index)
+
146  , shell(p_shell)
+
147  , ring(p_ring)
+
148  {};
+
149 
+
154  PolygonRing(const LinearRing* p_ring)
+
155  : PolygonRing(p_ring, -1, this)
+
156  {};
+
157 
+
164  static bool isShell(const PolygonRing* polyRing);
+
165 
+
175  static bool addTouch(PolygonRing* ring0, PolygonRing* ring1, const CoordinateXY& pt);
+
176 
+
186  static const CoordinateXY* findHoleCycleLocation(std::vector<PolygonRing*> polyRings);
+
187 
+
197  static const CoordinateXY* findInteriorSelfNode(std::vector<PolygonRing*> polyRings);
+
198 
+
199  bool isSamePolygon(const PolygonRing* polyRing) const
+
200  {
+
201  return shell == polyRing->shell;
+
202  };
+
203 
+
204  bool isShell() const
+
205  {
+
206  return shell == this;
+
207  };
+
208 
+
209  void addSelfTouch(const CoordinateXY& origin,
+
210  const CoordinateXY* e00, const CoordinateXY* e01,
+
211  const CoordinateXY* e10, const CoordinateXY* e11);
+
212 
+
219  const CoordinateXY* findInteriorSelfNode();
+
220 
+
221 
+
222 };
223 
-
224 };
+
224 
225 
-
226 
-
227 
-
228 } // namespace geos.operation.valid
-
229 } // namespace geos.operation
-
230 } // namespace geos
-
231 
+
226 } // namespace geos.operation.valid
+
227 } // namespace geos.operation
+
228 } // namespace geos
+
229 
Models an OGC SFS LinearRing. A LinearRing is a LineString which is both closed and simple.
Definition: LinearRing.h:54
Basic namespace for all GEOS functionalities.
Definition: Angle.h:25
diff --git a/doxygen/PolygonTopologyAnalyzer_8h_source.html b/doxygen/PolygonTopologyAnalyzer_8h_source.html index 2909c0f622..0f7f2322ae 100644 --- a/doxygen/PolygonTopologyAnalyzer_8h_source.html +++ b/doxygen/PolygonTopologyAnalyzer_8h_source.html @@ -84,12 +84,12 @@
35 namespace operation { // geos.operation
36 namespace valid { // geos.operation.valid
37 
-
38 using geos::geom::CoordinateXY;
-
39 using geos::geom::CoordinateSequence;
-
40 using geos::geom::Geometry;
-
41 using geos::geom::LinearRing;
-
42 
-
43 class GEOS_DLL PolygonTopologyAnalyzer {
+
38 class GEOS_DLL PolygonTopologyAnalyzer {
+
39  using CoordinateXY = geos::geom::CoordinateXY;
+
40  using CoordinateSequence = geos::geom::CoordinateSequence;
+
41  using Geometry = geos::geom::Geometry;
+
42  using LinearRing = geos::geom::LinearRing;
+
43  using SegmentString = geos::noding::SegmentString;
44 
45 private:
46 
@@ -185,6 +185,7 @@
The internal representation of a list of coordinates inside a Geometry.
Definition: CoordinateSequence.h:56
Basic implementation of Geometry, constructed and destructed by GeometryFactory.
Definition: Geometry.h:197
Models an OGC SFS LinearRing. A LinearRing is a LineString which is both closed and simple.
Definition: LinearRing.h:54
+
An interface for classes which represent a sequence of contiguous line segments.
Definition: SegmentString.h:47
Basic namespace for all GEOS functionalities.
Definition: Angle.h:25
diff --git a/doxygen/PolygonTriangulator_8h_source.html b/doxygen/PolygonTriangulator_8h_source.html index e840c3397c..3ca1887f25 100644 --- a/doxygen/PolygonTriangulator_8h_source.html +++ b/doxygen/PolygonTriangulator_8h_source.html @@ -69,63 +69,62 @@
20 // Forward declarations
21 namespace geos {
22 namespace geom {
-
23 class Geometry;
-
24 class GeometryFactory;
-
25 class Polygon;
+
23 class Geometry;
+
24 class GeometryFactory;
+
25 class Polygon;
26 }
27 }
28 
-
29 using geos::geom::Geometry;
-
30 using geos::geom::GeometryFactory;
-
31 using geos::geom::Polygon;
-
32 using geos::triangulate::tri::TriList;
-
33 using geos::triangulate::tri::Tri;
-
34 
-
35 
-
36 namespace geos {
-
37 namespace triangulate {
-
38 namespace polygon {
-
39 
-
40 
-
59 class GEOS_DLL PolygonTriangulator {
-
60 
-
61 private:
-
62 
-
63  // Members
-
64 
-
65  const Geometry* inputGeom;
-
66  const GeometryFactory* geomFact;
-
67 
-
68  std::unique_ptr<Geometry> compute();
-
69 
-
75  void triangulatePolygon(const Polygon* poly, TriList<Tri>& triList);
+
29 namespace geos {
+
30 namespace triangulate {
+
31 namespace polygon {
+
32 
+
33 
+
52 class GEOS_DLL PolygonTriangulator {
+
53  using Geometry = geos::geom::Geometry;
+
54  using GeometryFactory = geos::geom::GeometryFactory;
+
55  using Polygon = geos::geom::Polygon;
+
56  template<typename TriType>
+
57  using TriList = geos::triangulate::tri::TriList<TriType>;
+
58  using Tri = geos::triangulate::tri::Tri;
+
59 
+
60 private:
+
61 
+
62  // Members
+
63 
+
64  const Geometry* inputGeom;
+
65  const GeometryFactory* geomFact;
+
66 
+
67  std::unique_ptr<Geometry> compute();
+
68 
+
74  void triangulatePolygon(const Polygon* poly, TriList<Tri>& triList);
+
75 
76 
-
77 
-
78 public:
-
79 
-
85  PolygonTriangulator(const Geometry* p_inputGeom)
-
86  : inputGeom(p_inputGeom)
-
87  , geomFact(p_inputGeom->getFactory())
-
88  {}
-
89 
-
96  static std::unique_ptr<Geometry> triangulate(const Geometry* geom);
-
97 
-
98 };
+
77 public:
+
78 
+
84  PolygonTriangulator(const Geometry* p_inputGeom)
+
85  : inputGeom(p_inputGeom)
+
86  , geomFact(p_inputGeom->getFactory())
+
87  {}
+
88 
+
95  static std::unique_ptr<Geometry> triangulate(const Geometry* geom);
+
96 
+
97 };
+
98 
99 
100 
-
101 
-
102 } // namespace geos.triangulate.polygon
-
103 } // namespace geos.triangulate
-
104 } // namespace geos
-
105 
+
101 } // namespace geos.triangulate.polygon
+
102 } // namespace geos.triangulate
+
103 } // namespace geos
+
104 
Supplies a set of utility methods for building Geometry objects from CoordinateSequence or other Geom...
Definition: GeometryFactory.h:70
Basic implementation of Geometry, constructed and destructed by GeometryFactory.
Definition: Geometry.h:197
Represents a linear polygon, which may include holes.
Definition: Polygon.h:61
-
Definition: PolygonTriangulator.h:59
+
Definition: PolygonTriangulator.h:52
static std::unique_ptr< Geometry > triangulate(const Geometry *geom)
-
PolygonTriangulator(const Geometry *p_inputGeom)
Definition: PolygonTriangulator.h:85
-
Definition: TriList.h:54
-
Definition: Tri.h:49
+
PolygonTriangulator(const Geometry *p_inputGeom)
Definition: PolygonTriangulator.h:84
+
Definition: TriList.h:50
+
Definition: Tri.h:45
Basic namespace for all GEOS functionalities.
Definition: Angle.h:25
diff --git a/doxygen/PrecisionReducer_8h_source.html b/doxygen/PrecisionReducer_8h_source.html index 380f229f0f..aade4c5603 100644 --- a/doxygen/PrecisionReducer_8h_source.html +++ b/doxygen/PrecisionReducer_8h_source.html @@ -84,9 +84,9 @@
35 namespace operation { // geos.operation
36 namespace overlayng { // geos.operation.overlayng
37 
-
38 using namespace geos::geom;
-
39 
-
52 class GEOS_DLL PrecisionReducer {
+
50 class GEOS_DLL PrecisionReducer {
+
51  using PrecisionModel = geos::geom::PrecisionModel;
+
52  using Geometry = geos::geom::Geometry;
53 
54 private:
55 
@@ -112,8 +112,7 @@
75 
Basic implementation of Geometry, constructed and destructed by GeometryFactory.
Definition: Geometry.h:197
Specifies the precision model of the Coordinate in a Geometry.
Definition: PrecisionModel.h:88
-
Definition: PrecisionReducer.h:52
-
Definition: Angle.h:26
+
Definition: PrecisionReducer.h:50
Basic namespace for all GEOS functionalities.
Definition: Angle.h:25
diff --git a/doxygen/PrecisionUtil_8h_source.html b/doxygen/PrecisionUtil_8h_source.html index f0442f8044..16e368e625 100644 --- a/doxygen/PrecisionUtil_8h_source.html +++ b/doxygen/PrecisionUtil_8h_source.html @@ -87,93 +87,95 @@
38 namespace operation { // geos.operation
39 namespace overlayng { // geos.operation.overlayng
40 
-
41 using namespace geos::geom;
-
42 
-
49 class GEOS_DLL PrecisionUtil {
-
50 
-
51 private:
+
47 class GEOS_DLL PrecisionUtil {
+
48  using Geometry = geos::geom::Geometry;
+
49  using Envelope = geos::geom::Envelope;
+
50  using PrecisionModel = geos::geom::PrecisionModel;
+
51  using CoordinateFilter = geos::geom::CoordinateFilter;
52 
-
53  static double robustScale(double inherentScale, double safeScale);
+
53 private:
54 
-
62  static double maxBoundMagnitude(const Envelope* env);
-
63 
-
78  static double precisionScale(double value, int precisionDigits);
-
79 
-
80 
+
55  static double robustScale(double inherentScale, double safeScale);
+
56 
+
64  static double maxBoundMagnitude(const Envelope* env);
+
65 
+
80  static double precisionScale(double value, int precisionDigits);
81 
-
82 public:
+
82 
83 
-
84  static constexpr int MAX_ROBUST_DP_DIGITS = 14;
+
84 public:
85 
-
86  PrecisionUtil() {};
+
86  static constexpr int MAX_ROBUST_DP_DIGITS = 14;
87 
-
99  static PrecisionModel robustPM(const Geometry* a, const Geometry* b);
-
100 
-
112  static PrecisionModel robustPM(const Geometry* a);
-
113 
-
121  static double robustScale(const Geometry* a, const Geometry* b);
-
122 
-
130  static double robustScale(const Geometry* a);
-
131 
-
138  static double safeScale(double value);
-
139 
-
146  static double safeScale(const Geometry* geom);
-
147 
-
154  static double safeScale(const Geometry* a, const Geometry* b);
-
155 
-
167  static double inherentScale(double value);
-
168 
-
179  static double inherentScale(const Geometry* geom);
-
180 
-
191  static double inherentScale(const Geometry* a, const Geometry* b);
-
192 
-
202  static int numberOfDecimals(double value);
-
203 
-
208  class GEOS_DLL InherentScaleFilter: public CoordinateFilter {
-
209 
-
210  private:
+
88  PrecisionUtil() {};
+
89 
+
101  static PrecisionModel robustPM(const Geometry* a, const Geometry* b);
+
102 
+
114  static PrecisionModel robustPM(const Geometry* a);
+
115 
+
123  static double robustScale(const Geometry* a, const Geometry* b);
+
124 
+
132  static double robustScale(const Geometry* a);
+
133 
+
140  static double safeScale(double value);
+
141 
+
148  static double safeScale(const Geometry* geom);
+
149 
+
156  static double safeScale(const Geometry* a, const Geometry* b);
+
157 
+
169  static double inherentScale(double value);
+
170 
+
181  static double inherentScale(const Geometry* geom);
+
182 
+
193  static double inherentScale(const Geometry* a, const Geometry* b);
+
194 
+
204  static int numberOfDecimals(double value);
+
205 
+
210  class GEOS_DLL InherentScaleFilter: public CoordinateFilter {
211 
-
212  double scale;
+
212  private:
213 
-
214  void updateScaleMax(double value) {
-
215  double scaleVal = PrecisionUtil::inherentScale(value);
-
216  if (scaleVal > scale) {
-
217  scale = scaleVal;
-
218  }
-
219  }
-
220 
-
221  public:
+
214  double scale;
+
215 
+
216  void updateScaleMax(double value) {
+
217  double scaleVal = PrecisionUtil::inherentScale(value);
+
218  if (scaleVal > scale) {
+
219  scale = scaleVal;
+
220  }
+
221  }
222 
-
223  InherentScaleFilter()
-
224  : scale(0.0)
-
225  {}
-
226 
-
227  void filter_ro(const geom::Coordinate* coord) override
-
228  {
-
229  updateScaleMax(coord->x);
-
230  updateScaleMax(coord->y);
-
231  }
-
232 
-
233  double getScale() const {
-
234  return scale;
-
235  }
-
236  };
-
237 
-
238 
-
239 };
+
223  public:
+
224 
+
225  InherentScaleFilter()
+
226  : scale(0.0)
+
227  {}
+
228 
+
229  void filter_ro(const geom::Coordinate* coord) override
+
230  {
+
231  updateScaleMax(coord->x);
+
232  updateScaleMax(coord->y);
+
233  }
+
234 
+
235  double getScale() const {
+
236  return scale;
+
237  }
+
238  };
+
239 
240 
-
241 
-
242 } // namespace geos.operation.overlayng
-
243 } // namespace geos.operation
-
244 } // namespace geos
-
245 
+
241 };
+
242 
+
243 
+
244 } // namespace geos.operation.overlayng
+
245 } // namespace geos.operation
+
246 } // namespace geos
+
247 
Geometry classes support the concept of applying a coordinate filter to every coordinate in the Geome...
Definition: CoordinateFilter.h:43
Coordinate is the lightweight class used to store coordinates.
Definition: Coordinate.h:217
An Envelope defines a rectangulare region of the 2D coordinate plane.
Definition: Envelope.h:59
Basic implementation of Geometry, constructed and destructed by GeometryFactory.
Definition: Geometry.h:197
Specifies the precision model of the Coordinate in a Geometry.
Definition: PrecisionModel.h:88
-
Definition: PrecisionUtil.h:208
-
Definition: PrecisionUtil.h:49
+
Definition: PrecisionUtil.h:210
+
Definition: PrecisionUtil.h:47
static double inherentScale(const Geometry *geom)
static double robustScale(const Geometry *a, const Geometry *b)
static PrecisionModel robustPM(const Geometry *a, const Geometry *b)
@@ -185,7 +187,6 @@
static double safeScale(double value)
static double inherentScale(const Geometry *a, const Geometry *b)
static double safeScale(const Geometry *geom)
-
Definition: Angle.h:26
Basic namespace for all GEOS functionalities.
Definition: Angle.h:25
diff --git a/doxygen/PreparedLineStringNearestPoints_8h_source.html b/doxygen/PreparedLineStringNearestPoints_8h_source.html index e901d8102b..ab0da8ba88 100644 --- a/doxygen/PreparedLineStringNearestPoints_8h_source.html +++ b/doxygen/PreparedLineStringNearestPoints_8h_source.html @@ -75,7 +75,7 @@
26 namespace geos {
27 namespace geom { // geos::geom
28 
-
29 class CoordinateSequence;
+
29 class CoordinateSequence;
30 
31 namespace prep { // geos::geom::prep
32 
@@ -108,7 +108,6 @@
59 } // namespace geos::geom
60 } // namespace geos
61 
-
The internal representation of a list of coordinates inside a Geometry.
Definition: CoordinateSequence.h:56
Basic namespace for all GEOS functionalities.
Definition: Angle.h:25
diff --git a/doxygen/PreparedLineString_8h_source.html b/doxygen/PreparedLineString_8h_source.html index 7828e3849c..f6b2e06acd 100644 --- a/doxygen/PreparedLineString_8h_source.html +++ b/doxygen/PreparedLineString_8h_source.html @@ -111,7 +111,7 @@
69 } // namespace geos
70 
Basic implementation of Geometry, constructed and destructed by GeometryFactory.
Definition: Geometry.h:197
-
A base class for PreparedGeometry subclasses.
Definition: BasicPreparedGeometry.h:58
+
A base class for PreparedGeometry subclasses.
Definition: BasicPreparedGeometry.h:56
A prepared version of LinearRing, LineString or MultiLineString geometries.
Definition: PreparedLineString.h:41
std::unique_ptr< geom::CoordinateSequence > nearestPoints(const geom::Geometry *g) const override
bool intersects(const geom::Geometry *g) const override
diff --git a/doxygen/PreparedPoint_8h_source.html b/doxygen/PreparedPoint_8h_source.html index 0f462aeafc..a4015e1ede 100644 --- a/doxygen/PreparedPoint_8h_source.html +++ b/doxygen/PreparedPoint_8h_source.html @@ -91,7 +91,7 @@
55 } // namespace geos
56 
Basic implementation of Geometry, constructed and destructed by GeometryFactory.
Definition: Geometry.h:197
-
A base class for PreparedGeometry subclasses.
Definition: BasicPreparedGeometry.h:58
+
A base class for PreparedGeometry subclasses.
Definition: BasicPreparedGeometry.h:56
A prepared version of Point or MultiPoint geometries.
Definition: PreparedPoint.h:35
bool intersects(const geom::Geometry *g) const override
Basic namespace for all GEOS functionalities.
Definition: Angle.h:25
diff --git a/doxygen/PreparedPolygon_8h_source.html b/doxygen/PreparedPolygon_8h_source.html index ffc8098bf2..8829280dfc 100644 --- a/doxygen/PreparedPolygon_8h_source.html +++ b/doxygen/PreparedPolygon_8h_source.html @@ -81,7 +81,7 @@
32 }
33 namespace algorithm {
34 namespace locate {
-
35 class PointOnGeometryLocator;
+
35 class PointOnGeometryLocator;
36 }
37 }
38 }
@@ -123,7 +123,7 @@
81 
An interface for classes which determine the Location of points in Polygon or MultiPolygon geometries...
Definition: PointOnGeometryLocator.h:36
Basic implementation of Geometry, constructed and destructed by GeometryFactory.
Definition: Geometry.h:197
-
A base class for PreparedGeometry subclasses.
Definition: BasicPreparedGeometry.h:58
+
A base class for PreparedGeometry subclasses.
Definition: BasicPreparedGeometry.h:56
A prepared version of Polygon or MultiPolygon geometries.
Definition: PreparedPolygon.h:51
double distance(const geom::Geometry *g) const override
bool intersects(const geom::Geometry *g) const override
diff --git a/doxygen/RelateEdge_8h_source.html b/doxygen/RelateEdge_8h_source.html index c5b15ee91f..c76de6d508 100644 --- a/doxygen/RelateEdge_8h_source.html +++ b/doxygen/RelateEdge_8h_source.html @@ -79,140 +79,136 @@
30 }
31 namespace geom {
32  class CoordinateXY;
-
33  class Geometry;
+
33  class Geometry;
34 }
35 }
36 
-
37 
-
38 using geos::geom::CoordinateXY;
-
39 using geos::geom::Geometry;
-
40 using geos::geom::Location;
+
37 namespace geos { // geos.
+
38 namespace operation { // geos.operation
+
39 namespace relateng { // geos.operation.relateng
+
40 
41 
-
42 
-
43 namespace geos { // geos.
-
44 namespace operation { // geos.operation
-
45 namespace relateng { // geos.operation.relateng
+
42 class GEOS_DLL RelateEdge {
+
43  using CoordinateXY = geos::geom::CoordinateXY;
+
44  using Geometry = geos::geom::Geometry;
+
45  using Location = geos::geom::Location;
46 
-
47 
-
48 class GEOS_DLL RelateEdge {
-
49 
-
50 private:
-
51 
-
55  static constexpr Location LOC_UNKNOWN = Location::NONE;
-
56 
-
57  // Members
-
58  const RelateNode* node;
-
59  const CoordinateXY* dirPt;
-
60 
-
61  int aDim = DIM_UNKNOWN;
-
62  Location aLocLeft = LOC_UNKNOWN;
-
63  Location aLocRight = LOC_UNKNOWN;
-
64  Location aLocLine = LOC_UNKNOWN;
-
65 
-
66  int bDim = DIM_UNKNOWN;
-
67  Location bLocLeft = LOC_UNKNOWN;
-
68  Location bLocRight = LOC_UNKNOWN;
-
69  Location bLocLine = LOC_UNKNOWN;
+
47 private:
+
48 
+
52  static constexpr Location LOC_UNKNOWN = Location::NONE;
+
53 
+
54  // Members
+
55  const RelateNode* node;
+
56  const CoordinateXY* dirPt;
+
57 
+
58  int aDim = DIM_UNKNOWN;
+
59  Location aLocLeft = LOC_UNKNOWN;
+
60  Location aLocRight = LOC_UNKNOWN;
+
61  Location aLocLine = LOC_UNKNOWN;
+
62 
+
63  int bDim = DIM_UNKNOWN;
+
64  Location bLocLeft = LOC_UNKNOWN;
+
65  Location bLocRight = LOC_UNKNOWN;
+
66  Location bLocLine = LOC_UNKNOWN;
+
67 
+
68 
+
69 public:
70 
-
71 
-
72 public:
-
73 
-
74  // Constants
-
75  static constexpr bool IS_FORWARD = true;
-
76  static constexpr bool IS_REVERSE = false;
-
77  static constexpr int DIM_UNKNOWN = -1;
-
78 
-
79  // Constructors
-
80  RelateEdge(
-
81  const RelateNode* node, const CoordinateXY* pt,
-
82  bool isA, bool isForward);
-
83 
-
84  RelateEdge(
-
85  const RelateNode* node, const CoordinateXY* pt,
-
86  bool isA);
-
87 
-
88  RelateEdge(
-
89  const RelateNode* node, const CoordinateXY* pt,
-
90  bool isA, Location locLeft, Location locRight, Location locLine);
-
91 
-
92  // Methods
-
93  static RelateEdge* create(
-
94  const RelateNode* node,
-
95  const CoordinateXY* dirPt,
-
96  bool isA, int dim, bool isForward);
-
97 
-
98  static std::size_t findKnownEdgeIndex(
-
99  std::vector<std::unique_ptr<RelateEdge>>& edges,
-
100  bool isA);
-
101 
-
102  static void setAreaInterior(
-
103  std::vector<std::unique_ptr<RelateEdge>>& edges,
-
104  bool isA);
-
105 
-
106  bool isInterior(bool isA, int position) const;
-
107 
-
108  Location location(bool isA, int position) const;
-
109 
-
110  int compareToEdge(const CoordinateXY* edgeDirPt) const;
-
111 
-
112  void setDimLocations(bool isA, int dim, Location loc);
-
113 
-
114  void setAreaInterior(bool isA);
-
115 
-
116  void setLocation(bool isA, int pos, Location loc);
-
117 
-
118  void setAllLocations(bool isA, Location loc);
-
119 
-
120  void setUnknownLocations(bool isA, Location loc);
-
121 
-
122  void merge(bool isA, int dim, bool isForward);
-
123 
-
124  std::string toString() const;
+
71  // Constants
+
72  static constexpr bool IS_FORWARD = true;
+
73  static constexpr bool IS_REVERSE = false;
+
74  static constexpr int DIM_UNKNOWN = -1;
+
75 
+
76  // Constructors
+
77  RelateEdge(
+
78  const RelateNode* node, const CoordinateXY* pt,
+
79  bool isA, bool isForward);
+
80 
+
81  RelateEdge(
+
82  const RelateNode* node, const CoordinateXY* pt,
+
83  bool isA);
+
84 
+
85  RelateEdge(
+
86  const RelateNode* node, const CoordinateXY* pt,
+
87  bool isA, Location locLeft, Location locRight, Location locLine);
+
88 
+
89  // Methods
+
90  static RelateEdge* create(
+
91  const RelateNode* node,
+
92  const CoordinateXY* dirPt,
+
93  bool isA, int dim, bool isForward);
+
94 
+
95  static std::size_t findKnownEdgeIndex(
+
96  std::vector<std::unique_ptr<RelateEdge>>& edges,
+
97  bool isA);
+
98 
+
99  static void setAreaInterior(
+
100  std::vector<std::unique_ptr<RelateEdge>>& edges,
+
101  bool isA);
+
102 
+
103  bool isInterior(bool isA, int position) const;
+
104 
+
105  Location location(bool isA, int position) const;
+
106 
+
107  int compareToEdge(const CoordinateXY* edgeDirPt) const;
+
108 
+
109  void setDimLocations(bool isA, int dim, Location loc);
+
110 
+
111  void setAreaInterior(bool isA);
+
112 
+
113  void setLocation(bool isA, int pos, Location loc);
+
114 
+
115  void setAllLocations(bool isA, Location loc);
+
116 
+
117  void setUnknownLocations(bool isA, Location loc);
+
118 
+
119  void merge(bool isA, int dim, bool isForward);
+
120 
+
121  std::string toString() const;
+
122 
+
123  friend std::ostream& operator<<(std::ostream& os, const RelateEdge& re);
+
124 
125 
-
126  friend std::ostream& operator<<(std::ostream& os, const RelateEdge& re);
+
126 private:
127 
-
128 
-
129 private:
+
128  // Methods
+
129  void mergeSideLocation(bool isA, int pos, Location loc);
130 
-
131  // Methods
-
132  void mergeSideLocation(bool isA, int pos, Location loc);
-
133 
-
144  void mergeDimEdgeLoc(bool isA, Location locEdge);
-
145 
-
146  void setDimension(bool isA, int dimension);
-
147 
-
148  void setLeft(bool isA, Location loc);
-
149 
-
150  void setRight(bool isA, Location loc);
-
151 
-
152  void setOn(bool isA, Location loc);
-
153 
-
154  int dimension(bool isA) const;
-
155 
-
156  bool isKnown(bool isA) const;
-
157 
-
158  bool isKnown(bool isA, int pos) const;
-
159 
-
160  void setLocations(bool isA, Location locLeft, Location locRight, Location locLine);
-
161 
-
162  void setLocationsLine(bool isA);
-
163 
-
164  void setLocationsArea(bool isA, bool isForward);
-
165 
-
166  std::string labelString() const;
+
141  void mergeDimEdgeLoc(bool isA, Location locEdge);
+
142 
+
143  void setDimension(bool isA, int dimension);
+
144 
+
145  void setLeft(bool isA, Location loc);
+
146 
+
147  void setRight(bool isA, Location loc);
+
148 
+
149  void setOn(bool isA, Location loc);
+
150 
+
151  int dimension(bool isA) const;
+
152 
+
153  bool isKnown(bool isA) const;
+
154 
+
155  bool isKnown(bool isA, int pos) const;
+
156 
+
157  void setLocations(bool isA, Location locLeft, Location locRight, Location locLine);
+
158 
+
159  void setLocationsLine(bool isA);
+
160 
+
161  void setLocationsArea(bool isA, bool isForward);
+
162 
+
163  std::string labelString() const;
+
164 
+
165  std::string locationString(bool isA) const;
+
166 
167 
-
168  std::string locationString(bool isA) const;
+
168 };
169 
-
170 
-
171 };
-
172 
-
173 } // namespace geos.operation.relateng
-
174 } // namespace geos.operation
-
175 } // namespace geos
-
176 
+
170 } // namespace geos.operation.relateng
+
171 } // namespace geos.operation
+
172 } // namespace geos
+
173 
Basic implementation of Geometry, constructed and destructed by GeometryFactory.
Definition: Geometry.h:197
Location
Constants representing the location of a point relative to a geometry.
Definition: Location.h:32
-
@ NONE
Basic namespace for all GEOS functionalities.
Definition: Angle.h:25
diff --git a/doxygen/RelateGeometry_8h_source.html b/doxygen/RelateGeometry_8h_source.html index 390e7e23ce..2844ae47ec 100644 --- a/doxygen/RelateGeometry_8h_source.html +++ b/doxygen/RelateGeometry_8h_source.html @@ -79,13 +79,13 @@
30 // Forward declarations
31 namespace geos {
32 namespace geom {
-
33  class CoordinateSequence;
+
33  class CoordinateSequence;
34  class Envelope;
-
35  class Geometry;
-
36  class LinearRing;
-
37  class LineString;
+
35  class Geometry;
+
36  class LinearRing;
+
37  class LineString;
38  class MultiPolygon;
-
39  class Point;
+
39  class Point;
40 }
41 namespace noding {
42  class SegmentString;
@@ -97,177 +97,184 @@
48 namespace operation { // geos.operation
49 namespace relateng { // geos.operation.relateng
50 
-
51 using namespace geos::geom;
-
52 using geos::algorithm::BoundaryNodeRule;
-
53 using geos::noding::SegmentString;
-
54 
-
55 
-
56 class GEOS_DLL RelateGeometry {
-
57 
-
58 private:
-
59 
-
60  // Members
-
61 
-
62  const Geometry* geom;
-
63  bool m_isPrepared = false;
-
64  const Envelope* geomEnv;
-
65  const BoundaryNodeRule& boundaryNodeRule;
-
66  int geomDim = Dimension::False;
-
67  bool isLineZeroLen = false;
-
68  bool isGeomEmpty = false;
+
51 class GEOS_DLL RelateGeometry {
+
52  using Coordinate = geos::geom::Coordinate;
+
53  using CoordinateSequence = geos::geom::CoordinateSequence;
+
54  using Dimension = geos::geom::Dimension;
+
55  using Envelope = geos::geom::Envelope;
+
56  using Geometry = geos::geom::Geometry;
+
57  using Location = geos::geom::Location;
+
58  using CoordinateXY = geos::geom::CoordinateXY;
+
59  using LinearRing = geos::geom::LinearRing;
+
60  using LineString = geos::geom::LineString;
+
61  using MultiPolygon = geos::geom::MultiPolygon;
+
62  using Point = geos::geom::Point;
+
63  using BoundaryNodeRule = geos::algorithm::BoundaryNodeRule;
+
64  using SegmentString = geos::noding::SegmentString;
+
65 
+
66 private:
+
67 
+
68  // Members
69 
-
70  Coordinate::ConstXYSet uniquePoints;
-
71  std::unique_ptr<RelatePointLocator> locator;
-
72  int elementId = 0;
-
73  bool hasPoints = false;
-
74  bool hasLines = false;
-
75  bool hasAreas = false;
-
76 
-
77  /*
-
78  * Memory contexts for lower level allocations
-
79  */
-
80  std::vector<std::unique_ptr<const RelateSegmentString>> segStringTempStore;
-
81  std::vector<std::unique_ptr<const RelateSegmentString>> segStringPermStore;
-
82  std::vector<std::unique_ptr<CoordinateSequence>> csStore;
-
83 
+
70  const Geometry* geom;
+
71  bool m_isPrepared = false;
+
72  const Envelope* geomEnv;
+
73  const BoundaryNodeRule& boundaryNodeRule;
+
74  int geomDim = Dimension::False;
+
75  bool isLineZeroLen = false;
+
76  bool isGeomEmpty = false;
+
77 
+
78  Coordinate::ConstXYSet uniquePoints;
+
79  std::unique_ptr<RelatePointLocator> locator;
+
80  int elementId = 0;
+
81  bool hasPoints = false;
+
82  bool hasLines = false;
+
83  bool hasAreas = false;
84 
-
85  // Methods
-
86 
-
87  void analyzeDimensions();
-
88 
-
96  static bool isZeroLength(const Geometry* geom);
-
97 
-
98  static bool isZeroLength(const LineString* line);
-
99 
-
100  bool isZeroLengthLine(const Geometry* g) const {
-
101  // avoid expensive zero-length calculation if not linear
-
102  if (getDimension() != Dimension::L)
-
103  return false;
-
104  return isZeroLength(g);
-
105  };
-
106 
-
107  RelatePointLocator* getLocator();
-
108 
-
109  Coordinate::ConstXYSet createUniquePoints();
-
110 
-
111  void extractSegmentStringsFromAtomic(bool isA,
-
112  const Geometry* geom, const MultiPolygon* parentPolygonal,
-
113  const Envelope* env,
-
114  std::vector<const SegmentString*>& segStrings,
-
115  std::vector<std::unique_ptr<const RelateSegmentString>>& segStore);
+
85  /*
+
86  * Memory contexts for lower level allocations
+
87  */
+
88  std::vector<std::unique_ptr<const RelateSegmentString>> segStringTempStore;
+
89  std::vector<std::unique_ptr<const RelateSegmentString>> segStringPermStore;
+
90  std::vector<std::unique_ptr<CoordinateSequence>> csStore;
+
91 
+
92 
+
93  // Methods
+
94 
+
95  void analyzeDimensions();
+
96 
+
104  static bool isZeroLength(const Geometry* geom);
+
105 
+
106  static bool isZeroLength(const LineString* line);
+
107 
+
108  bool isZeroLengthLine(const Geometry* g) const {
+
109  // avoid expensive zero-length calculation if not linear
+
110  if (getDimension() != Dimension::L)
+
111  return false;
+
112  return isZeroLength(g);
+
113  };
+
114 
+
115  RelatePointLocator* getLocator();
116 
-
117  void extractRingToSegmentString(bool isA,
-
118  const LinearRing* ring, int ringId, const Envelope* env,
-
119  const Geometry* parentPoly,
-
120  std::vector<const SegmentString*>& segStrings,
-
121  std::vector<std::unique_ptr<const RelateSegmentString>>& segStore);
-
122 
-
123  void extractSegmentStrings(bool isA,
-
124  const Envelope* env, const Geometry* geom,
-
125  std::vector<const SegmentString*>& segStrings,
-
126  std::vector<std::unique_ptr<const RelateSegmentString>>& segStore);
-
127 
-
128  const CoordinateSequence* orientAndRemoveRepeated(
-
129  const CoordinateSequence* cs, bool orientCW);
+
117  Coordinate::ConstXYSet createUniquePoints();
+
118 
+
119  void extractSegmentStringsFromAtomic(bool isA,
+
120  const Geometry* geom, const MultiPolygon* parentPolygonal,
+
121  const Envelope* env,
+
122  std::vector<const SegmentString*>& segStrings,
+
123  std::vector<std::unique_ptr<const RelateSegmentString>>& segStore);
+
124 
+
125  void extractRingToSegmentString(bool isA,
+
126  const LinearRing* ring, int ringId, const Envelope* env,
+
127  const Geometry* parentPoly,
+
128  std::vector<const SegmentString*>& segStrings,
+
129  std::vector<std::unique_ptr<const RelateSegmentString>>& segStore);
130 
-
131  const CoordinateSequence* removeRepeated(
-
132  const CoordinateSequence* cs);
-
133 
-
134 public:
+
131  void extractSegmentStrings(bool isA,
+
132  const Envelope* env, const Geometry* geom,
+
133  std::vector<const SegmentString*>& segStrings,
+
134  std::vector<std::unique_ptr<const RelateSegmentString>>& segStore);
135 
-
136  static constexpr bool GEOM_A = true;
-
137  static constexpr bool GEOM_B = false;
+
136  const CoordinateSequence* orientAndRemoveRepeated(
+
137  const CoordinateSequence* cs, bool orientCW);
138 
-
139  RelateGeometry(const Geometry* input)
-
140  : RelateGeometry(input, false, BoundaryNodeRule::getBoundaryRuleMod2())
-
141  {};
-
142 
-
143  RelateGeometry(const Geometry* input, const BoundaryNodeRule& bnRule)
-
144  : RelateGeometry(input, false, bnRule)
-
145  {};
+
139  const CoordinateSequence* removeRepeated(
+
140  const CoordinateSequence* cs);
+
141 
+
142 public:
+
143 
+
144  static constexpr bool GEOM_A = true;
+
145  static constexpr bool GEOM_B = false;
146 
-
147  RelateGeometry(const Geometry* input, bool p_isPrepared, const BoundaryNodeRule& bnRule);
-
148 
-
149  static std::string name(bool isA);
+
147  RelateGeometry(const Geometry* input)
+
148  : RelateGeometry(input, false, BoundaryNodeRule::getBoundaryRuleMod2())
+
149  {};
150 
-
151  const Geometry* getGeometry() const {
-
152  return geom;
-
153  }
+
151  RelateGeometry(const Geometry* input, const BoundaryNodeRule& bnRule)
+
152  : RelateGeometry(input, false, bnRule)
+
153  {};
154 
-
155  bool isPrepared() const {
-
156  return m_isPrepared;
-
157  }
+
155  RelateGeometry(const Geometry* input, bool p_isPrepared, const BoundaryNodeRule& bnRule);
+
156 
+
157  static std::string name(bool isA);
158 
-
159  const Envelope* getEnvelope() const {
-
160  return geomEnv;
+
159  const Geometry* getGeometry() const {
+
160  return geom;
161  }
162 
-
163  inline int getDimension() const {
-
164  return geomDim;
+
163  bool isPrepared() const {
+
164  return m_isPrepared;
165  }
166 
-
167  bool hasDimension(int dim) const {
-
168  switch (dim) {
-
169  case Dimension::P: return hasPoints;
-
170  case Dimension::L: return hasLines;
-
171  case Dimension::A: return hasAreas;
-
172  }
-
173  return false;
-
174  }
-
175 
-
182  int getDimensionReal() const;
+
167  const Envelope* getEnvelope() const {
+
168  return geomEnv;
+
169  }
+
170 
+
171  inline int getDimension() const {
+
172  return geomDim;
+
173  }
+
174 
+
175  bool hasDimension(int dim) const {
+
176  switch (dim) {
+
177  case Dimension::P: return hasPoints;
+
178  case Dimension::L: return hasLines;
+
179  case Dimension::A: return hasAreas;
+
180  }
+
181  return false;
+
182  }
183 
-
184  bool hasEdges() const;
-
185 
-
186  bool isNodeInArea(const CoordinateXY* nodePt, const Geometry* parentPolygonal);
-
187 
-
188  int locateLineEndWithDim(const CoordinateXY* p);
-
189 
-
200  Location locateAreaVertex(const CoordinateXY* pt);
-
201 
-
202  Location locateNode(const CoordinateXY* pt, const Geometry* parentPolygonal);
-
203 
-
204  int locateWithDim(const CoordinateXY* pt);
-
205 
-
222  bool isSelfNodingRequired() const;
-
223 
-
234  bool isPolygonal() const;
-
235 
-
236  bool isEmpty() const;
-
237 
-
238  bool hasBoundary();
-
239 
-
240  Coordinate::ConstXYSet& getUniquePoints();
-
241 
-
242  std::vector<const Point*> getEffectivePoints();
+
190  int getDimensionReal() const;
+
191 
+
192  bool hasEdges() const;
+
193 
+
194  bool isNodeInArea(const CoordinateXY* nodePt, const Geometry* parentPolygonal);
+
195 
+
196  int locateLineEndWithDim(const CoordinateXY* p);
+
197 
+
208  Location locateAreaVertex(const CoordinateXY* pt);
+
209 
+
210  Location locateNode(const CoordinateXY* pt, const Geometry* parentPolygonal);
+
211 
+
212  int locateWithDim(const CoordinateXY* pt);
+
213 
+
230  bool isSelfNodingRequired() const;
+
231 
+
242  bool isPolygonal() const;
243 
-
253  std::vector<const SegmentString*> extractSegmentStrings(bool isA, const Envelope* env);
-
254 
-
255  std::string toString() const;
-
256 
-
257  friend std::ostream& operator<<(std::ostream& os, const RelateGeometry& rg);
-
258 
-
264  RelateGeometry(const RelateGeometry&) = delete;
-
265  RelateGeometry& operator=(const RelateGeometry&) = delete;
+
244  bool isEmpty() const;
+
245 
+
246  bool hasBoundary();
+
247 
+
248  Coordinate::ConstXYSet& getUniquePoints();
+
249 
+
250  std::vector<const Point*> getEffectivePoints();
+
251 
+
261  std::vector<const SegmentString*> extractSegmentStrings(bool isA, const Envelope* env);
+
262 
+
263  std::string toString() const;
+
264 
+
265  friend std::ostream& operator<<(std::ostream& os, const RelateGeometry& rg);
266 
-
267 };
-
268 
-
269 } // namespace geos.operation.relateng
-
270 } // namespace geos.operation
-
271 } // namespace geos
-
272 
+
272  RelateGeometry(const RelateGeometry&) = delete;
+
273  RelateGeometry& operator=(const RelateGeometry&) = delete;
+
274 
+
275 };
+
276 
+
277 } // namespace geos.operation.relateng
+
278 } // namespace geos.operation
+
279 } // namespace geos
+
280 
An interface for rules which determine whether node points which are in boundaries of lineal geometry...
Definition: BoundaryNodeRule.h:52
The internal representation of a list of coordinates inside a Geometry.
Definition: CoordinateSequence.h:56
-
@ A
Dimension value of a surface (2).
Definition: Dimension.h:46
-
@ L
Dimension value of a curve (1).
Definition: Dimension.h:43
-
@ False
Dimension value of the empty geometry (-1).
Definition: Dimension.h:37
-
@ P
Dimension value of a point (0).
Definition: Dimension.h:40
+
Coordinate is the lightweight class used to store coordinates.
Definition: Coordinate.h:217
+
Definition: Dimension.h:27
+
An Envelope defines a rectangulare region of the 2D coordinate plane.
Definition: Envelope.h:59
Basic implementation of Geometry, constructed and destructed by GeometryFactory.
Definition: Geometry.h:197
Definition: LineString.h:66
Models an OGC SFS LinearRing. A LinearRing is a LineString which is both closed and simple.
Definition: LinearRing.h:54
+
Definition: MultiPolygon.h:58
Definition: Point.h:61
An interface for classes which represent a sequence of contiguous line segments.
Definition: SegmentString.h:47
-
Definition: Angle.h:26
Location
Constants representing the location of a point relative to a geometry.
Definition: Location.h:32
Basic namespace for all GEOS functionalities.
Definition: Angle.h:25
diff --git a/doxygen/RelateMatrixPredicate_8h_source.html b/doxygen/RelateMatrixPredicate_8h_source.html index dd04035136..d890bb4d10 100644 --- a/doxygen/RelateMatrixPredicate_8h_source.html +++ b/doxygen/RelateMatrixPredicate_8h_source.html @@ -76,57 +76,54 @@
27 // Forward declarations
28 namespace geos {
29 namespace geom {
-
30  class Envelope;
+
30  class Envelope;
31 }
32 }
33 
-
34 
-
35 using geos::geom::Envelope;
-
36 using geos::geom::Location;
-
37 using geos::geom::Dimension;
-
38 using geos::geom::IntersectionMatrix;
-
39 
-
40 
-
41 namespace geos { // geos.
-
42 namespace operation { // geos.operation.
-
43 namespace relateng { // geos.operation.relateng
+
34 namespace geos { // geos.
+
35 namespace operation { // geos.operation.
+
36 namespace relateng { // geos.operation.relateng
+
37 
+
38 
+
39 class GEOS_DLL RelateMatrixPredicate : public IMPredicate {
+
40  using Envelope = geos::geom::Envelope;
+
41  using Location = geos::geom::Location;
+
42  using Dimension = geos::geom::Dimension;
+
43  using IntersectionMatrix = geos::geom::IntersectionMatrix;
44 
-
45 
-
46 class GEOS_DLL RelateMatrixPredicate : public IMPredicate {
-
47 
-
48 public:
-
49 
-
50  RelateMatrixPredicate() {};
-
51 
-
52  std::string name() const override {
-
53  return "relateMatrix";
-
54  };
-
55 
-
56  bool requireInteraction() const override {
-
57  //-- ensure entire matrix is computed
-
58  return false;
-
59  };
-
60 
-
61  bool isDetermined() const override {
-
62  //-- ensure entire matrix is computed
-
63  return false;
-
64  };
-
65 
-
66  bool valueIM() override {
-
67  //-- indicates full matrix is being evaluated
-
68  return false;
-
69  };
-
70 
-
76  std::unique_ptr<IntersectionMatrix> getIM() {
-
77  return std::unique_ptr<IntersectionMatrix>(new IntersectionMatrix(intMatrix));
-
78  }
-
79 
-
80 };
-
81 
-
82 } // namespace geos.operation.relateng
-
83 } // namespace geos.operation
-
84 } // namespace geos
-
85 
+
45 public:
+
46 
+
47  RelateMatrixPredicate() {};
+
48 
+
49  std::string name() const override {
+
50  return "relateMatrix";
+
51  };
+
52 
+
53  bool requireInteraction() const override {
+
54  //-- ensure entire matrix is computed
+
55  return false;
+
56  };
+
57 
+
58  bool isDetermined() const override {
+
59  //-- ensure entire matrix is computed
+
60  return false;
+
61  };
+
62 
+
63  bool valueIM() override {
+
64  //-- indicates full matrix is being evaluated
+
65  return false;
+
66  };
+
67 
+
73  std::unique_ptr<IntersectionMatrix> getIM() {
+
74  return std::unique_ptr<IntersectionMatrix>(new IntersectionMatrix(intMatrix));
+
75  }
+
76 
+
77 };
+
78 
+
79 } // namespace geos.operation.relateng
+
80 } // namespace geos.operation
+
81 } // namespace geos
+
82 
Definition: Dimension.h:27
An Envelope defines a rectangulare region of the 2D coordinate plane.
Definition: Envelope.h:59
Implementation of Dimensionally Extended Nine-Intersection Model (DE-9IM) matrix.
Definition: IntersectionMatrix.h:51
diff --git a/doxygen/RelateNG_8h_source.html b/doxygen/RelateNG_8h_source.html index b798fdd747..7ab4ec74bc 100644 --- a/doxygen/RelateNG_8h_source.html +++ b/doxygen/RelateNG_8h_source.html @@ -75,11 +75,11 @@
26 // Forward declarations
27 namespace geos {
28 namespace algorithm {
-
29  class BoundaryNodeRule;
+
29  class BoundaryNodeRule;
30 
31 }
32 namespace geom {
-
33  class Geometry;
+
33  class Geometry;
34 }
35 namespace noding {
36 }
@@ -97,123 +97,125 @@
48 namespace operation { // geos.operation
49 namespace relateng { // geos.operation.relateng
50 
-
51 
-
52 using geos::geom::CoordinateXY;
-
53 using geos::geom::Geometry;
-
54 using geos::algorithm::BoundaryNodeRule;
-
55 using geos::noding::MCIndexSegmentSetMutualIntersector;
-
56 
-
57 
-
93 class GEOS_DLL RelateNG {
-
94 
-
95 private:
-
96 
-
97  // Members
-
98  const BoundaryNodeRule& boundaryNodeRule;
-
99  RelateGeometry geomA;
-
100  std::unique_ptr<MCIndexSegmentSetMutualIntersector> edgeMutualInt = nullptr;
-
101 
-
102  // Methods
-
103 
-
104  RelateNG(const Geometry* inputA, bool isPrepared, const BoundaryNodeRule& bnRule)
-
105  : boundaryNodeRule(bnRule)
-
106  , geomA(inputA, isPrepared, bnRule)
-
107  {}
-
108 
-
109  RelateNG(const Geometry* inputA, bool isPrepared)
-
110  : RelateNG(inputA, isPrepared, BoundaryNodeRule::getBoundaryRuleMod2())
-
111  {}
-
112 
-
113  bool hasRequiredEnvelopeInteraction(const Geometry* b, TopologyPredicate& predicate);
-
114 
-
115  bool finishValue(TopologyPredicate& predicate);
-
116 
-
117  void computePP(RelateGeometry& geomB, TopologyComputer& topoComputer);
-
118 
-
119  void computeAtPoints(RelateGeometry& geom, bool isA, RelateGeometry& geomTarget, TopologyComputer& topoComputer);
-
120 
-
121  bool computePoints(RelateGeometry& geom, bool isA, RelateGeometry& geomTarget, TopologyComputer& topoComputer);
-
122 
-
123  void computePoint(bool isA, const CoordinateXY* pt, RelateGeometry& geomTarget, TopologyComputer& topoComputer);
-
124 
-
125  bool computeLineEnds(RelateGeometry& geom, bool isA, RelateGeometry& geomTarget, TopologyComputer& topoComputer);
-
126 
+
86 class GEOS_DLL RelateNG {
+
87  using CoordinateXY = geos::geom::CoordinateXY;
+
88  using Geometry = geos::geom::Geometry;
+
89  using BoundaryNodeRule = geos::algorithm::BoundaryNodeRule;
+
90  using MCIndexSegmentSetMutualIntersector = geos::noding::MCIndexSegmentSetMutualIntersector;
+
91  using LinearRing = geos::geom::LinearRing;
+
92  using Envelope = geos::geom::Envelope;
+
93  using SegmentString = geos::noding::SegmentString;
+
94  using IntersectionMatrix = geos::geom::IntersectionMatrix;
+
95 
+
96 private:
+
97 
+
98  // Members
+
99  const BoundaryNodeRule& boundaryNodeRule;
+
100  RelateGeometry geomA;
+
101  std::unique_ptr<MCIndexSegmentSetMutualIntersector> edgeMutualInt = nullptr;
+
102 
+
103  // Methods
+
104 
+
105  RelateNG(const Geometry* inputA, bool isPrepared, const BoundaryNodeRule& bnRule)
+
106  : boundaryNodeRule(bnRule)
+
107  , geomA(inputA, isPrepared, bnRule)
+
108  {}
+
109 
+
110  RelateNG(const Geometry* inputA, bool isPrepared)
+
111  : RelateNG(inputA, isPrepared, BoundaryNodeRule::getBoundaryRuleMod2())
+
112  {}
+
113 
+
114  bool hasRequiredEnvelopeInteraction(const Geometry* b, TopologyPredicate& predicate);
+
115 
+
116  bool finishValue(TopologyPredicate& predicate);
+
117 
+
118  void computePP(RelateGeometry& geomB, TopologyComputer& topoComputer);
+
119 
+
120  void computeAtPoints(RelateGeometry& geom, bool isA, RelateGeometry& geomTarget, TopologyComputer& topoComputer);
+
121 
+
122  bool computePoints(RelateGeometry& geom, bool isA, RelateGeometry& geomTarget, TopologyComputer& topoComputer);
+
123 
+
124  void computePoint(bool isA, const CoordinateXY* pt, RelateGeometry& geomTarget, TopologyComputer& topoComputer);
+
125 
+
126  bool computeLineEnds(RelateGeometry& geom, bool isA, RelateGeometry& geomTarget, TopologyComputer& topoComputer);
127 
-
140  bool computeLineEnd(RelateGeometry& geom, bool isA, const CoordinateXY* pt, RelateGeometry& geomTarget, TopologyComputer& topoComputer);
-
141 
-
142  bool computeAreaVertex(RelateGeometry& geom, bool isA, RelateGeometry& geomTarget, TopologyComputer& topoComputer);
-
143 
-
144  bool computeAreaVertex(RelateGeometry& geom, bool isA, const LinearRing* ring, RelateGeometry& geomTarget, TopologyComputer& topoComputer);
-
145 
-
146  void computeAtEdges(RelateGeometry& geomB, TopologyComputer& topoComputer);
-
147 
-
148  void computeEdgesAll(std::vector<const SegmentString*>& edgesB, const Envelope* envInt, EdgeSegmentIntersector& intersector);
-
149 
-
150  void computeEdgesMutual(std::vector<const SegmentString*>& edgesB, const Envelope* envInt, EdgeSegmentIntersector& intersector);
-
151 
+
128 
+
141  bool computeLineEnd(RelateGeometry& geom, bool isA, const CoordinateXY* pt, RelateGeometry& geomTarget, TopologyComputer& topoComputer);
+
142 
+
143  bool computeAreaVertex(RelateGeometry& geom, bool isA, RelateGeometry& geomTarget, TopologyComputer& topoComputer);
+
144 
+
145  bool computeAreaVertex(RelateGeometry& geom, bool isA, const LinearRing* ring, RelateGeometry& geomTarget, TopologyComputer& topoComputer);
+
146 
+
147  void computeAtEdges(RelateGeometry& geomB, TopologyComputer& topoComputer);
+
148 
+
149  void computeEdgesAll(std::vector<const SegmentString*>& edgesB, const Envelope* envInt, EdgeSegmentIntersector& intersector);
+
150 
+
151  void computeEdgesMutual(std::vector<const SegmentString*>& edgesB, const Envelope* envInt, EdgeSegmentIntersector& intersector);
152 
153 
-
154 public:
-
155 
-
165  static bool relate(const Geometry* a, const Geometry* b, TopologyPredicate& pred);
-
166 
-
178  static bool relate(const Geometry* a, const Geometry* b, TopologyPredicate& pred, const BoundaryNodeRule& bnRule);
-
179 
-
191  static bool relate(const Geometry* a, const Geometry* b, const std::string& imPattern);
-
192 
-
201  static std::unique_ptr<IntersectionMatrix> relate(const Geometry* a, const Geometry* b);
-
202 
-
212  static std::unique_ptr<IntersectionMatrix> relate(const Geometry* a, const Geometry* b, const BoundaryNodeRule& bnRule);
-
213 
-
221  static std::unique_ptr<RelateNG> prepare(const Geometry* a);
-
222 
-
232  static std::unique_ptr<RelateNG> prepare(const Geometry* a, const BoundaryNodeRule& bnRule);
-
233 
+
154 
+
155 public:
+
156 
+
166  static bool relate(const Geometry* a, const Geometry* b, TopologyPredicate& pred);
+
167 
+
179  static bool relate(const Geometry* a, const Geometry* b, TopologyPredicate& pred, const BoundaryNodeRule& bnRule);
+
180 
+
192  static bool relate(const Geometry* a, const Geometry* b, const std::string& imPattern);
+
193 
+
202  static std::unique_ptr<IntersectionMatrix> relate(const Geometry* a, const Geometry* b);
+
203 
+
213  static std::unique_ptr<IntersectionMatrix> relate(const Geometry* a, const Geometry* b, const BoundaryNodeRule& bnRule);
+
214 
+
222  static std::unique_ptr<RelateNG> prepare(const Geometry* a);
+
223 
+
233  static std::unique_ptr<RelateNG> prepare(const Geometry* a, const BoundaryNodeRule& bnRule);
234 
-
241  std::unique_ptr<IntersectionMatrix> evaluate(const Geometry* b);
-
242 
+
235 
+
242  std::unique_ptr<IntersectionMatrix> evaluate(const Geometry* b);
243 
-
254  bool evaluate(const Geometry* b, const std::string& imPattern);
-
255 
-
264  bool evaluate(const Geometry* b, TopologyPredicate& predicate);
-
265 
-
266  static bool intersects(const Geometry* a, const Geometry* b);
-
267  static bool crosses(const Geometry* a, const Geometry* b);
-
268  static bool disjoint(const Geometry* a, const Geometry* b);
-
269  static bool touches(const Geometry* a, const Geometry* b);
-
270  static bool within(const Geometry* a, const Geometry* b);
-
271  static bool contains(const Geometry* a, const Geometry* b);
-
272  static bool overlaps(const Geometry* a, const Geometry* b);
-
273  static bool covers(const Geometry* a, const Geometry* b);
-
274  static bool coveredBy(const Geometry* a, const Geometry* b);
-
275  static bool equalsTopo(const Geometry* a, const Geometry* b);
-
276 
-
277  bool intersects(const Geometry* a);
-
278  bool crosses(const Geometry* a);
-
279  bool disjoint(const Geometry* a);
-
280  bool touches(const Geometry* a);
-
281  bool within(const Geometry* a);
-
282  bool contains(const Geometry* a);
-
283  bool overlaps(const Geometry* a);
-
284  bool covers(const Geometry* a);
-
285  bool coveredBy(const Geometry* a);
-
286  bool equalsTopo(const Geometry* a);
-
287  bool relate(const Geometry* a, const std::string& pat);
-
288  std::unique_ptr<IntersectionMatrix> relate(const Geometry* a);
-
289 
-
290 };
-
291 
-
292 } // namespace geos.operation.relateng
-
293 } // namespace geos.operation
-
294 } // namespace geos
-
295 
+
244 
+
255  bool evaluate(const Geometry* b, const std::string& imPattern);
+
256 
+
265  bool evaluate(const Geometry* b, TopologyPredicate& predicate);
+
266 
+
267  static bool intersects(const Geometry* a, const Geometry* b);
+
268  static bool crosses(const Geometry* a, const Geometry* b);
+
269  static bool disjoint(const Geometry* a, const Geometry* b);
+
270  static bool touches(const Geometry* a, const Geometry* b);
+
271  static bool within(const Geometry* a, const Geometry* b);
+
272  static bool contains(const Geometry* a, const Geometry* b);
+
273  static bool overlaps(const Geometry* a, const Geometry* b);
+
274  static bool covers(const Geometry* a, const Geometry* b);
+
275  static bool coveredBy(const Geometry* a, const Geometry* b);
+
276  static bool equalsTopo(const Geometry* a, const Geometry* b);
+
277 
+
278  bool intersects(const Geometry* a);
+
279  bool crosses(const Geometry* a);
+
280  bool disjoint(const Geometry* a);
+
281  bool touches(const Geometry* a);
+
282  bool within(const Geometry* a);
+
283  bool contains(const Geometry* a);
+
284  bool overlaps(const Geometry* a);
+
285  bool covers(const Geometry* a);
+
286  bool coveredBy(const Geometry* a);
+
287  bool equalsTopo(const Geometry* a);
+
288  bool relate(const Geometry* a, const std::string& pat);
+
289  std::unique_ptr<IntersectionMatrix> relate(const Geometry* a);
+
290 
+
291 };
+
292 
+
293 } // namespace geos.operation.relateng
+
294 } // namespace geos.operation
+
295 } // namespace geos
+
296 
An interface for rules which determine whether node points which are in boundaries of lineal geometry...
Definition: BoundaryNodeRule.h:52
-
static const BoundaryNodeRule & getBoundaryRuleMod2()
The Mod-2 Boundary Node Rule (which is the rule specified in the OGC SFS).
An Envelope defines a rectangulare region of the 2D coordinate plane.
Definition: Envelope.h:59
Basic implementation of Geometry, constructed and destructed by GeometryFactory.
Definition: Geometry.h:197
+
Implementation of Dimensionally Extended Nine-Intersection Model (DE-9IM) matrix.
Definition: IntersectionMatrix.h:51
Models an OGC SFS LinearRing. A LinearRing is a LineString which is both closed and simple.
Definition: LinearRing.h:54
Intersects two sets of SegmentStrings using a index based on MonotoneChains and a SpatialIndex.
Definition: MCIndexSegmentSetMutualIntersector.h:47
-
Definition: RelateNG.h:93
+
An interface for classes which represent a sequence of contiguous line segments.
Definition: SegmentString.h:47
+
Definition: RelateNG.h:86
static bool relate(const Geometry *a, const Geometry *b, TopologyPredicate &pred)
static bool relate(const Geometry *a, const Geometry *b, TopologyPredicate &pred, const BoundaryNodeRule &bnRule)
bool evaluate(const Geometry *b, const std::string &imPattern)
diff --git a/doxygen/RelatePointLocator_8h_source.html b/doxygen/RelatePointLocator_8h_source.html index ab0019b9ff..0c4cd631fd 100644 --- a/doxygen/RelatePointLocator_8h_source.html +++ b/doxygen/RelatePointLocator_8h_source.html @@ -90,132 +90,128 @@
41 }
42 namespace geom {
43  class CoordinateXY;
-
44  class Geometry;
-
45  class LineString;
-
46  class Point;
+
44  class Geometry;
+
45  class LineString;
+
46  class Point;
47 }
48 }
49 
-
50 
-
51 using geos::algorithm::BoundaryNodeRule;
-
52 using geos::algorithm::locate::PointOnGeometryLocator;
-
53 using geos::geom::Coordinate;
-
54 using geos::geom::CoordinateXY;
-
55 using geos::geom::Geometry;
-
56 using geos::geom::LineString;
-
57 using geos::geom::Point;
-
58 using geos::geom::Location;
-
59 
-
60 
-
61 namespace geos { // geos.
-
62 namespace operation { // geos.operation
-
63 namespace relateng { // geos.operation.relateng
-
64 
-
65 
-
86 class GEOS_DLL RelatePointLocator {
-
87 
-
88 private:
-
89 
-
90  // Members
-
91 
-
92  const Geometry* geom;
-
93  bool isPrepared = false;
-
94  const BoundaryNodeRule& boundaryRule;
-
95  std::unique_ptr<AdjacentEdgeLocator> adjEdgeLocator;
-
96  Coordinate::ConstXYSet points;
-
97  std::vector<const LineString *> lines;
-
98  std::vector<const Geometry *> polygons;
-
99  std::vector<std::unique_ptr<PointOnGeometryLocator>> polyLocator;
-
100  std::unique_ptr<LinearBoundary> lineBoundary;
-
101  bool isEmpty;
+
50 namespace geos { // geos.
+
51 namespace operation { // geos.operation
+
52 namespace relateng { // geos.operation.relateng
+
53 
+
54 
+
75 class GEOS_DLL RelatePointLocator {
+
76  using BoundaryNodeRule = geos::algorithm::BoundaryNodeRule;
+
77  using PointOnGeometryLocator = geos::algorithm::locate::PointOnGeometryLocator;
+
78  using Coordinate = geos::geom::Coordinate;
+
79  using CoordinateXY = geos::geom::CoordinateXY;
+
80  using Geometry = geos::geom::Geometry;
+
81  using LineString = geos::geom::LineString;
+
82  using Point = geos::geom::Point;
+
83  using Location = geos::geom::Location;
+
84 
+
85 private:
+
86 
+
87  // Members
+
88 
+
89  const Geometry* geom;
+
90  bool isPrepared = false;
+
91  const BoundaryNodeRule& boundaryRule;
+
92  std::unique_ptr<AdjacentEdgeLocator> adjEdgeLocator;
+
93  Coordinate::ConstXYSet points;
+
94  std::vector<const LineString *> lines;
+
95  std::vector<const Geometry *> polygons;
+
96  std::vector<std::unique_ptr<PointOnGeometryLocator>> polyLocator;
+
97  std::unique_ptr<LinearBoundary> lineBoundary;
+
98  bool isEmpty;
+
99 
+
100 
+
101 public:
102 
-
103 
-
104 public:
-
105 
-
106  // Constructors
-
107 
-
108  RelatePointLocator(const Geometry* p_geom)
-
109  : RelatePointLocator(p_geom, false, BoundaryNodeRule::getBoundaryRuleMod2())
-
110  {};
-
111 
-
112  RelatePointLocator(const Geometry* p_geom, bool p_isPrepared, const BoundaryNodeRule& p_bnRule)
-
113  : geom(p_geom)
-
114  , isPrepared(p_isPrepared)
-
115  , boundaryRule(p_bnRule)
-
116  {
-
117  init(geom);
-
118  };
-
119 
-
120  void init(const Geometry* p_geom);
-
121 
-
122  bool hasBoundary() const;
-
123 
-
124  void extractElements(const Geometry* geom);
-
125 
-
126  void addPoint(const Point* pt);
-
127 
-
128  void addLine(const LineString* line);
-
129 
-
130  void addPolygonal(const Geometry* polygonal);
-
131 
-
132  Location locate(const CoordinateXY* p);
-
133 
-
134  int locateLineEndWithDim(const CoordinateXY* p);
-
135 
-
136  /*
-
137  * Locates a point which is known to be a node of the geometry
-
138  * (i.e. a vertex or on an edge).
-
139  *
-
140  * @param p the node point to locate
-
141  * @param parentPolygonal the polygon the point is a node of
-
142  * @return the location of the node point
-
143  */
-
144  Location locateNode(const CoordinateXY* p, const Geometry* parentPolygonal);
-
145 
-
154  int locateNodeWithDim(const CoordinateXY* p, const Geometry* parentPolygonal);
-
155 
-
167  int locateWithDim(const CoordinateXY* p);
+
103  // Constructors
+
104 
+
105  RelatePointLocator(const Geometry* p_geom)
+
106  : RelatePointLocator(p_geom, false, BoundaryNodeRule::getBoundaryRuleMod2())
+
107  {};
+
108 
+
109  RelatePointLocator(const Geometry* p_geom, bool p_isPrepared, const BoundaryNodeRule& p_bnRule)
+
110  : geom(p_geom)
+
111  , isPrepared(p_isPrepared)
+
112  , boundaryRule(p_bnRule)
+
113  {
+
114  init(geom);
+
115  };
+
116 
+
117  void init(const Geometry* p_geom);
+
118 
+
119  bool hasBoundary() const;
+
120 
+
121  void extractElements(const Geometry* geom);
+
122 
+
123  void addPoint(const Point* pt);
+
124 
+
125  void addLine(const LineString* line);
+
126 
+
127  void addPolygonal(const Geometry* polygonal);
+
128 
+
129  Location locate(const CoordinateXY* p);
+
130 
+
131  int locateLineEndWithDim(const CoordinateXY* p);
+
132 
+
133  /*
+
134  * Locates a point which is known to be a node of the geometry
+
135  * (i.e. a vertex or on an edge).
+
136  *
+
137  * @param p the node point to locate
+
138  * @param parentPolygonal the polygon the point is a node of
+
139  * @return the location of the node point
+
140  */
+
141  Location locateNode(const CoordinateXY* p, const Geometry* parentPolygonal);
+
142 
+
151  int locateNodeWithDim(const CoordinateXY* p, const Geometry* parentPolygonal);
+
152 
+
164  int locateWithDim(const CoordinateXY* p);
+
165 
+
166 
+
167 private:
168 
-
169 
-
170 private:
-
171 
-
172  // Methods
-
173 
-
187  int locateWithDim(const CoordinateXY* p, bool isNode, const Geometry* parentPolygonal);
-
188 
-
189  int computeDimLocation(const CoordinateXY* p, bool isNode, const Geometry* parentPolygonal);
-
190 
-
191  Location locateOnPoints(const CoordinateXY* p) const;
-
192 
-
193  Location locateOnLines(const CoordinateXY* p, bool isNode);
-
194 
-
195  Location locateOnLine(const CoordinateXY* p, /*bool isNode,*/ const LineString* l);
-
196 
-
197  Location locateOnPolygons(const CoordinateXY* p, bool isNode, const Geometry* parentPolygonal);
-
198 
-
199  Location locateOnPolygonal(const CoordinateXY* p,
-
200  bool isNode,
-
201  const Geometry* parentPolygonal,
-
202  std::size_t index);
+
169  // Methods
+
170 
+
184  int locateWithDim(const CoordinateXY* p, bool isNode, const Geometry* parentPolygonal);
+
185 
+
186  int computeDimLocation(const CoordinateXY* p, bool isNode, const Geometry* parentPolygonal);
+
187 
+
188  Location locateOnPoints(const CoordinateXY* p) const;
+
189 
+
190  Location locateOnLines(const CoordinateXY* p, bool isNode);
+
191 
+
192  Location locateOnLine(const CoordinateXY* p, /*bool isNode,*/ const LineString* l);
+
193 
+
194  Location locateOnPolygons(const CoordinateXY* p, bool isNode, const Geometry* parentPolygonal);
+
195 
+
196  Location locateOnPolygonal(const CoordinateXY* p,
+
197  bool isNode,
+
198  const Geometry* parentPolygonal,
+
199  std::size_t index);
+
200 
+
201  PointOnGeometryLocator * getLocator(std::size_t index);
+
202 
203 
-
204  PointOnGeometryLocator * getLocator(std::size_t index);
-
205 
+
204 
+
205 };
206 
-
207 
-
208 };
-
209 
-
210 } // namespace geos.operation.relateng
-
211 } // namespace geos.operation
-
212 } // namespace geos
-
213 
+
207 } // namespace geos.operation.relateng
+
208 } // namespace geos.operation
+
209 } // namespace geos
+
210 
An interface for rules which determine whether node points which are in boundaries of lineal geometry...
Definition: BoundaryNodeRule.h:52
-
static const BoundaryNodeRule & getBoundaryRuleMod2()
The Mod-2 Boundary Node Rule (which is the rule specified in the OGC SFS).
An interface for classes which determine the Location of points in Polygon or MultiPolygon geometries...
Definition: PointOnGeometryLocator.h:36
Coordinate is the lightweight class used to store coordinates.
Definition: Coordinate.h:217
Basic implementation of Geometry, constructed and destructed by GeometryFactory.
Definition: Geometry.h:197
Definition: LineString.h:66
Definition: Point.h:61
-
Definition: RelatePointLocator.h:86
+
Definition: RelatePointLocator.h:75
int locateNodeWithDim(const CoordinateXY *p, const Geometry *parentPolygonal)
int locateWithDim(const CoordinateXY *p)
Location
Constants representing the location of a point relative to a geometry.
Definition: Location.h:32
diff --git a/doxygen/RelatePredicate_8h_source.html b/doxygen/RelatePredicate_8h_source.html index 376709521c..c7d9675704 100644 --- a/doxygen/RelatePredicate_8h_source.html +++ b/doxygen/RelatePredicate_8h_source.html @@ -72,635 +72,624 @@
23 #include <geos/geom/Envelope.h>
24 #include <geos/export.h>
25 
-
26 
-
27 using geos::geom::Envelope;
-
28 using geos::geom::Location;
+
26 namespace geos { // geos.
+
27 namespace operation { // geos.operation.
+
28 namespace relateng { // geos.operation.relateng
29 
30 
-
31 namespace geos { // geos.
-
32 namespace operation { // geos.operation.
-
33 namespace relateng { // geos.operation.relateng
+
31 class GEOS_DLL RelatePredicate {
+
32  using Envelope = geos::geom::Envelope;
+
33  using Location = geos::geom::Location;
34 
-
35 
-
36 class GEOS_DLL RelatePredicate {
-
37 
-
38 public:
-
39 
-
40 /************************************************************************
-
41  *
-
42  * Creates a predicate to determine whether two geometries intersect.
-
43  *
-
44  * The intersects predicate has the following equivalent definitions:
-
45  *
-
46  * * The two geometries have at least one point in common
-
47  * * The DE-9IM Intersection Matrix for the two geometries matches
-
48  * at least one of the patterns
-
49  *
-
50  * [T********]
-
51  * [*T*******]
-
52  * [***T*****]
-
53  * [****T****]
+
35 public:
+
36 
+
37 /************************************************************************
+
38  *
+
39  * Creates a predicate to determine whether two geometries intersect.
+
40  *
+
41  * The intersects predicate has the following equivalent definitions:
+
42  *
+
43  * * The two geometries have at least one point in common
+
44  * * The DE-9IM Intersection Matrix for the two geometries matches
+
45  * at least one of the patterns
+
46  *
+
47  * [T********]
+
48  * [*T*******]
+
49  * [***T*****]
+
50  * [****T****]
+
51  *
+
52  * disjoint() = false
+
53  * (intersects is the inverse of disjoint)
54  *
-
55  * disjoint() = false
-
56  * (intersects is the inverse of disjoint)
-
57  *
-
58  * @return the predicate instance
-
59  *
-
60  * @see disjoint()
-
61  */
-
62 class IntersectsPredicate : public BasicPredicate {
-
63 
-
64 public:
-
65 
-
66  std::string name() const override {
-
67  return std::string("intersects");
-
68  }
-
69 
-
70  bool requireSelfNoding() const override {
-
71  //-- self-noding is not required to check for a simple interaction
-
72  return false;
-
73  }
-
74 
-
75  bool requireExteriorCheck(bool isSourceA) const override {
-
76  (void)isSourceA;
-
77  //-- intersects only requires testing interaction
-
78  return false;
-
79  }
-
80 
-
81  void init(const Envelope& envA, const Envelope& envB) override {
-
82  require(envA.intersects(envB));
-
83  }
-
84 
-
85  void updateDimension(Location locA, Location locB, int dimension) override {
-
86  (void)dimension;
-
87  setValueIf(true, isIntersection(locA, locB));
-
88  }
-
89 
-
90  void finish() override {
-
91  //-- if no intersecting locations were found
-
92  setValue(false);
-
93  }
-
94 
-
95 };
-
96 
-
97 static std::unique_ptr<BasicPredicate> intersects();
-
98 
-
99 /************************************************************************
-
100  *
-
101  * Creates a predicate to determine whether two geometries are disjoint.
-
102  *
-
103  * The disjoint predicate has the following equivalent definitions:
-
104  *
-
105  * * The two geometries have no point in common
-
106  * * The DE-9IM Intersection Matrix for the two geometries matches
-
107  * [FF*FF****]
-
108  * * intersects() = false
-
109  * (disjoint is the inverse of intersects)
-
110  *
-
111  * @return the predicate instance
-
112  *
-
113  * @see intersects()
-
114  */
-
115 class DisjointPredicate : public BasicPredicate {
-
116 
-
117  std::string name() const override {
-
118  return std::string("disjoint");
-
119  }
-
120 
-
121  bool requireSelfNoding() const override {
-
122  //-- self-noding is not required to check for a simple interaction
-
123  return false;
-
124  }
-
125 
-
126  bool requireInteraction() const override {
-
127  //-- ensure entire matrix is computed
-
128  return false;
-
129  }
-
130 
-
131  bool requireExteriorCheck(bool isSourceA) const override {
-
132  (void)isSourceA;
-
133  //-- intersects only requires testing interaction
-
134  return false;
-
135  }
-
136 
-
137  void init(const Envelope& envA, const Envelope& envB) override {
-
138  setValueIf(true, envA.disjoint(envB));
-
139  }
-
140 
-
141  void updateDimension(Location locA, Location locB, int dimension) override {
-
142  (void)dimension;
-
143  setValueIf(false, isIntersection(locA, locB));
-
144  }
-
145 
-
146  void finish() override {
-
147  //-- if no intersecting locations were found
-
148  setValue(true);
-
149  }
-
150 };
-
151 
-
152 static std::unique_ptr<BasicPredicate> disjoint();
-
153 
-
154 /************************************************************************
-
155  * Creates a predicate to determine whether a geometry contains another geometry.
-
156  *
-
157  * The contains predicate has the following equivalent definitions:
-
158  *
-
159  * * Every point of the other geometry is a point of this geometry,
-
160  * and the interiors of the two geometries have at least one point in common.
-
161  * * The DE-9IM Intersection Matrix for the two geometries matches
-
162  * the pattern
-
163  * [T*****FF*]
-
164  * * within(B, A) = true
-
165  * (contains is the converse of within)
-
166  *
-
167  * An implication of the definition is that "Geometries do not
-
168  * contain their boundary". In other words, if a geometry A is a subset of
-
169  * the points in the boundary of a geometry B, B.contains(A) = false.
-
170  * (As a concrete example, take A to be a LineString which lies in the boundary of a Polygon B.)
-
171  * For a predicate with similar behavior but avoiding
-
172  * this subtle limitation, see covers().
-
173  *
-
174  * @return the predicate instance
-
175  *
-
176  * @see within()
-
177  */
-
178 class ContainsPredicate : public IMPredicate {
-
179 
-
180  std::string name() const override {
-
181  return std::string("contains");
-
182  }
-
183 
-
184  bool requireCovers(bool isSourceA) override {
-
185  return isSourceA == RelateGeometry::GEOM_A;
-
186  }
-
187 
-
188  bool requireExteriorCheck(bool isSourceA) const override {
-
189  //-- only need to check B against Exterior of A
-
190  return isSourceA == RelateGeometry::GEOM_B;
-
191  }
-
192 
-
193  void init(int _dimA, int _dimB) override {
-
194  IMPredicate::init(_dimA, _dimB);
-
195  require(isDimsCompatibleWithCovers(dimA, dimB));
-
196  }
-
197 
-
198  void init(const Envelope& envA, const Envelope& envB) override {
-
199  BasicPredicate::requireCovers(envA, envB);
-
200  }
-
201 
-
202  bool isDetermined() const override {
-
203  return intersectsExteriorOf(RelateGeometry::GEOM_A);
-
204  }
-
205 
-
206  bool valueIM() override {
-
207  return intMatrix.isContains();
-
208  }
-
209 };
+
55  * @return the predicate instance
+
56  *
+
57  * @see disjoint()
+
58  */
+
59 class IntersectsPredicate : public BasicPredicate {
+
60 
+
61 public:
+
62 
+
63  std::string name() const override {
+
64  return std::string("intersects");
+
65  }
+
66 
+
67  bool requireSelfNoding() const override {
+
68  //-- self-noding is not required to check for a simple interaction
+
69  return false;
+
70  }
+
71 
+
72  bool requireExteriorCheck(bool isSourceA) const override {
+
73  (void)isSourceA;
+
74  //-- intersects only requires testing interaction
+
75  return false;
+
76  }
+
77 
+
78  void init(const Envelope& envA, const Envelope& envB) override {
+
79  require(envA.intersects(envB));
+
80  }
+
81 
+
82  void updateDimension(Location locA, Location locB, int dimension) override {
+
83  (void)dimension;
+
84  setValueIf(true, isIntersection(locA, locB));
+
85  }
+
86 
+
87  void finish() override {
+
88  //-- if no intersecting locations were found
+
89  setValue(false);
+
90  }
+
91 
+
92 };
+
93 
+
94 static std::unique_ptr<BasicPredicate> intersects();
+
95 
+
96 /************************************************************************
+
97  *
+
98  * Creates a predicate to determine whether two geometries are disjoint.
+
99  *
+
100  * The disjoint predicate has the following equivalent definitions:
+
101  *
+
102  * * The two geometries have no point in common
+
103  * * The DE-9IM Intersection Matrix for the two geometries matches
+
104  * [FF*FF****]
+
105  * * intersects() = false
+
106  * (disjoint is the inverse of intersects)
+
107  *
+
108  * @return the predicate instance
+
109  *
+
110  * @see intersects()
+
111  */
+
112 class DisjointPredicate : public BasicPredicate {
+
113 
+
114  std::string name() const override {
+
115  return std::string("disjoint");
+
116  }
+
117 
+
118  bool requireSelfNoding() const override {
+
119  //-- self-noding is not required to check for a simple interaction
+
120  return false;
+
121  }
+
122 
+
123  bool requireInteraction() const override {
+
124  //-- ensure entire matrix is computed
+
125  return false;
+
126  }
+
127 
+
128  bool requireExteriorCheck(bool isSourceA) const override {
+
129  (void)isSourceA;
+
130  //-- intersects only requires testing interaction
+
131  return false;
+
132  }
+
133 
+
134  void init(const Envelope& envA, const Envelope& envB) override {
+
135  setValueIf(true, envA.disjoint(envB));
+
136  }
+
137 
+
138  void updateDimension(Location locA, Location locB, int dimension) override {
+
139  (void)dimension;
+
140  setValueIf(false, isIntersection(locA, locB));
+
141  }
+
142 
+
143  void finish() override {
+
144  //-- if no intersecting locations were found
+
145  setValue(true);
+
146  }
+
147 };
+
148 
+
149 static std::unique_ptr<BasicPredicate> disjoint();
+
150 
+
151 /************************************************************************
+
152  * Creates a predicate to determine whether a geometry contains another geometry.
+
153  *
+
154  * The contains predicate has the following equivalent definitions:
+
155  *
+
156  * * Every point of the other geometry is a point of this geometry,
+
157  * and the interiors of the two geometries have at least one point in common.
+
158  * * The DE-9IM Intersection Matrix for the two geometries matches
+
159  * the pattern
+
160  * [T*****FF*]
+
161  * * within(B, A) = true
+
162  * (contains is the converse of within)
+
163  *
+
164  * An implication of the definition is that "Geometries do not
+
165  * contain their boundary". In other words, if a geometry A is a subset of
+
166  * the points in the boundary of a geometry B, B.contains(A) = false.
+
167  * (As a concrete example, take A to be a LineString which lies in the boundary of a Polygon B.)
+
168  * For a predicate with similar behavior but avoiding
+
169  * this subtle limitation, see covers().
+
170  *
+
171  * @return the predicate instance
+
172  *
+
173  * @see within()
+
174  */
+
175 class ContainsPredicate : public IMPredicate {
+
176 
+
177  std::string name() const override {
+
178  return std::string("contains");
+
179  }
+
180 
+
181  bool requireCovers(bool isSourceA) override {
+
182  return isSourceA == RelateGeometry::GEOM_A;
+
183  }
+
184 
+
185  bool requireExteriorCheck(bool isSourceA) const override {
+
186  //-- only need to check B against Exterior of A
+
187  return isSourceA == RelateGeometry::GEOM_B;
+
188  }
+
189 
+
190  void init(int _dimA, int _dimB) override {
+
191  IMPredicate::init(_dimA, _dimB);
+
192  require(isDimsCompatibleWithCovers(dimA, dimB));
+
193  }
+
194 
+
195  void init(const Envelope& envA, const Envelope& envB) override {
+
196  BasicPredicate::requireCovers(envA, envB);
+
197  }
+
198 
+
199  bool isDetermined() const override {
+
200  return intersectsExteriorOf(RelateGeometry::GEOM_A);
+
201  }
+
202 
+
203  bool valueIM() override {
+
204  return intMatrix.isContains();
+
205  }
+
206 };
+
207 
+
208 static std::unique_ptr<IMPredicate> contains();
+
209 
210 
-
211 static std::unique_ptr<IMPredicate> contains();
-
212 
-
213 
-
214 
-
215 /************************************************************************
-
216  * Creates a predicate to determine whether a geometry is within another geometry.
-
217  *
-
218  * The within predicate has the following equivalent definitions:
-
219  *
-
220  * * Every point of this geometry is a point of the other geometry,
-
221  * and the interiors of the two geometries have at least one point in common.
-
222  * * The DE-9IM Intersection Matrix for the two geometries matches
-
223  * [T*F**F***]
-
224  * * contains(B, A) = true
-
225  * (within is the converse of contains())
-
226  *
-
227  * An implication of the definition is that
-
228  * "The boundary of a Geometry is not within the Geometry".
-
229  * In other words, if a geometry A is a subset of
-
230  * the points in the boundary of a geometry B, within(B, A) = false
-
231  * (As a concrete example, take A to be a LineString which lies in the boundary of a Polygon B.)
-
232  * For a predicate with similar behavior but avoiding
-
233  * this subtle limitation, see coveredimBy().
-
234  *
-
235  * @return the predicate instance
-
236  *
-
237  * @see #contains()
-
238  */
-
239 class WithinPredicate : public IMPredicate {
-
240 
-
241  std::string name() const override {
-
242  return std::string("within");
-
243  }
-
244 
-
245  bool requireCovers(bool isSourceA) override {
-
246  return isSourceA == RelateGeometry::GEOM_B;
-
247  }
-
248 
-
249  bool requireExteriorCheck(bool isSourceA) const override {
-
250  //-- only need to check B against Exterior of A
-
251  return isSourceA == RelateGeometry::GEOM_A;
-
252  }
-
253 
-
254  void init(int _dimA, int _dimB) override {
-
255  IMPredicate::init(_dimA, _dimB);
-
256  require(isDimsCompatibleWithCovers(dimB, dimA));
-
257  }
-
258 
-
259  void init(const Envelope& envA, const Envelope& envB) override {
-
260  BasicPredicate::requireCovers(envB, envA);
-
261  }
-
262 
-
263  bool isDetermined() const override {
-
264  return intersectsExteriorOf(RelateGeometry::GEOM_B);
-
265  }
-
266 
-
267  bool valueIM() override {
-
268  return intMatrix.isWithin();
-
269  }
-
270 };
+
211 
+
212 /************************************************************************
+
213  * Creates a predicate to determine whether a geometry is within another geometry.
+
214  *
+
215  * The within predicate has the following equivalent definitions:
+
216  *
+
217  * * Every point of this geometry is a point of the other geometry,
+
218  * and the interiors of the two geometries have at least one point in common.
+
219  * * The DE-9IM Intersection Matrix for the two geometries matches
+
220  * [T*F**F***]
+
221  * * contains(B, A) = true
+
222  * (within is the converse of contains())
+
223  *
+
224  * An implication of the definition is that
+
225  * "The boundary of a Geometry is not within the Geometry".
+
226  * In other words, if a geometry A is a subset of
+
227  * the points in the boundary of a geometry B, within(B, A) = false
+
228  * (As a concrete example, take A to be a LineString which lies in the boundary of a Polygon B.)
+
229  * For a predicate with similar behavior but avoiding
+
230  * this subtle limitation, see coveredimBy().
+
231  *
+
232  * @return the predicate instance
+
233  *
+
234  * @see #contains()
+
235  */
+
236 class WithinPredicate : public IMPredicate {
+
237 
+
238  std::string name() const override {
+
239  return std::string("within");
+
240  }
+
241 
+
242  bool requireCovers(bool isSourceA) override {
+
243  return isSourceA == RelateGeometry::GEOM_B;
+
244  }
+
245 
+
246  bool requireExteriorCheck(bool isSourceA) const override {
+
247  //-- only need to check B against Exterior of A
+
248  return isSourceA == RelateGeometry::GEOM_A;
+
249  }
+
250 
+
251  void init(int _dimA, int _dimB) override {
+
252  IMPredicate::init(_dimA, _dimB);
+
253  require(isDimsCompatibleWithCovers(dimB, dimA));
+
254  }
+
255 
+
256  void init(const Envelope& envA, const Envelope& envB) override {
+
257  BasicPredicate::requireCovers(envB, envA);
+
258  }
+
259 
+
260  bool isDetermined() const override {
+
261  return intersectsExteriorOf(RelateGeometry::GEOM_B);
+
262  }
+
263 
+
264  bool valueIM() override {
+
265  return intMatrix.isWithin();
+
266  }
+
267 };
+
268 
+
269 static std::unique_ptr<IMPredicate> within();
+
270 
271 
-
272 static std::unique_ptr<IMPredicate> within();
-
273 
-
274 
-
275 
-
276 /************************************************************************
-
277  * Creates a predicate to determine whether a geometry covers another geometry.
-
278  *
-
279  * The covers predicate has the following equivalent definitions:
-
280  *
-
281  * Every point of the other geometry is a point of this geometry.
-
282  * The DE-9IM Intersection Matrix for the two geometries matches
-
283  * at least one of the following patterns:
-
284  *
-
285  * * [T*****FF*]
-
286  * * [*T****FF*]
-
287  * * [***T**FF*]
-
288  * * [****T*FF*]
+
272 
+
273 /************************************************************************
+
274  * Creates a predicate to determine whether a geometry covers another geometry.
+
275  *
+
276  * The covers predicate has the following equivalent definitions:
+
277  *
+
278  * Every point of the other geometry is a point of this geometry.
+
279  * The DE-9IM Intersection Matrix for the two geometries matches
+
280  * at least one of the following patterns:
+
281  *
+
282  * * [T*****FF*]
+
283  * * [*T****FF*]
+
284  * * [***T**FF*]
+
285  * * [****T*FF*]
+
286  *
+
287  * coveredimBy(b, a) = true
+
288  * (covers is the converse of coveredimBy())
289  *
-
290  * coveredimBy(b, a) = true
-
291  * (covers is the converse of coveredimBy())
-
292  *
-
293  * If either geometry is empty, the value of this predicate is false.
-
294  *
-
295  * This predicate is similar to contains(),
-
296  * but is more inclusive (i.e. returns true for more cases).
-
297  * In particular, unlike contains it does not distinguish between
-
298  * points in the boundary and in the interior of geometries.
-
299  * For most cases, covers should be used in preference to contains.
-
300  * As an added benefit, covers is more amenable to optimization,
-
301  * and hence should be more performant.
-
302  *
-
303  * @return the predicate instance
-
304  *
-
305  * @see #coveredimBy()
-
306  */
-
307 class CoversPredicate : public IMPredicate {
-
308 
-
309  std::string name() const override {
-
310  return std::string("covers");
-
311  }
-
312 
-
313  bool requireCovers(bool isSourceA) override {
-
314  return isSourceA == RelateGeometry::GEOM_A;
-
315  }
-
316 
-
317  bool requireExteriorCheck(bool isSourceA) const override {
-
318  //-- only need to check B against Exterior of A
-
319  return isSourceA == RelateGeometry::GEOM_B;
-
320  }
-
321 
-
322  void init(int _dimA, int _dimB) override {
-
323  IMPredicate::init(_dimA, _dimB);
-
324  require(isDimsCompatibleWithCovers(dimA, dimB));
-
325  }
+
290  * If either geometry is empty, the value of this predicate is false.
+
291  *
+
292  * This predicate is similar to contains(),
+
293  * but is more inclusive (i.e. returns true for more cases).
+
294  * In particular, unlike contains it does not distinguish between
+
295  * points in the boundary and in the interior of geometries.
+
296  * For most cases, covers should be used in preference to contains.
+
297  * As an added benefit, covers is more amenable to optimization,
+
298  * and hence should be more performant.
+
299  *
+
300  * @return the predicate instance
+
301  *
+
302  * @see #coveredimBy()
+
303  */
+
304 class CoversPredicate : public IMPredicate {
+
305 
+
306  std::string name() const override {
+
307  return std::string("covers");
+
308  }
+
309 
+
310  bool requireCovers(bool isSourceA) override {
+
311  return isSourceA == RelateGeometry::GEOM_A;
+
312  }
+
313 
+
314  bool requireExteriorCheck(bool isSourceA) const override {
+
315  //-- only need to check B against Exterior of A
+
316  return isSourceA == RelateGeometry::GEOM_B;
+
317  }
+
318 
+
319  void init(int _dimA, int _dimB) override {
+
320  IMPredicate::init(_dimA, _dimB);
+
321  require(isDimsCompatibleWithCovers(dimA, dimB));
+
322  }
+
323 
+
324  void init(const Envelope& envA, const Envelope& envB) override {
+
325  BasicPredicate::requireCovers(envA, envB);
326 
-
327  void init(const Envelope& envA, const Envelope& envB) override {
-
328  BasicPredicate::requireCovers(envA, envB);
-
329 
-
330  }
-
331 
-
332  bool isDetermined() const override {
-
333  return intersectsExteriorOf(RelateGeometry::GEOM_A);
-
334  }
-
335 
-
336  bool valueIM() override {
-
337  return intMatrix.isCovers();
-
338  }
-
339 };
+
327  }
+
328 
+
329  bool isDetermined() const override {
+
330  return intersectsExteriorOf(RelateGeometry::GEOM_A);
+
331  }
+
332 
+
333  bool valueIM() override {
+
334  return intMatrix.isCovers();
+
335  }
+
336 };
+
337 
+
338 static std::unique_ptr<IMPredicate> covers();
+
339 
340 
-
341 static std::unique_ptr<IMPredicate> covers();
-
342 
-
343 
-
344 /************************************************************************
-
345 * Creates a predicate to determine whether a geometry is covered
-
346 * by another geometry.
-
347 *
-
348 * The coveredimBy predicate has the following equivalent definitions:
-
349 *
-
350 * Every point of this geometry is a point of the other geometry.
-
351 * The DE-9IM Intersection Matrix for the two geometries matches
-
352 * at least one of the following patterns:
-
353 *
-
354 * [T*F**F***]
-
355 * [*TF**F***]
-
356 * [**FT*F***]
-
357 * [**F*TF***]
+
341 /************************************************************************
+
342 * Creates a predicate to determine whether a geometry is covered
+
343 * by another geometry.
+
344 *
+
345 * The coveredimBy predicate has the following equivalent definitions:
+
346 *
+
347 * Every point of this geometry is a point of the other geometry.
+
348 * The DE-9IM Intersection Matrix for the two geometries matches
+
349 * at least one of the following patterns:
+
350 *
+
351 * [T*F**F***]
+
352 * [*TF**F***]
+
353 * [**FT*F***]
+
354 * [**F*TF***]
+
355 *
+
356 * covers(B, A) = true
+
357 * (coveredimBy is the converse of covers())
358 *
-
359 * covers(B, A) = true
-
360 * (coveredimBy is the converse of covers())
-
361 *
-
362 * If either geometry is empty, the value of this predicate is false.
+
359 * If either geometry is empty, the value of this predicate is false.
+
360 *
+
361 * This predicate is similar to within(),
+
362 * but is more inclusive (i.e. returns true for more cases).
363 *
-
364 * This predicate is similar to within(),
-
365 * but is more inclusive (i.e. returns true for more cases).
-
366 *
-
367 * @return the predicate instance
-
368 *
-
369 * @see #covers()
-
370 */
-
371 class CoveredByPredicate : public IMPredicate {
-
372 
-
373  std::string name() const override {
-
374  return std::string("coveredBy");
-
375  }
-
376 
-
377  bool requireCovers(bool isSourceA) override {
-
378  return isSourceA == RelateGeometry::GEOM_B;
-
379  }
-
380 
-
381  bool requireExteriorCheck(bool isSourceA) const override {
-
382  //-- only need to check B against Exterior of A
-
383  return isSourceA == RelateGeometry::GEOM_A;
-
384  }
-
385 
-
386  void init(int _dimA, int _dimB) override {
-
387  IMPredicate::init(_dimA, _dimB);
-
388  require(isDimsCompatibleWithCovers(dimB, dimA));
-
389  }
-
390 
-
391  void init(const Envelope& envA, const Envelope& envB) override {
-
392  BasicPredicate::requireCovers(envB, envA);
-
393  }
-
394 
-
395  bool isDetermined() const override {
-
396  return intersectsExteriorOf(RelateGeometry::GEOM_B);
-
397  }
-
398 
-
399  bool valueIM() override {
-
400  return intMatrix.isCoveredBy();
-
401  }
-
402 
-
403 };
+
364 * @return the predicate instance
+
365 *
+
366 * @see #covers()
+
367 */
+
368 class CoveredByPredicate : public IMPredicate {
+
369 
+
370  std::string name() const override {
+
371  return std::string("coveredBy");
+
372  }
+
373 
+
374  bool requireCovers(bool isSourceA) override {
+
375  return isSourceA == RelateGeometry::GEOM_B;
+
376  }
+
377 
+
378  bool requireExteriorCheck(bool isSourceA) const override {
+
379  //-- only need to check B against Exterior of A
+
380  return isSourceA == RelateGeometry::GEOM_A;
+
381  }
+
382 
+
383  void init(int _dimA, int _dimB) override {
+
384  IMPredicate::init(_dimA, _dimB);
+
385  require(isDimsCompatibleWithCovers(dimB, dimA));
+
386  }
+
387 
+
388  void init(const Envelope& envA, const Envelope& envB) override {
+
389  BasicPredicate::requireCovers(envB, envA);
+
390  }
+
391 
+
392  bool isDetermined() const override {
+
393  return intersectsExteriorOf(RelateGeometry::GEOM_B);
+
394  }
+
395 
+
396  bool valueIM() override {
+
397  return intMatrix.isCoveredBy();
+
398  }
+
399 
+
400 };
+
401 
+
402 static std::unique_ptr<IMPredicate> coveredBy();
+
403 
404 
-
405 static std::unique_ptr<IMPredicate> coveredBy();
-
406 
-
407 
-
408 /************************************************************************
-
409 * Creates a predicate to determine whether a geometry crosses another geometry.
-
410 *
-
411 * The crosses predicate has the following equivalent definitions:
-
412 *
-
413 * The geometries have some but not all interior points in common.
-
414 * The DE-9IM Intersection Matrix for the two geometries matches
-
415 * one of the following patterns:
-
416 *
-
417 * [T*T******] (for P/L, P/A, and L/A cases)
-
418 * [T*****T**] (for L/P, A/P, and A/L cases)
-
419 * [0********] (for L/L cases)
+
405 /************************************************************************
+
406 * Creates a predicate to determine whether a geometry crosses another geometry.
+
407 *
+
408 * The crosses predicate has the following equivalent definitions:
+
409 *
+
410 * The geometries have some but not all interior points in common.
+
411 * The DE-9IM Intersection Matrix for the two geometries matches
+
412 * one of the following patterns:
+
413 *
+
414 * [T*T******] (for P/L, P/A, and L/A cases)
+
415 * [T*****T**] (for L/P, A/P, and A/L cases)
+
416 * [0********] (for L/L cases)
+
417 *
+
418 *
+
419 * For the A/A and P/P cases this predicate returns false.
420 *
-
421 *
-
422 * For the A/A and P/P cases this predicate returns false.
-
423 *
-
424 * The SFS defined this predicate only for P/L, P/A, L/L, and L/A cases.
-
425 * To make the relation symmetric
-
426 * JTS extends the definition to apply to L/P, A/P and A/L cases as well.
-
427 *
-
428 * @return the predicate instance
-
429 */
-
430 
-
431 class CrossesPredicate : public IMPredicate {
-
432 
-
433  std::string name() const override {
-
434  return std::string("crosses");
-
435  }
-
436 
-
437  void init(int _dimA, int _dimB) override {
-
438  IMPredicate::init(_dimA, _dimB);
-
439  bool isBothPointsOrAreas =
-
440  (dimA == Dimension::P && dimB == Dimension::P) ||
-
441  (dimA == Dimension::A && dimB == Dimension::A);
-
442  require(!isBothPointsOrAreas);
-
443  }
-
444 
-
445  bool isDetermined() const override {
-
446  if (dimA == Dimension::L && dimB == Dimension::L) {
-
447  //-- L/L interaction can only be dim = P
-
448  if (getDimension(Location::INTERIOR, Location::INTERIOR) > Dimension::P)
-
449  return true;
-
450  }
-
451  else if (dimA < dimB) {
-
452  if (isIntersects(Location::INTERIOR, Location::INTERIOR) &&
-
453  isIntersects(Location::INTERIOR, Location::EXTERIOR)) {
-
454  return true;
-
455  }
-
456  }
-
457  else if (dimA > dimB) {
-
458  if (isIntersects(Location::INTERIOR, Location::INTERIOR) &&
-
459  isIntersects(Location::EXTERIOR, Location::INTERIOR)) {
-
460  return true;
-
461  }
-
462  }
-
463  return false;
-
464  }
-
465 
-
466  bool valueIM() override {
-
467  return intMatrix.isCrosses(dimA, dimB);
-
468  }
-
469 };
+
421 * The SFS defined this predicate only for P/L, P/A, L/L, and L/A cases.
+
422 * To make the relation symmetric
+
423 * JTS extends the definition to apply to L/P, A/P and A/L cases as well.
+
424 *
+
425 * @return the predicate instance
+
426 */
+
427 
+
428 class CrossesPredicate : public IMPredicate {
+
429 
+
430  std::string name() const override {
+
431  return std::string("crosses");
+
432  }
+
433 
+
434  void init(int _dimA, int _dimB) override {
+
435  IMPredicate::init(_dimA, _dimB);
+
436  bool isBothPointsOrAreas =
+
437  (dimA == Dimension::P && dimB == Dimension::P) ||
+
438  (dimA == Dimension::A && dimB == Dimension::A);
+
439  require(!isBothPointsOrAreas);
+
440  }
+
441 
+
442  bool isDetermined() const override {
+
443  if (dimA == Dimension::L && dimB == Dimension::L) {
+
444  //-- L/L interaction can only be dim = P
+
445  if (getDimension(Location::INTERIOR, Location::INTERIOR) > Dimension::P)
+
446  return true;
+
447  }
+
448  else if (dimA < dimB) {
+
449  if (isIntersects(Location::INTERIOR, Location::INTERIOR) &&
+
450  isIntersects(Location::INTERIOR, Location::EXTERIOR)) {
+
451  return true;
+
452  }
+
453  }
+
454  else if (dimA > dimB) {
+
455  if (isIntersects(Location::INTERIOR, Location::INTERIOR) &&
+
456  isIntersects(Location::EXTERIOR, Location::INTERIOR)) {
+
457  return true;
+
458  }
+
459  }
+
460  return false;
+
461  }
+
462 
+
463  bool valueIM() override {
+
464  return intMatrix.isCrosses(dimA, dimB);
+
465  }
+
466 };
+
467 
+
468 static std::unique_ptr<IMPredicate> crosses();
+
469 
470 
-
471 static std::unique_ptr<IMPredicate> crosses();
-
472 
-
473 
-
474 /************************************************************************
-
475 * Creates a predicate to determine whether two geometries are
-
476 * topologically equal.
-
477 *
-
478 * The equals predicate has the following equivalent definitions:
-
479 *
-
480 * The two geometries have at least one point in common,
-
481 * and no point of either geometry lies in the exterior of the other geometry.
-
482 * The DE-9IM Intersection Matrix for the two geometries matches
-
483 * the pattern T*F**FFF*
-
484 *
-
485 * @return the predicate instance
-
486 */
-
487 class EqualsTopoPredicate : public IMPredicate {
-
488 
-
489  std::string name() const override {
-
490  return std::string("equals");
-
491  }
-
492 
-
493  bool requireInteraction() const override {
-
494  //-- allow EMPTY = EMPTY
-
495  return false;
-
496  };
-
497 
-
498  void init(int _dimA, int _dimB) override {
-
499  IMPredicate::init(_dimA, _dimB);
-
500  //-- don't require equal dims, because EMPTY = EMPTY for all dims
-
501  }
-
502 
-
503  void init(const Envelope& envA, const Envelope& envB) override {
-
504  //-- handle EMPTY = EMPTY cases
-
505  setValueIf(true, envA.isNull() && envB.isNull());
+
471 /************************************************************************
+
472 * Creates a predicate to determine whether two geometries are
+
473 * topologically equal.
+
474 *
+
475 * The equals predicate has the following equivalent definitions:
+
476 *
+
477 * The two geometries have at least one point in common,
+
478 * and no point of either geometry lies in the exterior of the other geometry.
+
479 * The DE-9IM Intersection Matrix for the two geometries matches
+
480 * the pattern T*F**FFF*
+
481 *
+
482 * @return the predicate instance
+
483 */
+
484 class EqualsTopoPredicate : public IMPredicate {
+
485 
+
486  std::string name() const override {
+
487  return std::string("equals");
+
488  }
+
489 
+
490  bool requireInteraction() const override {
+
491  //-- allow EMPTY = EMPTY
+
492  return false;
+
493  };
+
494 
+
495  void init(int _dimA, int _dimB) override {
+
496  IMPredicate::init(_dimA, _dimB);
+
497  //-- don't require equal dims, because EMPTY = EMPTY for all dims
+
498  }
+
499 
+
500  void init(const Envelope& envA, const Envelope& envB) override {
+
501  //-- handle EMPTY = EMPTY cases
+
502  setValueIf(true, envA.isNull() && envB.isNull());
+
503 
+
504  require(envA.equals(&envB));
+
505  }
506 
-
507  require(envA.equals(&envB));
-
508  }
-
509 
-
510  bool isDetermined() const override {
-
511  bool isEitherExteriorIntersects =
-
512  isIntersects(Location::INTERIOR, Location::EXTERIOR) ||
-
513  isIntersects(Location::BOUNDARY, Location::EXTERIOR) ||
-
514  isIntersects(Location::EXTERIOR, Location::INTERIOR) ||
-
515  isIntersects(Location::EXTERIOR, Location::BOUNDARY);
+
507  bool isDetermined() const override {
+
508  bool isEitherExteriorIntersects =
+
509  isIntersects(Location::INTERIOR, Location::EXTERIOR) ||
+
510  isIntersects(Location::BOUNDARY, Location::EXTERIOR) ||
+
511  isIntersects(Location::EXTERIOR, Location::INTERIOR) ||
+
512  isIntersects(Location::EXTERIOR, Location::BOUNDARY);
+
513 
+
514  return isEitherExteriorIntersects;
+
515  }
516 
-
517  return isEitherExteriorIntersects;
-
518  }
-
519 
-
520  bool valueIM() override {
-
521  return intMatrix.isEquals(dimA, dimB);
-
522  }
-
523 
-
524 };
+
517  bool valueIM() override {
+
518  return intMatrix.isEquals(dimA, dimB);
+
519  }
+
520 
+
521 };
+
522 
+
523 static std::unique_ptr<IMPredicate> equalsTopo();
+
524 
525 
-
526 static std::unique_ptr<IMPredicate> equalsTopo();
-
527 
-
528 
-
529 /************************************************************************
-
530  * Creates a predicate to determine whether a geometry overlaps another geometry.
-
531  *
-
532  * The overlaps predicate has the following equivalent definitions:
-
533  *
-
534  * The geometries have at least one point each not shared by the other
-
535  * (or equivalently neither covers the other),
-
536  * they have the same dimension,
-
537  * and the intersection of the interiors of the two geometries has
-
538  * the same dimension as the geometries themselves.
-
539  * The DE-9IM Intersection Matrix for the two geometries matches
-
540  * [T*T***T**] (for P/P and A/A cases)
-
541  * or [1*T***T**] (for L/L cases)
+
526 /************************************************************************
+
527  * Creates a predicate to determine whether a geometry overlaps another geometry.
+
528  *
+
529  * The overlaps predicate has the following equivalent definitions:
+
530  *
+
531  * The geometries have at least one point each not shared by the other
+
532  * (or equivalently neither covers the other),
+
533  * they have the same dimension,
+
534  * and the intersection of the interiors of the two geometries has
+
535  * the same dimension as the geometries themselves.
+
536  * The DE-9IM Intersection Matrix for the two geometries matches
+
537  * [T*T***T**] (for P/P and A/A cases)
+
538  * or [1*T***T**] (for L/L cases)
+
539  *
+
540  * If the geometries are of different dimension this predicate returns false.
+
541  * This predicate is symmetric.
542  *
-
543  * If the geometries are of different dimension this predicate returns false.
-
544  * This predicate is symmetric.
-
545  *
-
546  * @return the predicate instance
-
547  */
-
548 class OverlapsPredicate : public IMPredicate {
-
549 
-
550  std::string name() const override {
-
551  return std::string("overlaps");
-
552  }
-
553 
-
554  void init(int _dimA, int _dimB) override {
-
555  IMPredicate::init(_dimA, _dimB);
-
556  require(dimA == dimB);
-
557  }
-
558 
-
559  bool isDetermined() const override {
-
560  if (dimA == Dimension::A || dimA == Dimension::P) {
-
561  if (isIntersects(Location::INTERIOR, Location::INTERIOR) &&
-
562  isIntersects(Location::INTERIOR, Location::EXTERIOR) &&
-
563  isIntersects(Location::EXTERIOR, Location::INTERIOR))
-
564  return true;
-
565  }
-
566  if (dimA == Dimension::L) {
-
567  if (isDimension(Location::INTERIOR, Location::INTERIOR, Dimension::L) &&
-
568  isIntersects(Location::INTERIOR, Location::EXTERIOR) &&
-
569  isIntersects(Location::EXTERIOR, Location::INTERIOR))
-
570  return true;
-
571  }
-
572  return false;
-
573  }
-
574 
-
575  bool valueIM() override {
-
576  return intMatrix.isOverlaps(dimA, dimB);
-
577  }
-
578 };
+
543  * @return the predicate instance
+
544  */
+
545 class OverlapsPredicate : public IMPredicate {
+
546 
+
547  std::string name() const override {
+
548  return std::string("overlaps");
+
549  }
+
550 
+
551  void init(int _dimA, int _dimB) override {
+
552  IMPredicate::init(_dimA, _dimB);
+
553  require(dimA == dimB);
+
554  }
+
555 
+
556  bool isDetermined() const override {
+
557  if (dimA == Dimension::A || dimA == Dimension::P) {
+
558  if (isIntersects(Location::INTERIOR, Location::INTERIOR) &&
+
559  isIntersects(Location::INTERIOR, Location::EXTERIOR) &&
+
560  isIntersects(Location::EXTERIOR, Location::INTERIOR))
+
561  return true;
+
562  }
+
563  if (dimA == Dimension::L) {
+
564  if (isDimension(Location::INTERIOR, Location::INTERIOR, Dimension::L) &&
+
565  isIntersects(Location::INTERIOR, Location::EXTERIOR) &&
+
566  isIntersects(Location::EXTERIOR, Location::INTERIOR))
+
567  return true;
+
568  }
+
569  return false;
+
570  }
+
571 
+
572  bool valueIM() override {
+
573  return intMatrix.isOverlaps(dimA, dimB);
+
574  }
+
575 };
+
576 
+
577 static std::unique_ptr<IMPredicate> overlaps();
+
578 
579 
-
580 static std::unique_ptr<IMPredicate> overlaps();
+
580 
581 
582 
-
583 
-
584 
-
585 
-
586 /************************************************************************
-
587 * Creates a predicate to determine whether a geometry touches another geometry.
-
588 *
-
589 * The touches predicate has the following equivalent definitions:
-
590 *
-
591 * The geometries have at least one point in common,
-
592 * but their interiors do not intersect.
-
593 * The DE-9IM Intersection Matrix for the two geometries matches
-
594 * at least one of the following patterns
-
595 *
-
596 * [FT*******]
-
597 * [F**T*****]
-
598 * [F***T****]
-
599 *
-
600 *
-
601 * If both geometries have dimension 0, the predicate returns false,
-
602 * since points have only interiors.
-
603 * This predicate is symmetric.
-
604 *
-
605 * @return the predicate instance
-
606 */
-
607 class TouchesPredicate : public IMPredicate {
-
608 
-
609  std::string name() const override {
-
610  return std::string("touches");
-
611  }
-
612 
-
613  void init(int _dimA, int _dimB) override {
-
614  IMPredicate::init(_dimA, _dimB);
-
615  bool isBothPoints = (dimA == 0 && dimB == 0);
-
616  require(! isBothPoints);
-
617  }
-
618 
-
619  bool isDetermined() const override {
-
620  bool isInteriorsIntersects = isIntersects(Location::INTERIOR, Location::INTERIOR);
-
621  return isInteriorsIntersects;
-
622  }
-
623 
-
624  bool valueIM() override {
-
625  return intMatrix.isTouches(dimA, dimB);
-
626  }
-
627 };
-
628 
-
629 static std::unique_ptr<IMPredicate> touches();
-
630 
-
639 static std::unique_ptr<TopologyPredicate> matches(const std::string& imPattern)
-
640 {
-
641  return std::unique_ptr<TopologyPredicate>(new IMPatternMatcher(imPattern));
-
642 }
-
643 
+
583 /************************************************************************
+
584 * Creates a predicate to determine whether a geometry touches another geometry.
+
585 *
+
586 * The touches predicate has the following equivalent definitions:
+
587 *
+
588 * The geometries have at least one point in common,
+
589 * but their interiors do not intersect.
+
590 * The DE-9IM Intersection Matrix for the two geometries matches
+
591 * at least one of the following patterns
+
592 *
+
593 * [FT*******]
+
594 * [F**T*****]
+
595 * [F***T****]
+
596 *
+
597 *
+
598 * If both geometries have dimension 0, the predicate returns false,
+
599 * since points have only interiors.
+
600 * This predicate is symmetric.
+
601 *
+
602 * @return the predicate instance
+
603 */
+
604 class TouchesPredicate : public IMPredicate {
+
605 
+
606  std::string name() const override {
+
607  return std::string("touches");
+
608  }
+
609 
+
610  void init(int _dimA, int _dimB) override {
+
611  IMPredicate::init(_dimA, _dimB);
+
612  bool isBothPoints = (dimA == 0 && dimB == 0);
+
613  require(! isBothPoints);
+
614  }
+
615 
+
616  bool isDetermined() const override {
+
617  bool isInteriorsIntersects = isIntersects(Location::INTERIOR, Location::INTERIOR);
+
618  return isInteriorsIntersects;
+
619  }
+
620 
+
621  bool valueIM() override {
+
622  return intMatrix.isTouches(dimA, dimB);
+
623  }
+
624 };
+
625 
+
626 static std::unique_ptr<IMPredicate> touches();
+
627 
+
636 static std::unique_ptr<TopologyPredicate> matches(const std::string& imPattern)
+
637 {
+
638  return std::unique_ptr<TopologyPredicate>(new IMPatternMatcher(imPattern));
+
639 }
+
640 
+
641 
+
642 
+
643 }; // !RelatePredicate
644 
645 
-
646 }; // !RelatePredicate
-
647 
-
648 
-
649 } // namespace geos.operation.relateng
-
650 } // namespace geos.operation
-
651 } // namespace geos
-
652 
-
@ A
Dimension value of a surface (2).
Definition: Dimension.h:46
-
@ L
Dimension value of a curve (1).
Definition: Dimension.h:43
-
@ P
Dimension value of a point (0).
Definition: Dimension.h:40
+
646 } // namespace geos.operation.relateng
+
647 } // namespace geos.operation
+
648 } // namespace geos
+
649 
An Envelope defines a rectangulare region of the 2D coordinate plane.
Definition: Envelope.h:59
-
bool equals(const Envelope *other) const
Returns true if the Envelope other spatially equals this Envelope.
-
static bool intersects(const CoordinateXY &p1, const CoordinateXY &p2, const CoordinateXY &q)
Test the point q to see whether it intersects the Envelope defined by p1-p2.
-
bool isNull(void) const
Returns true if this Envelope is a "null" envelope.
Definition: Envelope.h:252
-
bool disjoint(const Envelope &other) const
Definition: Envelope.h:596
Location
Constants representing the location of a point relative to a geometry.
Definition: Location.h:32
-
@ EXTERIOR
Basic namespace for all GEOS functionalities.
Definition: Angle.h:25
diff --git a/doxygen/RelateSegmentString_8h_source.html b/doxygen/RelateSegmentString_8h_source.html index fed1b06499..7a2bd1e083 100644 --- a/doxygen/RelateSegmentString_8h_source.html +++ b/doxygen/RelateSegmentString_8h_source.html @@ -76,8 +76,8 @@
27 namespace geos {
28 namespace geom {
29  class CoordinateXY;
-
30  class CoordinateSequence;
-
31  class Geometry;
+
30  class CoordinateSequence;
+
31  class Geometry;
32 }
33 namespace operation {
34 namespace relateng {
@@ -87,100 +87,97 @@
38 }
39 }
40 
-
41 
-
42 using geos::noding::BasicSegmentString;
-
43 using geos::geom::Geometry;
-
44 using geos::geom::CoordinateXY;
-
45 using geos::geom::CoordinateSequence;
+
41 namespace geos { // geos.
+
42 namespace operation { // geos.operation
+
43 namespace relateng { // geos.operation.relateng
+
44 
+
45 
46 
-
47 
-
48 namespace geos { // geos.
-
49 namespace operation { // geos.operation
-
50 namespace relateng { // geos.operation.relateng
-
51 
+
47 class GEOS_DLL RelateSegmentString : public geos::noding::BasicSegmentString {
+
48  using BasicSegmentString = geos::noding::BasicSegmentString;
+
49  using Geometry = geos::geom::Geometry;
+
50  using CoordinateXY = geos::geom::CoordinateXY;
+
51  using CoordinateSequence = geos::geom::CoordinateSequence;
52 
-
53 
-
54 class GEOS_DLL RelateSegmentString : public BasicSegmentString {
-
55 
-
56 private:
-
57 
-
58  // Members
-
59  bool m_isA;
-
60  int m_dimension;
-
61  int m_id;
-
62  int m_ringId;
-
63  const RelateGeometry* m_inputGeom;
-
64  const Geometry* m_parentPolygonal = nullptr;
-
65 
-
66  // Constructor
-
67  RelateSegmentString(
-
68  const CoordinateSequence* pts,
-
69  bool isA,
-
70  int dimension,
-
71  int id,
-
72  int ringId,
-
73  const Geometry* poly,
-
74  const RelateGeometry* inputGeom)
-
75  : BasicSegmentString(const_cast<CoordinateSequence*>(pts), nullptr)
-
76  , m_isA(isA)
-
77  , m_dimension(dimension)
-
78  , m_id(id)
-
79  , m_ringId(ringId)
-
80  , m_inputGeom(inputGeom)
-
81  , m_parentPolygonal(poly)
-
82  {}
+
53 private:
+
54 
+
55  // Members
+
56  bool m_isA;
+
57  int m_dimension;
+
58  int m_id;
+
59  int m_ringId;
+
60  const RelateGeometry* m_inputGeom;
+
61  const Geometry* m_parentPolygonal = nullptr;
+
62 
+
63  // Constructor
+
64  RelateSegmentString(
+
65  const CoordinateSequence* pts,
+
66  bool isA,
+
67  int dimension,
+
68  int id,
+
69  int ringId,
+
70  const Geometry* poly,
+
71  const RelateGeometry* inputGeom)
+
72  : BasicSegmentString(const_cast<CoordinateSequence*>(pts), nullptr)
+
73  , m_isA(isA)
+
74  , m_dimension(dimension)
+
75  , m_id(id)
+
76  , m_ringId(ringId)
+
77  , m_inputGeom(inputGeom)
+
78  , m_parentPolygonal(poly)
+
79  {}
+
80 
+
81 
+
82  // Methods
83 
-
84 
-
85  // Methods
-
86 
-
87  static const RelateSegmentString* createSegmentString(
-
88  const CoordinateSequence* pts,
-
89  bool isA, int dim, int elementId, int ringId,
-
90  const Geometry* poly, const RelateGeometry* parent);
-
91 
-
99  const CoordinateXY* prevVertex(
-
100  std::size_t segIndex,
-
101  const CoordinateXY* pt) const;
-
102 
-
109  const CoordinateXY* nextVertex(
-
110  std::size_t segIndex,
-
111  const CoordinateXY* pt) const;
+
84  static const RelateSegmentString* createSegmentString(
+
85  const CoordinateSequence* pts,
+
86  bool isA, int dim, int elementId, int ringId,
+
87  const Geometry* poly, const RelateGeometry* parent);
+
88 
+
96  const CoordinateXY* prevVertex(
+
97  std::size_t segIndex,
+
98  const CoordinateXY* pt) const;
+
99 
+
106  const CoordinateXY* nextVertex(
+
107  std::size_t segIndex,
+
108  const CoordinateXY* pt) const;
+
109 
+
110 
+
111 public:
112 
-
113 
-
114 public:
-
115 
-
116  static const RelateSegmentString* createLine(
-
117  const CoordinateSequence* pts,
-
118  bool isA, int elementId,
-
119  const RelateGeometry* parent);
-
120 
-
121  static const RelateSegmentString* createRing(
-
122  const CoordinateSequence* pts,
-
123  bool isA, int elementId, int ringId,
-
124  const Geometry* poly, const RelateGeometry* parent);
-
125 
-
126  inline bool isA() const {
-
127  return m_isA;
-
128  }
-
129 
-
130  inline const RelateGeometry* getGeometry() const {
-
131  return m_inputGeom;
-
132  }
-
133 
-
134  inline const Geometry* getPolygonal() const {
-
135  return m_parentPolygonal;
-
136  }
-
137 
-
138  NodeSection* createNodeSection(std::size_t segIndex, const CoordinateXY intPt) const;
-
139 
-
154  bool isContainingSegment(std::size_t segIndex, const CoordinateXY* pt) const;
-
155 
-
156 };
-
157 
-
158 } // namespace geos.operation.relateng
-
159 } // namespace geos.operation
-
160 } // namespace geos
-
161 
+
113  static const RelateSegmentString* createLine(
+
114  const CoordinateSequence* pts,
+
115  bool isA, int elementId,
+
116  const RelateGeometry* parent);
+
117 
+
118  static const RelateSegmentString* createRing(
+
119  const CoordinateSequence* pts,
+
120  bool isA, int elementId, int ringId,
+
121  const Geometry* poly, const RelateGeometry* parent);
+
122 
+
123  inline bool isA() const {
+
124  return m_isA;
+
125  }
+
126 
+
127  inline const RelateGeometry* getGeometry() const {
+
128  return m_inputGeom;
+
129  }
+
130 
+
131  inline const Geometry* getPolygonal() const {
+
132  return m_parentPolygonal;
+
133  }
+
134 
+
135  NodeSection* createNodeSection(std::size_t segIndex, const CoordinateXY intPt) const;
+
136 
+
151  bool isContainingSegment(std::size_t segIndex, const CoordinateXY* pt) const;
+
152 
+
153 };
+
154 
+
155 } // namespace geos.operation.relateng
+
156 } // namespace geos.operation
+
157 } // namespace geos
+
158 
The internal representation of a list of coordinates inside a Geometry.
Definition: CoordinateSequence.h:56
Basic implementation of Geometry, constructed and destructed by GeometryFactory.
Definition: Geometry.h:197
Represents a list of contiguous line segments, and supports noding the segments.
Definition: BasicSegmentString.h:44
diff --git a/doxygen/RingClipper_8h_source.html b/doxygen/RingClipper_8h_source.html index 55332a8218..ba929c9153 100644 --- a/doxygen/RingClipper_8h_source.html +++ b/doxygen/RingClipper_8h_source.html @@ -71,61 +71,61 @@
22 // Forward declarations
23 namespace geos {
24 namespace geom {
-
25 class Coordinate;
-
26 class CoordinateSequence;
+
25 class Coordinate;
+
26 class CoordinateSequence;
27 }
28 }
29 
-
30 using namespace geos::geom;
-
31 
-
32 namespace geos { // geos.
-
33 namespace operation { // geos.operation
-
34 namespace overlayng { // geos.operation.overlayng
-
35 
-
64 class GEOS_DLL RingClipper {
-
65 
-
66 private:
-
67 
-
68  // Constants
-
69  static constexpr int BOX_LEFT = 3;
-
70  static constexpr int BOX_TOP = 2;
-
71  static constexpr int BOX_RIGHT = 1;
-
72  static constexpr int BOX_BOTTOM = 0;
-
73 
-
74  // Members
-
75  const Envelope clipEnv;
-
76 
-
77  // Methods
-
78 
-
82  std::unique_ptr<CoordinateSequence> clipToBoxEdge(const CoordinateSequence* pts, int edgeIndex, bool closeRing) const;
-
83 
-
89  void intersection(const Coordinate& a, const Coordinate& b, int edgeIndex, Coordinate& rsltPt) const;
-
90  double intersectionLineY(const Coordinate& a, const Coordinate& b, double y) const;
-
91  double intersectionLineX(const Coordinate& a, const Coordinate& b, double x) const;
-
92  bool isInsideEdge(const Coordinate& p, int edgeIndex) const;
-
93 
+
30 namespace geos { // geos.
+
31 namespace operation { // geos.operation
+
32 namespace overlayng { // geos.operation.overlayng
+
33 
+
62 class GEOS_DLL RingClipper {
+
63  using Coordinate = geos::geom::Coordinate;
+
64  using CoordinateSequence = geos::geom::CoordinateSequence;
+
65  using Envelope = geos::geom::Envelope;
+
66 
+
67 private:
+
68 
+
69  // Constants
+
70  static constexpr int BOX_LEFT = 3;
+
71  static constexpr int BOX_TOP = 2;
+
72  static constexpr int BOX_RIGHT = 1;
+
73  static constexpr int BOX_BOTTOM = 0;
+
74 
+
75  // Members
+
76  const Envelope clipEnv;
+
77 
+
78  // Methods
+
79 
+
83  std::unique_ptr<CoordinateSequence> clipToBoxEdge(const CoordinateSequence* pts, int edgeIndex, bool closeRing) const;
+
84 
+
90  void intersection(const Coordinate& a, const Coordinate& b, int edgeIndex, Coordinate& rsltPt) const;
+
91  double intersectionLineY(const Coordinate& a, const Coordinate& b, double y) const;
+
92  double intersectionLineX(const Coordinate& a, const Coordinate& b, double x) const;
+
93  bool isInsideEdge(const Coordinate& p, int edgeIndex) const;
94 
-
95 public:
-
96 
-
97  RingClipper(const Envelope* env)
-
98  : clipEnv(*env)
-
99  {};
-
100 
-
104  std::unique_ptr<CoordinateSequence> clip(const CoordinateSequence* cs) const;
-
105 
-
106 };
-
107 
+
95 
+
96 public:
+
97 
+
98  RingClipper(const Envelope* env)
+
99  : clipEnv(*env)
+
100  {};
+
101 
+
105  std::unique_ptr<CoordinateSequence> clip(const CoordinateSequence* cs) const;
+
106 
+
107 };
108 
-
109 } // namespace geos.operation.overlayng
-
110 } // namespace geos.operation
-
111 } // namespace geos
-
112 
+
109 
+
110 } // namespace geos.operation.overlayng
+
111 } // namespace geos.operation
+
112 } // namespace geos
+
113 
The internal representation of a list of coordinates inside a Geometry.
Definition: CoordinateSequence.h:56
Coordinate is the lightweight class used to store coordinates.
Definition: Coordinate.h:217
An Envelope defines a rectangulare region of the 2D coordinate plane.
Definition: Envelope.h:59
-
Definition: RingClipper.h:64
+
Definition: RingClipper.h:62
std::unique_ptr< CoordinateSequence > clip(const CoordinateSequence *cs) const
-
Definition: Angle.h:26
Basic namespace for all GEOS functionalities.
Definition: Angle.h:25
diff --git a/doxygen/RingHullIndex_8h_source.html b/doxygen/RingHullIndex_8h_source.html index 66fc87aae6..fecbc5970a 100644 --- a/doxygen/RingHullIndex_8h_source.html +++ b/doxygen/RingHullIndex_8h_source.html @@ -68,7 +68,7 @@
19 
20 namespace geos {
21 namespace geom {
-
22 class Envelope;
+
22 class Envelope;
23 }
24 }
25 
diff --git a/doxygen/RingHull_8h_source.html b/doxygen/RingHull_8h_source.html index 09170c50a4..9fe4009f2e 100644 --- a/doxygen/RingHull_8h_source.html +++ b/doxygen/RingHull_8h_source.html @@ -71,170 +71,169 @@
22 
23 namespace geos {
24 namespace geom {
-
25 class Envelope;
-
26 class LinearRing;
-
27 class LineString;
-
28 class Polygon;
+
25 class Envelope;
+
26 class LinearRing;
+
27 class LineString;
+
28 class Polygon;
29 }
30 namespace simplify {
31 class RingHullIndex;
32 }
33 }
34 
-
35 
-
36 using geos::geom::Coordinate;
-
37 using geos::geom::Envelope;
-
38 using geos::geom::LinearRing;
-
39 using geos::geom::LineString;
-
40 using geos::geom::Polygon;
-
41 using geos::index::VertexSequencePackedRtree;
-
42 
-
43 
-
44 namespace geos {
-
45 namespace simplify { // geos::simplify
-
46 
-
47 
-
48 class RingHull
-
49 {
-
50 
-
51 public:
-
52 
-
53  /*
-
54  * Creates a new instance.
-
55  *
-
56  * @param p_ring the ring vertices to process
-
57  * @param p_isOuter whether the hull is outer or inner
-
58  */
-
59  RingHull(const LinearRing* p_ring, bool p_isOuter);
-
60 
-
61  void setMinVertexNum(std::size_t minVertexNum);
-
62 
-
63  void setMaxAreaDelta(double maxAreaDelta);
-
64 
-
65  const Envelope* getEnvelope() const;
-
66 
-
67  std::unique_ptr<LinearRing> getHull(RingHullIndex& hullIndex);
-
68 
-
69  static bool isConvex(const LinkedRing& vertexRing, std::size_t index);
-
70 
-
71  static double area(const LinkedRing& vertexRing, std::size_t index);
-
72 
-
73  void compute(RingHullIndex& hullIndex);
-
74 
-
75  std::unique_ptr<Polygon> toGeometry() const;
+
35 namespace geos {
+
36 namespace simplify { // geos::simplify
+
37 
+
38 
+
39 class RingHull
+
40 {
+
41  using Coordinate = geos::geom::Coordinate;
+
42  using CoordinateSequence = geos::geom::CoordinateSequence;
+
43  using Envelope = geos::geom::Envelope;
+
44  using LinearRing = geos::geom::LinearRing;
+
45  using LineString = geos::geom::LineString;
+
46  using Polygon = geos::geom::Polygon;
+
47  using VertexSequencePackedRtree = geos::index::VertexSequencePackedRtree;
+
48 
+
49 
+
50 public:
+
51 
+
52  /*
+
53  * Creates a new instance.
+
54  *
+
55  * @param p_ring the ring vertices to process
+
56  * @param p_isOuter whether the hull is outer or inner
+
57  */
+
58  RingHull(const LinearRing* p_ring, bool p_isOuter);
+
59 
+
60  void setMinVertexNum(std::size_t minVertexNum);
+
61 
+
62  void setMaxAreaDelta(double maxAreaDelta);
+
63 
+
64  const Envelope* getEnvelope() const;
+
65 
+
66  std::unique_ptr<LinearRing> getHull(RingHullIndex& hullIndex);
+
67 
+
68  static bool isConvex(const LinkedRing& vertexRing, std::size_t index);
+
69 
+
70  static double area(const LinkedRing& vertexRing, std::size_t index);
+
71 
+
72  void compute(RingHullIndex& hullIndex);
+
73 
+
74  std::unique_ptr<Polygon> toGeometry() const;
+
75 
76 
-
77 
-
78 private:
+
77 private:
+
78 
79 
-
80 
-
81  class Corner
-
82  {
-
83 
-
84  private:
-
85 
-
86  std::size_t index;
-
87  std::size_t prev;
-
88  std::size_t next;
-
89  double area;
-
90 
-
91  public:
-
92 
-
93  Corner(std::size_t p_idx, std::size_t p_prev, std::size_t p_next, double p_area)
-
94  : index(p_idx)
-
95  , prev(p_prev)
-
96  , next(p_next)
-
97  , area(p_area)
-
98  {};
-
99 
-
100  inline int compareTo(const Corner& rhs) const {
-
101  if (area == rhs.getArea()) {
-
102  if (index == rhs.getIndex())
-
103  return 0;
-
104  else return index < rhs.getIndex() ? -1 : 1;
-
105  }
-
106  else return area < rhs.getArea() ? -1 : 1;
-
107  }
-
108 
-
109  inline bool operator< (const Corner& rhs) const {
-
110  return compareTo(rhs) < 0;
-
111  };
-
112 
-
113  inline bool operator> (const Corner& rhs) const {
-
114  return compareTo(rhs) > 0;
-
115  };
-
116 
-
117  inline bool operator==(const Corner& rhs) const {
-
118  return compareTo(rhs) == 0;
-
119  };
-
120 
-
121  bool isVertex(std::size_t p_index) const;
-
122  std::size_t getIndex() const;
-
123  double getArea() const;
-
124  void envelope(const LinkedRing& ring, Envelope& env) const;
-
125  bool intersects(const Coordinate& v, const LinkedRing& ring) const;
-
126  bool isRemoved(const LinkedRing& ring) const;
-
127  std::unique_ptr<LineString> toLineString(const LinkedRing& ring);
-
128 
-
129  struct Greater {
-
130  inline bool operator()(const Corner & a, const Corner & b) const {
-
131  return a > b;
-
132  }
-
133  };
-
134 
-
135  using PriorityQueue = std::priority_queue<Corner, std::vector<Corner>, Corner::Greater>;
-
136 
-
137  }; // class Corner
+
80  class Corner
+
81  {
+
82 
+
83  private:
+
84 
+
85  std::size_t index;
+
86  std::size_t prev;
+
87  std::size_t next;
+
88  double area;
+
89 
+
90  public:
+
91 
+
92  Corner(std::size_t p_idx, std::size_t p_prev, std::size_t p_next, double p_area)
+
93  : index(p_idx)
+
94  , prev(p_prev)
+
95  , next(p_next)
+
96  , area(p_area)
+
97  {};
+
98 
+
99  inline int compareTo(const Corner& rhs) const {
+
100  if (area == rhs.getArea()) {
+
101  if (index == rhs.getIndex())
+
102  return 0;
+
103  else return index < rhs.getIndex() ? -1 : 1;
+
104  }
+
105  else return area < rhs.getArea() ? -1 : 1;
+
106  }
+
107 
+
108  inline bool operator< (const Corner& rhs) const {
+
109  return compareTo(rhs) < 0;
+
110  };
+
111 
+
112  inline bool operator> (const Corner& rhs) const {
+
113  return compareTo(rhs) > 0;
+
114  };
+
115 
+
116  inline bool operator==(const Corner& rhs) const {
+
117  return compareTo(rhs) == 0;
+
118  };
+
119 
+
120  bool isVertex(std::size_t p_index) const;
+
121  std::size_t getIndex() const;
+
122  double getArea() const;
+
123  void envelope(const LinkedRing& ring, Envelope& env) const;
+
124  bool intersects(const Coordinate& v, const LinkedRing& ring) const;
+
125  bool isRemoved(const LinkedRing& ring) const;
+
126  std::unique_ptr<LineString> toLineString(const LinkedRing& ring);
+
127 
+
128  struct Greater {
+
129  inline bool operator()(const Corner & a, const Corner & b) const {
+
130  return a > b;
+
131  }
+
132  };
+
133 
+
134  using PriorityQueue = std::priority_queue<Corner, std::vector<Corner>, Corner::Greater>;
+
135 
+
136  }; // class Corner
+
137 
138 
139 
-
140 
-
141  const LinearRing* inputRing;
-
142  double targetVertexNum = -1.0;
-
143  double targetAreaDelta = -1.0;
-
144 
-
150  std::unique_ptr<CoordinateSequence> vertex;
-
151  std::unique_ptr<LinkedRing> vertexRing;
-
152  double areaDelta = 0;
-
153 
-
159  std::unique_ptr<VertexSequencePackedRtree> vertexIndex;
-
160 
-
161  Corner::PriorityQueue cornerQueue;
+
140  const LinearRing* inputRing;
+
141  double targetVertexNum = -1.0;
+
142  double targetAreaDelta = -1.0;
+
143 
+
149  std::unique_ptr<CoordinateSequence> vertex;
+
150  std::unique_ptr<LinkedRing> vertexRing;
+
151  double areaDelta = 0;
+
152 
+
158  std::unique_ptr<VertexSequencePackedRtree> vertexIndex;
+
159 
+
160  Corner::PriorityQueue cornerQueue;
+
161 
162 
-
163 
-
164  void init(CoordinateSequence& ring, bool isOuter);
-
165  void addCorner(std::size_t i, Corner::PriorityQueue& cornerQueue);
-
166  bool isAtTarget(const Corner& corner);
-
167 
-
177  void removeCorner(const Corner& corner, Corner::PriorityQueue& cornerQueue);
-
178  bool isRemovable(const Corner& corner, const RingHullIndex& hullIndex) const;
-
179 
-
189  bool hasIntersectingVertex(
-
190  const Corner& corner,
-
191  const Envelope& cornerEnv,
-
192  const RingHull* hull) const;
-
193 
-
194  const Coordinate& getCoordinate(std::size_t index) const;
-
195 
-
196  void query(
-
197  const Envelope& cornerEnv,
-
198  std::vector<std::size_t>& result) const;
-
199 
-
200  void queryHull(const Envelope& queryEnv, std::vector<Coordinate>& pts);
+
163  void init(CoordinateSequence& ring, bool isOuter);
+
164  void addCorner(std::size_t i, Corner::PriorityQueue& cornerQueue);
+
165  bool isAtTarget(const Corner& corner);
+
166 
+
176  void removeCorner(const Corner& corner, Corner::PriorityQueue& cornerQueue);
+
177  bool isRemovable(const Corner& corner, const RingHullIndex& hullIndex) const;
+
178 
+
188  bool hasIntersectingVertex(
+
189  const Corner& corner,
+
190  const Envelope& cornerEnv,
+
191  const RingHull* hull) const;
+
192 
+
193  const Coordinate& getCoordinate(std::size_t index) const;
+
194 
+
195  void query(
+
196  const Envelope& cornerEnv,
+
197  std::vector<std::size_t>& result) const;
+
198 
+
199  void queryHull(const Envelope& queryEnv, std::vector<Coordinate>& pts);
+
200 
201 
202 
203 
-
204 
-
205 }; // RingHull
+
204 }; // RingHull
+
205 
206 
-
207 
-
208 } // geos::simplify
-
209 } // geos
+
207 } // geos::simplify
+
208 } // geos
The internal representation of a list of coordinates inside a Geometry.
Definition: CoordinateSequence.h:56
Coordinate is the lightweight class used to store coordinates.
Definition: Coordinate.h:217
An Envelope defines a rectangulare region of the 2D coordinate plane.
Definition: Envelope.h:59
Definition: LineString.h:66
Models an OGC SFS LinearRing. A LinearRing is a LineString which is both closed and simple.
Definition: LinearRing.h:54
Represents a linear polygon, which may include holes.
Definition: Polygon.h:61
-
Definition: VertexSequencePackedRtree.h:54
+
Definition: VertexSequencePackedRtree.h:49
Basic namespace for all GEOS functionalities.
Definition: Angle.h:25
diff --git a/doxygen/RobustClipEnvelopeComputer_8h_source.html b/doxygen/RobustClipEnvelopeComputer_8h_source.html index 0be84aba6e..47316045fc 100644 --- a/doxygen/RobustClipEnvelopeComputer_8h_source.html +++ b/doxygen/RobustClipEnvelopeComputer_8h_source.html @@ -87,49 +87,52 @@
38 namespace operation { // geos.operation
39 namespace overlayng { // geos.operation.overlayng
40 
-
41 using namespace geos::geom;
-
42 
-
52 class GEOS_DLL RobustClipEnvelopeComputer {
-
53 
-
54 private:
-
55 
-
56  // Members
-
57  const Envelope* targetEnv;
-
58  Envelope clipEnv;
+
50 class GEOS_DLL RobustClipEnvelopeComputer {
+
51  using Coordinate = geos::geom::Coordinate;
+
52  using Geometry = geos::geom::Geometry;
+
53  using GeometryCollection = geos::geom::GeometryCollection;
+
54  using Polygon = geos::geom::Polygon;
+
55  using LinearRing = geos::geom::LinearRing;
+
56  using Envelope = geos::geom::Envelope;
+
57 
+
58 private:
59 
-
60  // Methods
-
61  void add(const Geometry* g);
-
62  void addCollection(const GeometryCollection* gc);
-
63  void addPolygon(const Polygon* poly);
-
64  void addPolygonRing(const LinearRing* ring);
-
65  void addSegment(const Coordinate& p1, const Coordinate& p2);
-
66  bool intersectsSegment(const Envelope* env, const Coordinate& p1, const Coordinate& p2);
-
67 
-
68 
-
69 
-
70 public:
+
60  // Members
+
61  const Envelope* targetEnv;
+
62  Envelope clipEnv;
+
63 
+
64  // Methods
+
65  void add(const Geometry* g);
+
66  void addCollection(const GeometryCollection* gc);
+
67  void addPolygon(const Polygon* poly);
+
68  void addPolygonRing(const LinearRing* ring);
+
69  void addSegment(const Coordinate& p1, const Coordinate& p2);
+
70  bool intersectsSegment(const Envelope* env, const Coordinate& p1, const Coordinate& p2);
71 
-
72  RobustClipEnvelopeComputer(const Envelope* p_targetEnv);
+
72 
73 
-
74  static Envelope getEnvelope(const Geometry* a, const Geometry* b, const Envelope* targetEnv);
+
74 public:
75 
-
76  Envelope getEnvelope();
+
76  RobustClipEnvelopeComputer(const Envelope* p_targetEnv);
77 
-
78 };
+
78  static Envelope getEnvelope(const Geometry* a, const Geometry* b, const Envelope* targetEnv);
79 
-
80 
-
81 } // namespace geos.operation.overlayng
-
82 } // namespace geos.operation
-
83 } // namespace geos
+
80  Envelope getEnvelope();
+
81 
+
82 };
+
83 
84 
+
85 } // namespace geos.operation.overlayng
+
86 } // namespace geos.operation
+
87 } // namespace geos
+
88 
Coordinate is the lightweight class used to store coordinates.
Definition: Coordinate.h:217
An Envelope defines a rectangulare region of the 2D coordinate plane.
Definition: Envelope.h:59
Represents a collection of heterogeneous Geometry objects.
Definition: GeometryCollection.h:51
Basic implementation of Geometry, constructed and destructed by GeometryFactory.
Definition: Geometry.h:197
Models an OGC SFS LinearRing. A LinearRing is a LineString which is both closed and simple.
Definition: LinearRing.h:54
Represents a linear polygon, which may include holes.
Definition: Polygon.h:61
-
Definition: RobustClipEnvelopeComputer.h:52
-
Definition: Angle.h:26
+
Definition: RobustClipEnvelopeComputer.h:50
Basic namespace for all GEOS functionalities.
Definition: Angle.h:25
diff --git a/doxygen/SegmentMCIndex_8h_source.html b/doxygen/SegmentMCIndex_8h_source.html index 4b99225f59..c47639a8c3 100644 --- a/doxygen/SegmentMCIndex_8h_source.html +++ b/doxygen/SegmentMCIndex_8h_source.html @@ -70,43 +70,45 @@
21 // Forward declarations
22 namespace geos {
23 namespace geom {
-
24 class CoordinateSequence;
-
25 class Envelope;
+
24 class CoordinateSequence;
+
25 class Envelope;
26 }
27 }
28 
-
29 using geos::geom::CoordinateSequence;
-
30 using geos::geom::Envelope;
-
31 using namespace geos::index;
+
29 namespace geos {
+
30 namespace operation {
+
31 namespace buffer {
32 
-
33 namespace geos {
-
34 namespace operation {
-
35 namespace buffer {
-
36 
-
37 class GEOS_DLL SegmentMCIndex {
-
38 
-
39 private:
+
33 class GEOS_DLL SegmentMCIndex {
+
34  using CoordinateSequence = geos::geom::CoordinateSequence;
+
35  using Envelope = geos::geom::Envelope;
+
36  using MonotoneChain = geos::index::chain::MonotoneChain;
+
37  using MonotoneChainSelectAction = geos::index::chain::MonotoneChainSelectAction;
+
38  template<typename ItemType>
+
39  using TemplateSTRtree = geos::index::strtree::TemplateSTRtree<ItemType>;
40 
-
41  strtree::TemplateSTRtree<const index::chain::MonotoneChain*> index;
-
42  std::vector<chain::MonotoneChain> segChains;
-
43 
-
44  void buildIndex(const CoordinateSequence* segs);
+
41 private:
+
42 
+
43  TemplateSTRtree<const MonotoneChain*> index;
+
44  std::vector<MonotoneChain> segChains;
45 
-
46 public:
+
46  void buildIndex(const CoordinateSequence* segs);
47 
-
48  SegmentMCIndex(const CoordinateSequence* segs);
+
48 public:
49 
-
50  void query(const Envelope* env, chain::MonotoneChainSelectAction& action);
-
51 };
-
52 
-
53 
-
54 } // geos.operation.buffer
-
55 } // geos.operation
-
56 } // geos
+
50  SegmentMCIndex(const CoordinateSequence* segs);
+
51 
+
52  void query(const Envelope* env, MonotoneChainSelectAction& action);
+
53 };
+
54 
+
55 
+
56 } // geos.operation.buffer
+
57 } // geos.operation
+
58 } // geos
The internal representation of a list of coordinates inside a Geometry.
Definition: CoordinateSequence.h:56
An Envelope defines a rectangulare region of the 2D coordinate plane.
Definition: Envelope.h:59
Definition: MonotoneChainSelectAction.h:44
-
Provides classes for various kinds of spatial indexes.
Definition: DiscreteFrechetDistance.h:50
+
Monotone Chains are a way of partitioning the segments of a linestring to allow for fast searching of...
Definition: index/chain/MonotoneChain.h:85
Basic namespace for all GEOS functionalities.
Definition: Angle.h:25
diff --git a/doxygen/TPVWSimplifier_8h_source.html b/doxygen/TPVWSimplifier_8h_source.html index e3acebcee7..b22988c281 100644 --- a/doxygen/TPVWSimplifier_8h_source.html +++ b/doxygen/TPVWSimplifier_8h_source.html @@ -74,140 +74,138 @@
25 
26 namespace geos {
27 namespace geom {
-
28 class Coordinate;
-
29 class CoordinateSequence;
-
30 class Envelope;
-
31 class Geometry;
-
32 class GeometryFactory;
-
33 class LineString;
-
34 class MultiLineString;
+
28 class Coordinate;
+
29 class CoordinateSequence;
+
30 class Envelope;
+
31 class Geometry;
+
32 class GeometryFactory;
+
33 class LineString;
+
34 class MultiLineString;
35 }
36 }
37 
-
38 
-
39 using geos::coverage::Corner;
-
40 using geos::geom::Coordinate;
-
41 using geos::geom::CoordinateSequence;
-
42 using geos::geom::Envelope;
-
43 using geos::geom::Geometry;
-
44 using geos::geom::GeometryFactory;
-
45 using geos::geom::LineString;
-
46 using geos::geom::MultiLineString;
-
47 using geos::index::VertexSequencePackedRtree;
-
48 using geos::index::strtree::TemplateSTRtree;
-
49 using geos::simplify::LinkedLine;
-
50 
-
51 
-
52 namespace geos {
-
53 namespace coverage { // geos::coverage
-
54 
-
55 
-
74 class GEOS_DLL TPVWSimplifier
-
75 {
+
38 namespace geos {
+
39 namespace coverage { // geos::coverage
+
40 
+
41 
+
60 class GEOS_DLL TPVWSimplifier
+
61 {
+
62  using Corner = geos::coverage::Corner;
+
63  using Coordinate = geos::geom::Coordinate;
+
64  using CoordinateSequence = geos::geom::CoordinateSequence;
+
65  using Envelope = geos::geom::Envelope;
+
66  using Geometry = geos::geom::Geometry;
+
67  using GeometryFactory = geos::geom::GeometryFactory;
+
68  using LineString = geos::geom::LineString;
+
69  using MultiLineString = geos::geom::MultiLineString;
+
70  using VertexSequencePackedRtree = geos::index::VertexSequencePackedRtree;
+
71  template<typename ItemType>
+
72  using TemplateSTRtree = geos::index::strtree::TemplateSTRtree<ItemType>;
+
73  using LinkedLine = geos::simplify::LinkedLine;
+
74 
+
75 public:
76 
-
77 public:
-
78 
-
79  // Prototype
-
80  class EdgeIndex;
-
81 
-
82  /* private static */
-
83  class Edge {
+
77  // Prototype
+
78  class EdgeIndex;
+
79 
+
80  /* private static */
+
81  class Edge {
+
82 
+
83  public:
84 
-
85  public:
-
86 
-
87  // Members
-
88  double areaTolerance;
-
89  bool isFreeRing;
-
90  const Envelope* envelope;
-
91  std::size_t nbPts;
-
92  LinkedLine linkedLine;
-
93  VertexSequencePackedRtree vertexIndex;
-
94  std::size_t minEdgeSize;
-
95 
-
105  Edge(const LineString* p_inputLine, bool p_isFreeRing, double p_areaTolerance);
+
85  // Members
+
86  double areaTolerance;
+
87  bool isFreeRing;
+
88  const Envelope* envelope;
+
89  std::size_t nbPts;
+
90  LinkedLine linkedLine;
+
91  VertexSequencePackedRtree vertexIndex;
+
92  std::size_t minEdgeSize;
+
93 
+
103  Edge(const LineString* p_inputLine, bool p_isFreeRing, double p_areaTolerance);
+
104 
+
105  const Coordinate& getCoordinate(std::size_t index) const;
106 
-
107  const Coordinate& getCoordinate(std::size_t index) const;
+
107  const Envelope* getEnvelopeInternal() const;
108 
-
109  const Envelope* getEnvelopeInternal() const;
+
109  std::size_t size() const;
110 
-
111  std::size_t size() const;
+
111  std::unique_ptr<CoordinateSequence> simplify(EdgeIndex& edgeIndex);
112 
-
113  std::unique_ptr<CoordinateSequence> simplify(EdgeIndex& edgeIndex);
+
113  void createQueue(Corner::PriorityQueue& pq);
114 
-
115  void createQueue(Corner::PriorityQueue& pq);
+
115  void addCorner(std::size_t i, Corner::PriorityQueue& cornerQueue);
116 
-
117  void addCorner(std::size_t i, Corner::PriorityQueue& cornerQueue);
+
117  bool isRemovable(Corner& corner, EdgeIndex& edgeIndex) const;
118 
-
119  bool isRemovable(Corner& corner, EdgeIndex& edgeIndex) const;
-
120 
-
130  bool hasIntersectingVertex(const Corner& corner,
-
131  const Envelope& cornerEnv,
-
132  const Edge& edge) const;
+
128  bool hasIntersectingVertex(const Corner& corner,
+
129  const Envelope& cornerEnv,
+
130  const Edge& edge) const;
+
131 
+
132  std::vector<std::size_t> query(const Envelope& cornerEnv) const;
133 
-
134  std::vector<std::size_t> query(const Envelope& cornerEnv) const;
-
135 
-
145  void removeCorner(
-
146  Corner& corner,
-
147  Corner::PriorityQueue& cornerQueue);
+
143  void removeCorner(
+
144  Corner& corner,
+
145  Corner::PriorityQueue& cornerQueue);
+
146 
+
147  }; // Edge
148 
-
149  }; // Edge
-
150 
-
151  class EdgeIndex
-
152  {
-
153  public:
+
149  class EdgeIndex
+
150  {
+
151  public:
+
152 
+
153  TemplateSTRtree<const Edge*> index;
154 
-
155  TemplateSTRtree<const Edge*> index;
+
155  void add(std::vector<Edge>& edges);
156 
-
157  void add(std::vector<Edge>& edges);
+
157  std::vector<const Edge*> query(const Envelope& queryEnv);
158 
-
159  std::vector<const Edge*> query(const Envelope& queryEnv);
+
159  }; // EdgeIndex
160 
-
161  }; // EdgeIndex
-
162 
-
163 
-
171  static std::unique_ptr<MultiLineString> simplify(
-
172  const MultiLineString* lines,
-
173  double distanceTolerance);
-
174 
-
188  static std::unique_ptr<MultiLineString> simplify(
-
189  const MultiLineString* lines,
-
190  std::vector<bool>& freeRings,
-
191  const MultiLineString* constraintLines,
-
192  double distanceTolerance);
-
193 
-
194  // Constructor
-
195  TPVWSimplifier(const MultiLineString* lines,
-
196  double distanceTolerance);
-
197 
+
161 
+
169  static std::unique_ptr<MultiLineString> simplify(
+
170  const MultiLineString* lines,
+
171  double distanceTolerance);
+
172 
+
186  static std::unique_ptr<MultiLineString> simplify(
+
187  const MultiLineString* lines,
+
188  std::vector<bool>& freeRings,
+
189  const MultiLineString* constraintLines,
+
190  double distanceTolerance);
+
191 
+
192  // Constructor
+
193  TPVWSimplifier(const MultiLineString* lines,
+
194  double distanceTolerance);
+
195 
+
196 
+
197 private:
198 
-
199 private:
-
200 
-
201  // Members
-
202  const MultiLineString* inputLines;
-
203  std::vector<bool> isFreeRing;
-
204  double areaTolerance;
-
205  const GeometryFactory* geomFactory;
-
206  const MultiLineString* constraintLines;
-
207 
-
208 
-
209  // Methods
-
210  void setFreeRingIndices(std::vector<bool>& freeRing);
+
199  // Members
+
200  const MultiLineString* inputLines;
+
201  std::vector<bool> isFreeRing;
+
202  double areaTolerance;
+
203  const GeometryFactory* geomFactory;
+
204  const MultiLineString* constraintLines;
+
205 
+
206 
+
207  // Methods
+
208  void setFreeRingIndices(std::vector<bool>& freeRing);
+
209 
+
210  void setConstraints(const MultiLineString* constraints);
211 
-
212  void setConstraints(const MultiLineString* constraints);
+
212  std::unique_ptr<MultiLineString> simplify();
213 
-
214  std::unique_ptr<MultiLineString> simplify();
-
215 
-
216  std::vector<Edge> createEdges(
-
217  const MultiLineString* lines,
-
218  std::vector<bool>& freeRing);
-
219 
+
214  std::vector<Edge> createEdges(
+
215  const MultiLineString* lines,
+
216  std::vector<bool>& freeRing);
+
217 
+
218 
+
219 }; // TPVWSimplifier
220 
-
221 }; // TPVWSimplifier
-
222 
-
223 
-
224 } // geos::coverage
-
225 } // geos
-
Definition: TPVWSimplifier.h:75
+
221 
+
222 } // geos::coverage
+
223 } // geos
+
Definition: TPVWSimplifier.h:61
static std::unique_ptr< MultiLineString > simplify(const MultiLineString *lines, std::vector< bool > &freeRings, const MultiLineString *constraintLines, double distanceTolerance)
static std::unique_ptr< MultiLineString > simplify(const MultiLineString *lines, double distanceTolerance)
The internal representation of a list of coordinates inside a Geometry.
Definition: CoordinateSequence.h:56
@@ -217,7 +215,7 @@
Basic implementation of Geometry, constructed and destructed by GeometryFactory.
Definition: Geometry.h:197
Definition: LineString.h:66
Models a collection of LineStrings.
Definition: MultiLineString.h:49
-
Definition: VertexSequencePackedRtree.h:54
+
Definition: VertexSequencePackedRtree.h:49
Basic namespace for all GEOS functionalities.
Definition: Angle.h:25
diff --git a/doxygen/TaggedLineStringSimplifier_8h_source.html b/doxygen/TaggedLineStringSimplifier_8h_source.html index 5bf6e768d3..a14a83b34b 100644 --- a/doxygen/TaggedLineStringSimplifier_8h_source.html +++ b/doxygen/TaggedLineStringSimplifier_8h_source.html @@ -88,9 +88,9 @@
39 class LineIntersector;
40 }
41 namespace geom {
-
42 class CoordinateSequence;
-
43 class Coordinate;
-
44 class LineSegment;
+
42 class CoordinateSequence;
+
43 class Coordinate;
+
44 class LineSegment;
45 }
46 namespace simplify {
47 class TaggedLineSegment;
@@ -100,105 +100,103 @@
51 }
52 }
53 
-
54 using geos::geom::CoordinateSequence;
-
55 using geos::geom::Coordinate;
-
56 using geos::geom::LineSegment;
+
54 namespace geos {
+
55 namespace simplify { // geos::simplify
+
56 
57 
-
58 
-
59 namespace geos {
-
60 namespace simplify { // geos::simplify
-
61 
-
62 
-
69 class GEOS_DLL TaggedLineStringSimplifier {
+
64 class GEOS_DLL TaggedLineStringSimplifier {
+
65  using CoordinateSequence = geos::geom::CoordinateSequence;
+
66  using Coordinate = geos::geom::Coordinate;
+
67  using LineSegment = geos::geom::LineSegment;
+
68 
+
69 public:
70 
-
71 public:
-
72 
-
73  TaggedLineStringSimplifier(LineSegmentIndex* inputIndex,
-
74  LineSegmentIndex* outputIndex,
-
75  const ComponentJumpChecker* jumpChecker);
-
76 
-
84  void simplify(TaggedLineString* line, double distanceTolerance);
-
85 
+
71  TaggedLineStringSimplifier(LineSegmentIndex* inputIndex,
+
72  LineSegmentIndex* outputIndex,
+
73  const ComponentJumpChecker* jumpChecker);
+
74 
+
82  void simplify(TaggedLineString* line, double distanceTolerance);
+
83 
+
84 
+
85 private:
86 
-
87 private:
-
88 
-
89  // externally owned
-
90  LineSegmentIndex* inputIndex;
-
91 
-
92  // externally owned
-
93  LineSegmentIndex* outputIndex;
+
87  // externally owned
+
88  LineSegmentIndex* inputIndex;
+
89 
+
90  // externally owned
+
91  LineSegmentIndex* outputIndex;
+
92 
+
93  const ComponentJumpChecker* jumpChecker;
94 
-
95  const ComponentJumpChecker* jumpChecker;
+
95  std::unique_ptr<algorithm::LineIntersector> li;
96 
-
97  std::unique_ptr<algorithm::LineIntersector> li;
-
98 
-
100  TaggedLineString* line;
+
98  TaggedLineString* line;
+
99 
+
100  const CoordinateSequence* linePts;
101 
-
102  const CoordinateSequence* linePts;
+
102  void simplifySection(std::size_t i, std::size_t j, std::size_t depth, double distanceTolerance);
103 
-
104  void simplifySection(std::size_t i, std::size_t j, std::size_t depth, double distanceTolerance);
+
104  void simplifyRingEndpoint(double distanceTolerance);
105 
-
106  void simplifyRingEndpoint(double distanceTolerance);
-
107 
-
108  static std::size_t findFurthestPoint(
-
109  const CoordinateSequence* pts,
-
110  std::size_t i, std::size_t j,
-
111  double& maxDistance);
-
112 
-
113  bool isTopologyValid(
-
114  const TaggedLineString* lineIn,
-
115  std::size_t sectionStart, std::size_t sectionEnd,
-
116  const LineSegment& flatSeg);
-
117 
-
118  bool isTopologyValid(
-
119  const TaggedLineString* lineIn,
-
120  const LineSegment* seg1, const LineSegment* seg2,
-
121  const LineSegment& flatSeg);
+
106  static std::size_t findFurthestPoint(
+
107  const CoordinateSequence* pts,
+
108  std::size_t i, std::size_t j,
+
109  double& maxDistance);
+
110 
+
111  bool isTopologyValid(
+
112  const TaggedLineString* lineIn,
+
113  std::size_t sectionStart, std::size_t sectionEnd,
+
114  const LineSegment& flatSeg);
+
115 
+
116  bool isTopologyValid(
+
117  const TaggedLineString* lineIn,
+
118  const LineSegment* seg1, const LineSegment* seg2,
+
119  const LineSegment& flatSeg);
+
120 
+
121  bool hasInputIntersection(const LineSegment& flatSeg);
122 
-
123  bool hasInputIntersection(const LineSegment& flatSeg);
-
124 
-
125  bool hasInputIntersection(
-
126  const TaggedLineString* lineIn,
-
127  std::size_t excludeStart, std::size_t excludeEnd,
-
128  const LineSegment& flatSeg);
+
123  bool hasInputIntersection(
+
124  const TaggedLineString* lineIn,
+
125  std::size_t excludeStart, std::size_t excludeEnd,
+
126  const LineSegment& flatSeg);
+
127 
+
128  bool isCollinear(const Coordinate& pt, const LineSegment& seg) const;
129 
-
130  bool isCollinear(const Coordinate& pt, const LineSegment& seg) const;
+
130  bool hasOutputIntersection(const LineSegment& flatSeg);
131 
-
132  bool hasOutputIntersection(const LineSegment& flatSeg);
-
133 
-
134  bool hasInvalidIntersection(
-
135  const LineSegment& seg0,
-
136  const LineSegment& seg1) const;
-
137 
-
138 
-
139  std::unique_ptr<TaggedLineSegment> flatten(
-
140  std::size_t start, std::size_t end);
-
141 
-
154  static bool isInLineSection(
-
155  const TaggedLineString* line,
-
156  const std::size_t excludeStart, const std::size_t excludeEnd,
-
157  const TaggedLineSegment* seg);
-
158 
-
166  void remove(const TaggedLineString* line,
-
167  std::size_t start,
-
168  std::size_t end);
+
132  bool hasInvalidIntersection(
+
133  const LineSegment& seg0,
+
134  const LineSegment& seg1) const;
+
135 
+
136 
+
137  std::unique_ptr<TaggedLineSegment> flatten(
+
138  std::size_t start, std::size_t end);
+
139 
+
152  static bool isInLineSection(
+
153  const TaggedLineString* line,
+
154  const std::size_t excludeStart, const std::size_t excludeEnd,
+
155  const TaggedLineSegment* seg);
+
156 
+
164  void remove(const TaggedLineString* line,
+
165  std::size_t start,
+
166  std::size_t end);
+
167 
+
168 };
169 
-
170 };
-
171 
-
172 
-
173 } // namespace geos::simplify
-
174 } // namespace geos
-
175 
-
176 #ifdef _MSC_VER
-
177 #pragma warning(pop)
-
178 #endif
+
170 
+
171 } // namespace geos::simplify
+
172 } // namespace geos
+
173 
+
174 #ifdef _MSC_VER
+
175 #pragma warning(pop)
+
176 #endif
The internal representation of a list of coordinates inside a Geometry.
Definition: CoordinateSequence.h:56
Coordinate is the lightweight class used to store coordinates.
Definition: Coordinate.h:217
Definition: LineSegment.h:61
A geom::LineSegment which is tagged with its location in a geom::Geometry.
Definition: TaggedLineSegment.h:53
-
Simplifies a TaggedLineString, preserving topology (in the sense that no new intersections are introd...
Definition: TaggedLineStringSimplifier.h:69
+
Simplifies a TaggedLineString, preserving topology (in the sense that no new intersections are introd...
Definition: TaggedLineStringSimplifier.h:64
void simplify(TaggedLineString *line, double distanceTolerance)
-
Contains and owns a list of TaggedLineSegments.
Definition: TaggedLineString.h:60
+
Contains and owns a list of TaggedLineSegments.
Definition: TaggedLineString.h:57
Basic namespace for all GEOS functionalities.
Definition: Angle.h:25
diff --git a/doxygen/TaggedLineString_8h_source.html b/doxygen/TaggedLineString_8h_source.html index 116faa7117..1bd6159a29 100644 --- a/doxygen/TaggedLineString_8h_source.html +++ b/doxygen/TaggedLineString_8h_source.html @@ -85,8 +85,8 @@
36 // Forward declarations
37 namespace geos {
38 namespace geom {
-
39 class Coordinate;
-
40 class CoordinateSequence;
+
39 class Coordinate;
+
40 class CoordinateSequence;
41 class Geometry;
42 class LineString;
43 class LinearRing;
@@ -96,104 +96,103 @@
47 }
48 }
49 
-
50 using geos::geom::Coordinate;
-
51 using geos::geom::CoordinateSequence;
+
50 namespace geos {
+
51 namespace simplify { // geos::simplify
52 
-
53 namespace geos {
-
54 namespace simplify { // geos::simplify
-
55 
-
56 
-
60 class GEOS_DLL TaggedLineString {
-
61 
-
62 public:
-
63 
-
64  typedef std::vector<Coordinate> CoordVect;
-
65 
-
66  typedef std::unique_ptr<CoordVect> CoordVectPtr;
-
67 
-
68  typedef CoordinateSequence CoordSeq;
-
69 
-
70  typedef std::unique_ptr<CoordinateSequence> CoordSeqPtr;
-
71 
-
72  TaggedLineString(const geom::LineString* nParentLine,
-
73  std::size_t minimumSize,
-
74  bool bIsRing);
-
75 
-
76  ~TaggedLineString();
-
77 
-
78  std::size_t getMinimumSize() const;
-
79 
-
80  bool isRing() const;
-
81 
-
82  const geom::LineString* getParent() const;
-
83 
-
84  const CoordSeq* getParentCoordinates() const;
-
85 
-
86  CoordSeqPtr getResultCoordinates() const;
-
87 
-
88  const Coordinate& getCoordinate(std::size_t i) const;
-
89 
-
90  std::size_t size() const;
-
91 
-
92  const Coordinate& getComponentPoint() const;
-
93 
-
94  std::size_t getResultSize() const;
-
95 
-
96  TaggedLineSegment* getSegment(std::size_t i);
-
97 
-
98  const TaggedLineSegment* getSegment(std::size_t i) const;
-
99 
-
100  std::vector<TaggedLineSegment*>& getSegments();
-
101 
-
102  const std::vector<TaggedLineSegment*>& getSegments() const;
-
103 
-
104  const std::vector<TaggedLineSegment*>& getResultSegments() const;
-
105 
-
106  void addToResult(std::unique_ptr<TaggedLineSegment> seg);
-
107 
-
108  const TaggedLineSegment* removeRingEndpoint();
-
109 
-
110  std::unique_ptr<geom::Geometry> asLineString() const;
-
111 
-
112  std::unique_ptr<geom::Geometry> asLinearRing() const;
-
113 
-
114 private:
-
115 
-
116  const geom::LineString* parentLine;
-
117 
-
118  // TaggedLineSegments owned by this object
-
119  std::vector<TaggedLineSegment*> segs;
-
120 
-
121  // TaggedLineSegments owned by this object
-
122  std::vector<TaggedLineSegment*> resultSegs;
-
123 
-
124  std::size_t minimumSize;
-
125 
-
126  bool m_isRing;
-
127 
-
128  void init();
-
129 
-
130  static std::unique_ptr<CoordinateSequence> extractCoordinates(
-
131  const std::vector<TaggedLineSegment*>& segs);
-
132 
-
133  // Copying is turned off
-
134  TaggedLineString(const TaggedLineString&);
-
135  TaggedLineString& operator= (const TaggedLineString&);
-
136 
-
137 };
-
138 
-
139 } // namespace geos::simplify
-
140 } // namespace geos
-
141 
-
142 #ifdef _MSC_VER
-
143 #pragma warning(pop)
-
144 #endif
-
145 
+
53 
+
57 class GEOS_DLL TaggedLineString {
+
58  using Coordinate = geos::geom::Coordinate;
+
59  using CoordinateSequence = geos::geom::CoordinateSequence;
+
60 
+
61 public:
+
62 
+
63  typedef std::vector<Coordinate> CoordVect;
+
64 
+
65  typedef std::unique_ptr<CoordVect> CoordVectPtr;
+
66 
+
67  typedef CoordinateSequence CoordSeq;
+
68 
+
69  typedef std::unique_ptr<CoordinateSequence> CoordSeqPtr;
+
70 
+
71  TaggedLineString(const geom::LineString* nParentLine,
+
72  std::size_t minimumSize,
+
73  bool bIsRing);
+
74 
+
75  ~TaggedLineString();
+
76 
+
77  std::size_t getMinimumSize() const;
+
78 
+
79  bool isRing() const;
+
80 
+
81  const geom::LineString* getParent() const;
+
82 
+
83  const CoordSeq* getParentCoordinates() const;
+
84 
+
85  CoordSeqPtr getResultCoordinates() const;
+
86 
+
87  const Coordinate& getCoordinate(std::size_t i) const;
+
88 
+
89  std::size_t size() const;
+
90 
+
91  const Coordinate& getComponentPoint() const;
+
92 
+
93  std::size_t getResultSize() const;
+
94 
+
95  TaggedLineSegment* getSegment(std::size_t i);
+
96 
+
97  const TaggedLineSegment* getSegment(std::size_t i) const;
+
98 
+
99  std::vector<TaggedLineSegment*>& getSegments();
+
100 
+
101  const std::vector<TaggedLineSegment*>& getSegments() const;
+
102 
+
103  const std::vector<TaggedLineSegment*>& getResultSegments() const;
+
104 
+
105  void addToResult(std::unique_ptr<TaggedLineSegment> seg);
+
106 
+
107  const TaggedLineSegment* removeRingEndpoint();
+
108 
+
109  std::unique_ptr<geom::Geometry> asLineString() const;
+
110 
+
111  std::unique_ptr<geom::Geometry> asLinearRing() const;
+
112 
+
113 private:
+
114 
+
115  const geom::LineString* parentLine;
+
116 
+
117  // TaggedLineSegments owned by this object
+
118  std::vector<TaggedLineSegment*> segs;
+
119 
+
120  // TaggedLineSegments owned by this object
+
121  std::vector<TaggedLineSegment*> resultSegs;
+
122 
+
123  std::size_t minimumSize;
+
124 
+
125  bool m_isRing;
+
126 
+
127  void init();
+
128 
+
129  static std::unique_ptr<CoordinateSequence> extractCoordinates(
+
130  const std::vector<TaggedLineSegment*>& segs);
+
131 
+
132  // Copying is turned off
+
133  TaggedLineString(const TaggedLineString&);
+
134  TaggedLineString& operator= (const TaggedLineString&);
+
135 
+
136 };
+
137 
+
138 } // namespace geos::simplify
+
139 } // namespace geos
+
140 
+
141 #ifdef _MSC_VER
+
142 #pragma warning(pop)
+
143 #endif
+
144 
The internal representation of a list of coordinates inside a Geometry.
Definition: CoordinateSequence.h:56
Coordinate is the lightweight class used to store coordinates.
Definition: Coordinate.h:217
Definition: LineString.h:66
A geom::LineSegment which is tagged with its location in a geom::Geometry.
Definition: TaggedLineSegment.h:53
-
Contains and owns a list of TaggedLineSegments.
Definition: TaggedLineString.h:60
+
Contains and owns a list of TaggedLineSegments.
Definition: TaggedLineString.h:57
Basic namespace for all GEOS functionalities.
Definition: Angle.h:25
diff --git a/doxygen/TopologyComputer_8h_source.html b/doxygen/TopologyComputer_8h_source.html index c38c429977..ae6388cb0f 100644 --- a/doxygen/TopologyComputer_8h_source.html +++ b/doxygen/TopologyComputer_8h_source.html @@ -73,7 +73,7 @@
24 namespace geos {
25 namespace operation {
26 namespace relateng {
-
27  class NodeSection;
+
27  class NodeSection;
28  class RelateGeometry;
29  class RelateNode;
30  class TopologyPredicate;
@@ -81,124 +81,121 @@
32 }
33 }
34 
-
35 
-
36 using geos::geom::CoordinateXY;
-
37 using geos::geom::Location;
-
38 using geos::operation::relateng::NodeSection;
-
39 using geos::operation::relateng::NodeSections;
-
40 using geos::operation::relateng::RelateGeometry;
-
41 using geos::operation::relateng::RelateNode;
-
42 using geos::operation::relateng::TopologyPredicate;
-
43 
-
44 
-
45 namespace geos { // geos.
-
46 namespace operation { // geos.operation
-
47 namespace relateng { // geos.operation.relateng
+
35 namespace geos { // geos.
+
36 namespace operation { // geos.operation
+
37 namespace relateng { // geos.operation.relateng
+
38 
+
39 
+
40 class GEOS_DLL TopologyComputer {
+
41  using CoordinateXY = geos::geom::CoordinateXY;
+
42  using Location = geos::geom::Location;
+
43  using NodeSection = geos::operation::relateng::NodeSection;
+
44  using NodeSections = geos::operation::relateng::NodeSections;
+
45  using RelateGeometry = geos::operation::relateng::RelateGeometry;
+
46  using RelateNode = geos::operation::relateng::RelateNode;
+
47  using TopologyPredicate = geos::operation::relateng::TopologyPredicate;
48 
-
49 
-
50 class GEOS_DLL TopologyComputer {
-
51 
-
52 private:
-
53 
-
54  // Members
-
55  TopologyPredicate& predicate;
-
56  RelateGeometry& geomA;
-
57  RelateGeometry& geomB;
-
58  std::map<CoordinateXY, NodeSections*> nodeMap;
-
59  std::deque<std::unique_ptr<NodeSections>> nodeSectionsStore;
-
60 
-
61  // Methods
-
62 
-
66  void initExteriorDims();
-
67 
-
68  void initExteriorEmpty(bool geomNonEmpty);
-
69 
-
70  inline RelateGeometry& getGeometry(bool isA) const {
-
71  return isA ? geomA : geomB;
-
72  };
-
73 
-
74  void updateDim(Location locA, Location locB, int dimension);
-
75 
-
76  void updateDim(bool isAB, Location loc1, Location loc2, int dimension);
-
77 
-
84  void updateIntersectionAB(const NodeSection* a, const NodeSection* b);
-
85 
-
97  void updateAreaAreaCross(const NodeSection* a, const NodeSection* b);
-
98 
-
105  void updateNodeLocation(const NodeSection* a, const NodeSection* b);
-
106 
-
107  void addNodeSections(NodeSection* ns0, NodeSection* ns1);
-
108 
-
109  void addLineEndOnLine(bool isLineA, Location locLineEnd, Location locLine, const CoordinateXY* pt);
-
110 
-
111  void addLineEndOnArea(bool isLineA, Location locLineEnd, Location locArea, const CoordinateXY* pt);
-
112 
-
124  void addAreaVertexOnPoint(bool isAreaA, Location locArea, const CoordinateXY* pt);
-
125 
-
126  void addAreaVertexOnLine(bool isAreaA, Location locArea, Location locTarget, const CoordinateXY* pt);
-
127 
-
128  void evaluateNode(NodeSections* nodeSections);
-
129 
-
130  void evaluateNodeEdges(const RelateNode* node);
+
49 private:
+
50 
+
51  // Members
+
52  TopologyPredicate& predicate;
+
53  RelateGeometry& geomA;
+
54  RelateGeometry& geomB;
+
55  std::map<CoordinateXY, NodeSections*> nodeMap;
+
56  std::deque<std::unique_ptr<NodeSections>> nodeSectionsStore;
+
57 
+
58  // Methods
+
59 
+
63  void initExteriorDims();
+
64 
+
65  void initExteriorEmpty(bool geomNonEmpty);
+
66 
+
67  inline RelateGeometry& getGeometry(bool isA) const {
+
68  return isA ? geomA : geomB;
+
69  };
+
70 
+
71  void updateDim(Location locA, Location locB, int dimension);
+
72 
+
73  void updateDim(bool isAB, Location loc1, Location loc2, int dimension);
+
74 
+
81  void updateIntersectionAB(const NodeSection* a, const NodeSection* b);
+
82 
+
94  void updateAreaAreaCross(const NodeSection* a, const NodeSection* b);
+
95 
+
102  void updateNodeLocation(const NodeSection* a, const NodeSection* b);
+
103 
+
104  void addNodeSections(NodeSection* ns0, NodeSection* ns1);
+
105 
+
106  void addLineEndOnLine(bool isLineA, Location locLineEnd, Location locLine, const CoordinateXY* pt);
+
107 
+
108  void addLineEndOnArea(bool isLineA, Location locLineEnd, Location locArea, const CoordinateXY* pt);
+
109 
+
121  void addAreaVertexOnPoint(bool isAreaA, Location locArea, const CoordinateXY* pt);
+
122 
+
123  void addAreaVertexOnLine(bool isAreaA, Location locArea, Location locTarget, const CoordinateXY* pt);
+
124 
+
125  void evaluateNode(NodeSections* nodeSections);
+
126 
+
127  void evaluateNodeEdges(const RelateNode* node);
+
128 
+
129  NodeSections* getNodeSections(const CoordinateXY& nodePt);
+
130 
131 
-
132  NodeSections* getNodeSections(const CoordinateXY& nodePt);
-
133 
+
132 
+
133 public:
134 
-
135 
-
136 public:
-
137 
-
138  TopologyComputer(
-
139  TopologyPredicate& p_predicate,
-
140  RelateGeometry& p_geomA,
-
141  RelateGeometry& p_geomB)
-
142  : predicate(p_predicate)
-
143  , geomA(p_geomA)
-
144  , geomB(p_geomB)
-
145  {
-
146  initExteriorDims();
-
147  };
-
148 
-
149  int getDimension(bool isA) const;
-
150 
-
151  bool isAreaArea() const;
-
152 
-
166  bool isSelfNodingRequired() const;
-
167 
-
168  bool isExteriorCheckRequired(bool isA) const;
-
169 
-
170  bool isResultKnown() const;
-
171 
-
172  bool getResult() const;
-
173 
-
177  void finish();
-
178 
-
179  void addIntersection(NodeSection* a, NodeSection* b);
-
180 
-
181  void addPointOnPointInterior(const CoordinateXY* pt);
-
182 
-
183  void addPointOnPointExterior(bool isGeomA, const CoordinateXY* pt);
-
184 
-
185  void addPointOnGeometry(bool isA, Location locTarget, int dimTarget, const CoordinateXY* pt);
-
186 
-
199  void addLineEndOnGeometry(bool isLineA, Location locLineEnd, Location locTarget, int dimTarget, const CoordinateXY* pt);
-
200 
-
217  void addAreaVertex(bool isAreaA, Location locArea, Location locTarget, int dimTarget, const CoordinateXY* pt);
-
218 
-
219  void addAreaVertexOnArea(bool isAreaA, Location locArea, Location locTarget, const CoordinateXY* pt);
-
220 
-
221  void evaluateNodes();
-
222 
-
227  TopologyComputer(const TopologyComputer&) = delete;
-
228  TopologyComputer& operator=(const TopologyComputer&) = delete;
+
135  TopologyComputer(
+
136  TopologyPredicate& p_predicate,
+
137  RelateGeometry& p_geomA,
+
138  RelateGeometry& p_geomB)
+
139  : predicate(p_predicate)
+
140  , geomA(p_geomA)
+
141  , geomB(p_geomB)
+
142  {
+
143  initExteriorDims();
+
144  };
+
145 
+
146  int getDimension(bool isA) const;
+
147 
+
148  bool isAreaArea() const;
+
149 
+
163  bool isSelfNodingRequired() const;
+
164 
+
165  bool isExteriorCheckRequired(bool isA) const;
+
166 
+
167  bool isResultKnown() const;
+
168 
+
169  bool getResult() const;
+
170 
+
174  void finish();
+
175 
+
176  void addIntersection(NodeSection* a, NodeSection* b);
+
177 
+
178  void addPointOnPointInterior(const CoordinateXY* pt);
+
179 
+
180  void addPointOnPointExterior(bool isGeomA, const CoordinateXY* pt);
+
181 
+
182  void addPointOnGeometry(bool isA, Location locTarget, int dimTarget, const CoordinateXY* pt);
+
183 
+
196  void addLineEndOnGeometry(bool isLineA, Location locLineEnd, Location locTarget, int dimTarget, const CoordinateXY* pt);
+
197 
+
214  void addAreaVertex(bool isAreaA, Location locArea, Location locTarget, int dimTarget, const CoordinateXY* pt);
+
215 
+
216  void addAreaVertexOnArea(bool isAreaA, Location locArea, Location locTarget, const CoordinateXY* pt);
+
217 
+
218  void evaluateNodes();
+
219 
+
224  TopologyComputer(const TopologyComputer&) = delete;
+
225  TopologyComputer& operator=(const TopologyComputer&) = delete;
+
226 
+
227 
+
228 };
229 
-
230 
-
231 };
-
232 
-
233 } // namespace geos.operation.relateng
-
234 } // namespace geos.operation
-
235 } // namespace geos
-
236 
-
Definition: NodeSection.h:55
+
230 } // namespace geos.operation.relateng
+
231 } // namespace geos.operation
+
232 } // namespace geos
+
233 
+
Definition: NodeSection.h:50
Location
Constants representing the location of a point relative to a geometry.
Definition: Location.h:32
Basic namespace for all GEOS functionalities.
Definition: Angle.h:25
diff --git a/doxygen/TopologyLocation_8h_source.html b/doxygen/TopologyLocation_8h_source.html index d7913f6c60..c7fbbad3ba 100644 --- a/doxygen/TopologyLocation_8h_source.html +++ b/doxygen/TopologyLocation_8h_source.html @@ -83,173 +83,172 @@
34 #pragma warning(disable: 4251) // warning C4251: needs to have dll-interface to be used by clients of class
35 #endif
36 
-
37 using geos::geom::Position;
-
38 using geos::geom::Location;
+
37 namespace geos {
+
38 namespace geomgraph { // geos.geomgraph
39 
-
40 namespace geos {
-
41 namespace geomgraph { // geos.geomgraph
-
42 
-
63 class GEOS_DLL TopologyLocation {
-
64 
-
65 public:
-
66 
-
67  friend std::ostream& operator<< (std::ostream&, const TopologyLocation&);
-
68 
-
69  TopologyLocation() = default;
-
70 
-
82  TopologyLocation(Location on, Location left, Location right)
-
83  : locationSize(3)
-
84  {
-
85  location[Position::ON] = on;
-
86  location[Position::LEFT] = left;
-
87  location[Position::RIGHT] = right;
-
88  }
-
89 
-
90  TopologyLocation(Location on)
-
91  : locationSize(1)
-
92  {
-
93  location.fill(Location::NONE);
-
94  location[Position::ON] = on;
-
95  };
-
96 
-
97  TopologyLocation(const TopologyLocation& gl)
-
98  : location(gl.location)
-
99  , locationSize(gl.locationSize)
-
100  {};
-
101 
-
102  TopologyLocation& operator= (const TopologyLocation& gl)
-
103  {
-
104  location = gl.location;
-
105  locationSize = gl.locationSize;
-
106  return *this;
-
107  };
-
108 
-
109  Location get(std::size_t posIndex) const
-
110  {
-
111  // should be an assert() instead ?
-
112  if(posIndex < locationSize) {
-
113  return location[posIndex];
-
114  }
-
115  return Location::NONE;
-
116  };
-
117 
-
121  bool isNull() const
-
122  {
-
123  for(std::size_t i = 0; i < locationSize; ++i) {
-
124  if(location[i] != Location::NONE) {
-
125  return false;
-
126  }
-
127  }
-
128  return true;
-
129  };
-
130 
-
134  bool isAnyNull() const
-
135  {
-
136  for(std::size_t i = 0; i < locationSize; ++i) {
-
137  if(location[i] == Location::NONE) {
-
138  return true;
-
139  }
-
140  }
-
141  return false;
-
142  };
-
143 
-
144  bool isEqualOnSide(const TopologyLocation& le, uint32_t locIndex) const
-
145  {
-
146  return location[locIndex] == le.location[locIndex];
-
147  };
-
148 
-
149  bool isArea() const
-
150  {
-
151  return locationSize > 1;
-
152  };
-
153 
-
154  bool isLine() const
-
155  {
-
156  return locationSize == 1;
-
157  };
-
158 
-
159  void flip()
-
160  {
-
161  if(locationSize <= 1) {
-
162  return;
-
163  }
-
164  std::swap(location[Position::LEFT], location[Position::RIGHT]);
-
165  };
-
166 
-
167  void setAllLocations(Location locValue)
-
168  {
-
169  location.fill(locValue);
-
170  };
+
60 class GEOS_DLL TopologyLocation {
+
61  using Position = geos::geom::Position;
+
62  using Location = geos::geom::Location;
+
63 
+
64 public:
+
65 
+
66  friend std::ostream& operator<< (std::ostream&, const TopologyLocation&);
+
67 
+
68  TopologyLocation() = default;
+
69 
+
81  TopologyLocation(Location on, Location left, Location right)
+
82  : locationSize(3)
+
83  {
+
84  location[Position::ON] = on;
+
85  location[Position::LEFT] = left;
+
86  location[Position::RIGHT] = right;
+
87  }
+
88 
+
89  TopologyLocation(Location on)
+
90  : locationSize(1)
+
91  {
+
92  location.fill(Location::NONE);
+
93  location[Position::ON] = on;
+
94  };
+
95 
+
96  TopologyLocation(const TopologyLocation& gl)
+
97  : location(gl.location)
+
98  , locationSize(gl.locationSize)
+
99  {};
+
100 
+
101  TopologyLocation& operator= (const TopologyLocation& gl)
+
102  {
+
103  location = gl.location;
+
104  locationSize = gl.locationSize;
+
105  return *this;
+
106  };
+
107 
+
108  Location get(std::size_t posIndex) const
+
109  {
+
110  // should be an assert() instead ?
+
111  if(posIndex < locationSize) {
+
112  return location[posIndex];
+
113  }
+
114  return Location::NONE;
+
115  };
+
116 
+
120  bool isNull() const
+
121  {
+
122  for(std::size_t i = 0; i < locationSize; ++i) {
+
123  if(location[i] != Location::NONE) {
+
124  return false;
+
125  }
+
126  }
+
127  return true;
+
128  };
+
129 
+
133  bool isAnyNull() const
+
134  {
+
135  for(std::size_t i = 0; i < locationSize; ++i) {
+
136  if(location[i] == Location::NONE) {
+
137  return true;
+
138  }
+
139  }
+
140  return false;
+
141  };
+
142 
+
143  bool isEqualOnSide(const TopologyLocation& le, uint32_t locIndex) const
+
144  {
+
145  return location[locIndex] == le.location[locIndex];
+
146  };
+
147 
+
148  bool isArea() const
+
149  {
+
150  return locationSize > 1;
+
151  };
+
152 
+
153  bool isLine() const
+
154  {
+
155  return locationSize == 1;
+
156  };
+
157 
+
158  void flip()
+
159  {
+
160  if(locationSize <= 1) {
+
161  return;
+
162  }
+
163  std::swap(location[Position::LEFT], location[Position::RIGHT]);
+
164  };
+
165 
+
166  void setAllLocations(Location locValue)
+
167  {
+
168  location.fill(locValue);
+
169  };
+
170 
171 
-
172 
-
173  void setAllLocationsIfNull(Location locValue)
-
174  {
-
175  for(std::size_t i = 0; i < locationSize; ++i) {
-
176  if(location[i] == Location::NONE) {
-
177  location[i] = locValue;
-
178  }
-
179  }
-
180  };
-
181 
-
182  void setLocation(std::size_t locIndex, Location locValue)
-
183  {
-
184  location[locIndex] = locValue;
-
185  };
-
186 
-
187  void setLocation(Location locValue)
-
188  {
-
189  setLocation(Position::ON, locValue);
-
190  };
-
191 
-
192  const std::array<Location, 3>& getLocations() const
-
193  {
-
194  return location;
-
195  };
-
196 
-
197  void setLocations(Location on, Location left, Location right)
-
198  {
-
199  assert(locationSize >= 3);
-
200  location[Position::ON] = on;
-
201  location[Position::LEFT] = left;
-
202  location[Position::RIGHT] = right;
-
203  };
-
204 
-
205  bool allPositionsEqual(Location loc) const
-
206  {
-
207  for(std::size_t i = 0; i < locationSize; ++i) {
-
208  if(location[i] != loc) {
-
209  return false;
-
210  }
-
211  }
-
212  return true;
-
213  };
-
214 
-
219  void merge(const TopologyLocation& gl);
-
220 
-
221  std::string toString() const;
+
172  void setAllLocationsIfNull(Location locValue)
+
173  {
+
174  for(std::size_t i = 0; i < locationSize; ++i) {
+
175  if(location[i] == Location::NONE) {
+
176  location[i] = locValue;
+
177  }
+
178  }
+
179  };
+
180 
+
181  void setLocation(std::size_t locIndex, Location locValue)
+
182  {
+
183  location[locIndex] = locValue;
+
184  };
+
185 
+
186  void setLocation(Location locValue)
+
187  {
+
188  setLocation(Position::ON, locValue);
+
189  };
+
190 
+
191  const std::array<Location, 3>& getLocations() const
+
192  {
+
193  return location;
+
194  };
+
195 
+
196  void setLocations(Location on, Location left, Location right)
+
197  {
+
198  assert(locationSize >= 3);
+
199  location[Position::ON] = on;
+
200  location[Position::LEFT] = left;
+
201  location[Position::RIGHT] = right;
+
202  };
+
203 
+
204  bool allPositionsEqual(Location loc) const
+
205  {
+
206  for(std::size_t i = 0; i < locationSize; ++i) {
+
207  if(location[i] != loc) {
+
208  return false;
+
209  }
+
210  }
+
211  return true;
+
212  };
+
213 
+
218  void merge(const TopologyLocation& gl);
+
219 
+
220  std::string toString() const;
+
221 
222 
-
223 
-
224 private:
-
225 
-
226  std::array<geom::Location, 3> location;
-
227  std::uint8_t locationSize;
-
228 
-
229 };
-
230 
-
231 std::ostream& operator<< (std::ostream&, const TopologyLocation&);
-
232 
-
233 } // namespace geos.geomgraph
-
234 } // namespace geos
-
235 
-
236 #ifdef _MSC_VER
-
237 #pragma warning(pop)
-
238 #endif
+
223 private:
+
224 
+
225  std::array<geom::Location, 3> location;
+
226  std::uint8_t locationSize;
+
227 
+
228 };
+
229 
+
230 std::ostream& operator<< (std::ostream&, const TopologyLocation&);
+
231 
+
232 } // namespace geos.geomgraph
+
233 } // namespace geos
+
234 
+
235 #ifdef _MSC_VER
+
236 #pragma warning(pop)
+
237 #endif
A Position indicates the position of a Location relative to a graph component (Node,...
Definition: Position.h:37
-
A TopologyLocation is the labelling of a GraphComponent's topological relationship to a single Geomet...
Definition: TopologyLocation.h:63
-
bool isNull() const
Definition: TopologyLocation.h:121
-
TopologyLocation(Location on, Location left, Location right)
Constructs a TopologyLocation specifying how points on, to the left of, and to the right of some Grap...
Definition: TopologyLocation.h:82
+
A TopologyLocation is the labelling of a GraphComponent's topological relationship to a single Geomet...
Definition: TopologyLocation.h:60
+
bool isNull() const
Definition: TopologyLocation.h:120
+
TopologyLocation(Location on, Location left, Location right)
Constructs a TopologyLocation specifying how points on, to the left of, and to the right of some Grap...
Definition: TopologyLocation.h:81
void merge(const TopologyLocation &gl)
merge updates only the UNDEF attributes of this object with the attributes of another.
-
bool isAnyNull() const
Definition: TopologyLocation.h:134
+
bool isAnyNull() const
Definition: TopologyLocation.h:133
Location
Constants representing the location of a point relative to a geometry.
Definition: Location.h:32
Basic namespace for all GEOS functionalities.
Definition: Angle.h:25
diff --git a/doxygen/TopologyPredicate_8h_source.html b/doxygen/TopologyPredicate_8h_source.html index 8c3216e4d1..5e4ad7d93f 100644 --- a/doxygen/TopologyPredicate_8h_source.html +++ b/doxygen/TopologyPredicate_8h_source.html @@ -73,81 +73,78 @@
24 // Forward declarations
25 namespace geos {
26 namespace geom {
-
27  class Envelope;
+
27  class Envelope;
28 }
29 }
30 
-
31 
-
32 using geos::geom::Envelope;
-
33 using geos::geom::Location;
+
31 namespace geos { // geos.
+
32 namespace operation { // geos.operation
+
33 namespace relateng { // geos.operation.relateng
34 
35 
-
36 namespace geos { // geos.
-
37 namespace operation { // geos.operation
-
38 namespace relateng { // geos.operation.relateng
+
36 class GEOS_DLL TopologyPredicate {
+
37  using Envelope = geos::geom::Envelope;
+
38  using Location = geos::geom::Location;
39 
-
40 
-
41 class GEOS_DLL TopologyPredicate {
-
42 
-
43 public:
+
40 public:
+
41 
+
42  /* Virtual destructor to ensure proper cleanup of derived classes */
+
43  virtual ~TopologyPredicate() {};
44 
-
45  /* Virtual destructor to ensure proper cleanup of derived classes */
-
46  virtual ~TopologyPredicate() {};
-
47 
-
53  virtual std::string name() const = 0;
-
54 
-
59  virtual void finish() = 0;
-
60 
-
66  virtual bool isKnown() const = 0;
-
67 
-
74  virtual bool value() const = 0;
-
75 
-
92  virtual bool requireSelfNoding() const {
-
93  return true;
-
94  };
-
95 
-
108  virtual bool requireInteraction() const {
-
109  return true;
-
110  };
-
111 
-
125  virtual bool requireCovers(bool isSourceA) {
-
126  (void)isSourceA;
-
127  return false;
-
128  }
-
129 
-
142  virtual bool requireExteriorCheck(bool isSourceA) const {
-
143  (void)isSourceA;
-
144  return true;
-
145  }
-
146 
-
157  virtual void init(int dimA, int dimB) {
-
158  (void)dimA;
-
159  (void)dimB;
-
160  };
-
161 
-
170  virtual void init(const Envelope& envA, const Envelope& envB)
-
171  {
-
172  //-- default if envelopes provide no information
-
173  (void)envA;
-
174  (void)envB;
-
175  };
-
176 
-
193  virtual void updateDimension(Location locA, Location locB, int dimension) = 0;
-
194 
-
195 
-
196  friend std::ostream&
-
197  operator<<(std::ostream& os, const TopologyPredicate& ns)
-
198  {
-
199  os << ns.name();
-
200  return os;
-
201  }
-
202 
-
203 };
-
204 
-
205 } // namespace geos.operation.relateng
-
206 } // namespace geos.operation
-
207 } // namespace geos
-
208 
+
50  virtual std::string name() const = 0;
+
51 
+
56  virtual void finish() = 0;
+
57 
+
63  virtual bool isKnown() const = 0;
+
64 
+
71  virtual bool value() const = 0;
+
72 
+
89  virtual bool requireSelfNoding() const {
+
90  return true;
+
91  };
+
92 
+
105  virtual bool requireInteraction() const {
+
106  return true;
+
107  };
+
108 
+
122  virtual bool requireCovers(bool isSourceA) {
+
123  (void)isSourceA;
+
124  return false;
+
125  }
+
126 
+
139  virtual bool requireExteriorCheck(bool isSourceA) const {
+
140  (void)isSourceA;
+
141  return true;
+
142  }
+
143 
+
154  virtual void init(int dimA, int dimB) {
+
155  (void)dimA;
+
156  (void)dimB;
+
157  };
+
158 
+
167  virtual void init(const Envelope& envA, const Envelope& envB)
+
168  {
+
169  //-- default if envelopes provide no information
+
170  (void)envA;
+
171  (void)envB;
+
172  };
+
173 
+
190  virtual void updateDimension(Location locA, Location locB, int dimension) = 0;
+
191 
+
192 
+
193  friend std::ostream&
+
194  operator<<(std::ostream& os, const TopologyPredicate& ns)
+
195  {
+
196  os << ns.name();
+
197  return os;
+
198  }
+
199 
+
200 };
+
201 
+
202 } // namespace geos.operation.relateng
+
203 } // namespace geos.operation
+
204 } // namespace geos
+
205 
An Envelope defines a rectangulare region of the 2D coordinate plane.
Definition: Envelope.h:59
Location
Constants representing the location of a point relative to a geometry.
Definition: Location.h:32
Basic namespace for all GEOS functionalities.
Definition: Angle.h:25
diff --git a/doxygen/TriDelaunayImprover_8h_source.html b/doxygen/TriDelaunayImprover_8h_source.html index 0857b8ad5a..b637420617 100644 --- a/doxygen/TriDelaunayImprover_8h_source.html +++ b/doxygen/TriDelaunayImprover_8h_source.html @@ -71,67 +71,66 @@
22 // Forward declarations
23 namespace geos {
24 namespace geom {
-
25 class Coordinate;
+
25 class Coordinate;
26 }
27 }
28 
-
29 using geos::geom::Coordinate;
-
30 using geos::triangulate::tri::TriList;
-
31 using geos::triangulate::tri::Tri;
+
29 namespace geos {
+
30 namespace triangulate {
+
31 namespace polygon {
32 
33 
-
34 namespace geos {
-
35 namespace triangulate {
-
36 namespace polygon {
-
37 
-
38 
-
48 class GEOS_DLL TriDelaunayImprover {
-
49 
-
50 private:
-
51 
-
52  // Members
-
53  static constexpr std::size_t MAX_ITERATION = 200;
-
54  TriList<Tri>& triList;
-
55 
-
64  std::size_t improveScan(TriList<Tri>& triList);
-
65 
-
73  bool improveNonDelaunay(Tri* tri, TriIndex index);
-
74 
-
88  static bool isConvex(const Coordinate& adj0, const Coordinate& adj1,
-
89  const Coordinate& opp0, const Coordinate& opp1);
-
90 
-
103  static bool isDelaunay(const Coordinate& adj0, const Coordinate& adj1,
-
104  const Coordinate& opp0, const Coordinate& opp1);
-
105 
-
116  static bool
-
117  isInCircle(const Coordinate& a, const Coordinate& b,
-
118  const Coordinate& c, const Coordinate& p);
-
119 
-
120  void improve();
+
43 class GEOS_DLL TriDelaunayImprover {
+
44  using Coordinate = geos::geom::Coordinate;
+
45  using Tri = geos::triangulate::tri::Tri;
+
46  template<typename TriType>
+
47  using TriList = geos::triangulate::tri::TriList<TriType>;
+
48 
+
49 private:
+
50 
+
51  // Members
+
52  static constexpr std::size_t MAX_ITERATION = 200;
+
53  TriList<Tri>& triList;
+
54 
+
63  std::size_t improveScan(TriList<Tri>& triList);
+
64 
+
72  bool improveNonDelaunay(Tri* tri, TriIndex index);
+
73 
+
87  static bool isConvex(const Coordinate& adj0, const Coordinate& adj1,
+
88  const Coordinate& opp0, const Coordinate& opp1);
+
89 
+
102  static bool isDelaunay(const Coordinate& adj0, const Coordinate& adj1,
+
103  const Coordinate& opp0, const Coordinate& opp1);
+
104 
+
115  static bool
+
116  isInCircle(const Coordinate& a, const Coordinate& b,
+
117  const Coordinate& c, const Coordinate& p);
+
118 
+
119  void improve();
+
120 
121 
-
122 
-
123 public:
-
124 
-
125  TriDelaunayImprover(TriList<Tri>& p_triList)
-
126  : triList(p_triList)
-
127  {};
-
128 
-
137  static void improve(TriList<Tri>& triList);
+
122 public:
+
123 
+
124  TriDelaunayImprover(TriList<Tri>& p_triList)
+
125  : triList(p_triList)
+
126  {};
+
127 
+
136  static void improve(TriList<Tri>& triList);
+
137 
138 
-
139 
-
140 };
+
139 };
+
140 
141 
142 
-
143 
-
144 } // namespace geos.triangulate.polygon
-
145 } // namespace geos.triangulate
-
146 } // namespace geos
-
147 
+
143 } // namespace geos.triangulate.polygon
+
144 } // namespace geos.triangulate
+
145 } // namespace geos
+
146 
Coordinate is the lightweight class used to store coordinates.
Definition: Coordinate.h:217
-
Definition: TriDelaunayImprover.h:48
+
Definition: TriDelaunayImprover.h:43
static void improve(TriList< Tri > &triList)
-
Definition: TriList.h:54
-
Definition: Tri.h:49
+
Definition: TriList.h:50
+
Definition: Tri.h:45
Basic namespace for all GEOS functionalities.
Definition: Angle.h:25
diff --git a/doxygen/TriEdge_8h_source.html b/doxygen/TriEdge_8h_source.html index 7c9e715b11..7da400cd07 100644 --- a/doxygen/TriEdge_8h_source.html +++ b/doxygen/TriEdge_8h_source.html @@ -67,52 +67,51 @@
18 #include <geos/geom/Coordinate.h>
19 #include <iostream>
20 
-
21 using geos::geom::Coordinate;
-
22 
-
23 namespace geos { // geos.
-
24 namespace triangulate { // geos.triangulate
-
25 namespace tri { // geos.triangulate.tri
-
26 
-
27 
-
37 class GEOS_DLL TriEdge {
-
38 
-
39 private:
-
40 
-
41  void normalize();
+
21 namespace geos { // geos.
+
22 namespace triangulate { // geos.triangulate
+
23 namespace tri { // geos.triangulate.tri
+
24 
+
25 
+
35 class GEOS_DLL TriEdge {
+
36  using Coordinate = geos::geom::Coordinate;
+
37 
+
38 private:
+
39 
+
40  void normalize();
+
41 
42 
-
43 
-
44 public:
-
45 
-
46  // Members
-
47  Coordinate p0;
-
48  Coordinate p1;
-
49 
-
50  TriEdge(const Coordinate& a, const Coordinate& b)
-
51  : p0(a)
-
52  , p1(b)
-
53  {
-
54  normalize();
-
55  }
-
56 
-
57  struct GEOS_DLL HashCode {
-
58  std::size_t operator()(const TriEdge& te) const;
-
59  };
-
60 
-
61  friend bool operator == (const TriEdge& te0, const TriEdge& te1);
-
62 
-
63  friend std::ostream& operator << (std::ostream& os, const TriEdge& te);
-
64 
-
65 };
+
43 public:
+
44 
+
45  // Members
+
46  Coordinate p0;
+
47  Coordinate p1;
+
48 
+
49  TriEdge(const Coordinate& a, const Coordinate& b)
+
50  : p0(a)
+
51  , p1(b)
+
52  {
+
53  normalize();
+
54  }
+
55 
+
56  struct GEOS_DLL HashCode {
+
57  std::size_t operator()(const TriEdge& te) const;
+
58  };
+
59 
+
60  friend bool operator == (const TriEdge& te0, const TriEdge& te1);
+
61 
+
62  friend std::ostream& operator << (std::ostream& os, const TriEdge& te);
+
63 
+
64 };
+
65 
66 
67 
68 
-
69 
-
70 } // namespace geos.triangulate.tri
-
71 } // namespace geos.triangulate
-
72 } // namespace geos
-
73 
+
69 } // namespace geos.triangulate.tri
+
70 } // namespace geos.triangulate
+
71 } // namespace geos
+
72 
Coordinate is the lightweight class used to store coordinates.
Definition: Coordinate.h:217
-
Definition: TriEdge.h:37
+
Definition: TriEdge.h:35
Basic namespace for all GEOS functionalities.
Definition: Angle.h:25
diff --git a/doxygen/TriList_8h_source.html b/doxygen/TriList_8h_source.html index 86bcb59f7d..187a1b74c1 100644 --- a/doxygen/TriList_8h_source.html +++ b/doxygen/TriList_8h_source.html @@ -75,157 +75,156 @@
26 // Forward declarations
27 namespace geos {
28 namespace geom {
-
29 class Coordinate;
-
30 class Geometry;
+
29 class Coordinate;
+
30 class Geometry;
31 }
32 }
33 
-
34 using geos::geom::Coordinate;
-
35 using geos::geom::Geometry;
-
36 using geos::geom::GeometryFactory;
-
37 
-
38 typedef int TriIndex;
+
34 typedef int TriIndex;
+
35 
+
36 namespace geos { // geos.
+
37 namespace triangulate { // geos.triangulate
+
38 namespace tri { // geos.triangulate.tri
39 
-
40 namespace geos { // geos.
-
41 namespace triangulate { // geos.triangulate
-
42 namespace tri { // geos.triangulate.tri
-
43 
-
44 
-
53 template<typename TriType>
-
54 class TriList {
-
55 
-
56 private:
-
57 
-
58  // Members
-
59  std::deque<TriType> triStore;
-
60  std::vector<TriType*> tris;
-
61 
-
62  // Methods
-
63  TriType* create(const Coordinate& c0, const Coordinate& c1, const Coordinate& c2)
-
64  {
-
65  triStore.emplace_back(c0, c1, c2);
-
66  TriType* newTri = &triStore.back();
-
67  return newTri;
-
68  }
+
40 
+
49 template<typename TriType>
+
50 class TriList {
+
51  using Coordinate = geos::geom::Coordinate;
+
52  using Geometry = geos::geom::Geometry;
+
53  using GeometryFactory = geos::geom::GeometryFactory;
+
54 
+
55 private:
+
56 
+
57  // Members
+
58  std::deque<TriType> triStore;
+
59  std::vector<TriType*> tris;
+
60 
+
61  // Methods
+
62  TriType* create(const Coordinate& c0, const Coordinate& c1, const Coordinate& c2)
+
63  {
+
64  triStore.emplace_back(c0, c1, c2);
+
65  TriType* newTri = &triStore.back();
+
66  return newTri;
+
67  }
+
68 
69 
-
70 
-
71 public:
-
72 
-
73  TriList() {};
-
74 
-
75  std::vector<TriType*>& getTris()
-
76  {
-
77  return tris;
-
78  }
-
79 
-
80  void remove(TriType* tri)
-
81  {
-
82  // We can leave triStore untouched, just remove
-
83  // the pointer from tris.
-
84  for (auto it = tris.begin(); it != tris.end(); ++it) {
-
85  if (*it == tri) {
-
86  tris.erase(it);
-
87  return;
-
88  }
-
89  }
-
90  }
-
91 
-
92  void add(const Coordinate& c0, const Coordinate& c1, const Coordinate& c2)
-
93  {
-
94  auto* newTri = create(c0, c1, c2);
-
95  tris.push_back(newTri);
-
96  };
-
97 
-
98  void add(std::array<Coordinate, 3>& corner)
-
99  {
-
100  add(corner[0], corner[1], corner[2]);
-
101  };
-
102 
-
103  double area()
-
104  {
-
105  double dArea = 0.0;
-
106  for (const auto* tri : tris) {
-
107  dArea += tri->getArea();
-
108  }
-
109  return dArea;
-
110  };
-
111 
-
112  double length()
-
113  {
-
114  double dLength = 0.0;
-
115  for (const auto* tri : tris) {
-
116  dLength += tri->getLength();
-
117  }
-
118  return dLength;
-
119  };
-
120 
-
121  /* public */
-
122  std::size_t
-
123  degree(const TriType* tri, TriIndex index)
-
124  {
-
125  const Coordinate& v = tri->getCoordinate(index);
-
126  std::size_t szDegree = 0;
-
127  for (auto* t : *this) {
-
128  for (TriIndex i = 0; i < 3; i++) {
-
129  if (v.equals2D(t->getCoordinate(i)))
-
130  szDegree++;
-
131  }
-
132  }
-
133  return szDegree;
-
134  }
-
135 
-
136  void validate()
-
137  {
-
138  for (auto* tri : *this) {
-
139  tri->validate();
-
140  }
-
141  }
-
142 
-
143  std::unique_ptr<Geometry> toGeometry(
-
144  const GeometryFactory* geomFact) const
-
145  {
-
146  std::vector<std::unique_ptr<Geometry>> geoms;
-
147  for (auto* tri: tris) {
-
148  std::unique_ptr<Geometry> geom = tri->toPolygon(geomFact);
-
149  geoms.emplace_back(geom.release());
-
150  }
-
151  return geomFact->createGeometryCollection(std::move(geoms));
-
152  }
-
153 
-
154  friend std::ostream& operator << (std::ostream& os, TriList& triList)
-
155  {
-
156  os << "TRILIST ";
-
157  os << "[" << triList.size() << "] (";
-
158  for (auto* tri: triList) {
-
159  os << " " << *tri << "," << std::endl;
-
160  }
-
161  os << ")";
-
162  return os;
-
163  }
-
164 
-
165  // Support for iterating on TriList
-
166  typedef typename std::vector<TriType*>::iterator iterator;
-
167  typedef typename std::vector<TriType*>::const_iterator const_iterator;
-
168  size_t size() const { return tris.size(); }
-
169  bool empty() const { return tris.empty(); }
-
170  iterator begin() { return tris.begin(); }
-
171  iterator end() { return tris.end(); }
-
172  const_iterator begin() const { return tris.begin(); }
-
173  const_iterator end() const { return tris.end(); }
-
174  TriType* operator [] (std::size_t index) { return tris[index]; }
-
175 
-
176 };
+
70 public:
+
71 
+
72  TriList() {};
+
73 
+
74  std::vector<TriType*>& getTris()
+
75  {
+
76  return tris;
+
77  }
+
78 
+
79  void remove(TriType* tri)
+
80  {
+
81  // We can leave triStore untouched, just remove
+
82  // the pointer from tris.
+
83  for (auto it = tris.begin(); it != tris.end(); ++it) {
+
84  if (*it == tri) {
+
85  tris.erase(it);
+
86  return;
+
87  }
+
88  }
+
89  }
+
90 
+
91  void add(const Coordinate& c0, const Coordinate& c1, const Coordinate& c2)
+
92  {
+
93  auto* newTri = create(c0, c1, c2);
+
94  tris.push_back(newTri);
+
95  };
+
96 
+
97  void add(std::array<Coordinate, 3>& corner)
+
98  {
+
99  add(corner[0], corner[1], corner[2]);
+
100  };
+
101 
+
102  double area()
+
103  {
+
104  double dArea = 0.0;
+
105  for (const auto* tri : tris) {
+
106  dArea += tri->getArea();
+
107  }
+
108  return dArea;
+
109  };
+
110 
+
111  double length()
+
112  {
+
113  double dLength = 0.0;
+
114  for (const auto* tri : tris) {
+
115  dLength += tri->getLength();
+
116  }
+
117  return dLength;
+
118  };
+
119 
+
120  /* public */
+
121  std::size_t
+
122  degree(const TriType* tri, TriIndex index)
+
123  {
+
124  const Coordinate& v = tri->getCoordinate(index);
+
125  std::size_t szDegree = 0;
+
126  for (auto* t : *this) {
+
127  for (TriIndex i = 0; i < 3; i++) {
+
128  if (v.equals2D(t->getCoordinate(i)))
+
129  szDegree++;
+
130  }
+
131  }
+
132  return szDegree;
+
133  }
+
134 
+
135  void validate()
+
136  {
+
137  for (auto* tri : *this) {
+
138  tri->validate();
+
139  }
+
140  }
+
141 
+
142  std::unique_ptr<Geometry> toGeometry(
+
143  const GeometryFactory* geomFact) const
+
144  {
+
145  std::vector<std::unique_ptr<Geometry>> geoms;
+
146  for (auto* tri: tris) {
+
147  std::unique_ptr<Geometry> geom = tri->toPolygon(geomFact);
+
148  geoms.emplace_back(geom.release());
+
149  }
+
150  return geomFact->createGeometryCollection(std::move(geoms));
+
151  }
+
152 
+
153  friend std::ostream& operator << (std::ostream& os, TriList& triList)
+
154  {
+
155  os << "TRILIST ";
+
156  os << "[" << triList.size() << "] (";
+
157  for (auto* tri: triList) {
+
158  os << " " << *tri << "," << std::endl;
+
159  }
+
160  os << ")";
+
161  return os;
+
162  }
+
163 
+
164  // Support for iterating on TriList
+
165  typedef typename std::vector<TriType*>::iterator iterator;
+
166  typedef typename std::vector<TriType*>::const_iterator const_iterator;
+
167  size_t size() const { return tris.size(); }
+
168  bool empty() const { return tris.empty(); }
+
169  iterator begin() { return tris.begin(); }
+
170  iterator end() { return tris.end(); }
+
171  const_iterator begin() const { return tris.begin(); }
+
172  const_iterator end() const { return tris.end(); }
+
173  TriType* operator [] (std::size_t index) { return tris[index]; }
+
174 
+
175 };
+
176 
177 
-
178 
-
179 } // namespace geos.triangulate.tri
-
180 } // namespace geos.triangulate
-
181 } // namespace geos
-
182 
+
178 } // namespace geos.triangulate.tri
+
179 } // namespace geos.triangulate
+
180 } // namespace geos
+
181 
Coordinate is the lightweight class used to store coordinates.
Definition: Coordinate.h:217
Supplies a set of utility methods for building Geometry objects from CoordinateSequence or other Geom...
Definition: GeometryFactory.h:70
std::unique_ptr< GeometryCollection > createGeometryCollection() const
Construct an EMPTY GeometryCollection.
Basic implementation of Geometry, constructed and destructed by GeometryFactory.
Definition: Geometry.h:197
-
Definition: TriList.h:54
+
Definition: TriList.h:50
Basic namespace for all GEOS functionalities.
Definition: Angle.h:25
diff --git a/doxygen/Tri_8h_source.html b/doxygen/Tri_8h_source.html index e0d13c5227..aeebd23763 100644 --- a/doxygen/Tri_8h_source.html +++ b/doxygen/Tri_8h_source.html @@ -71,22 +71,22 @@
22 // Forward declarations
23 namespace geos {
24 namespace geom {
-
25 class Geometry;
-
26 class GeometryFactory;
-
27 class Polygon;
+
25 class Geometry;
+
26 class GeometryFactory;
+
27 class Polygon;
28 }
29 }
30 
-
31 using geos::geom::Coordinate;
-
32 using geos::geom::Polygon;
-
33 using geos::geom::GeometryFactory;
+
31 namespace geos { // geos.
+
32 namespace triangulate { // geos.triangulate
+
33 namespace tri { // geos.triangulate.tri
34 
-
35 namespace geos { // geos.
-
36 namespace triangulate { // geos.triangulate
-
37 namespace tri { // geos.triangulate.tri
-
38 
-
39 
-
49 class GEOS_DLL Tri {
+
35 
+
45 class GEOS_DLL Tri {
+
46  using Coordinate = geos::geom::Coordinate;
+
47  using Polygon = geos::geom::Polygon;
+
48  using Geometry = geos::geom::Geometry;
+
49  using GeometryFactory = geos::geom::GeometryFactory;
50 
51 protected:
52 
@@ -125,7 +125,7 @@
105  {};
106 
107  void setAdjacent(Tri* p_tri0, Tri* p_tri1, Tri* p_tri2);
-
108  void setAdjacent(const Coordinate& pt, Tri* tri);
+
108  void setAdjacent(const Coordinate& pt, Tri* tri);
109  void setTri(TriIndex edgeIndex, Tri* tri);
110 
119  void flip(TriIndex index);
@@ -187,8 +187,8 @@
Supplies a set of utility methods for building Geometry objects from CoordinateSequence or other Geom...
Definition: GeometryFactory.h:70
Basic implementation of Geometry, constructed and destructed by GeometryFactory.
Definition: Geometry.h:197
Represents a linear polygon, which may include holes.
Definition: Polygon.h:61
-
-
Definition: Tri.h:49
+
Definition: TriList.h:50
+
Definition: Tri.h:45
void remove()
bool isInteriorVertex(TriIndex index) const
void flip(TriIndex index)
diff --git a/doxygen/TriangulationBuilder_8h_source.html b/doxygen/TriangulationBuilder_8h_source.html index 26e092cd3f..e859a801a7 100644 --- a/doxygen/TriangulationBuilder_8h_source.html +++ b/doxygen/TriangulationBuilder_8h_source.html @@ -72,7 +72,7 @@
23 // Forward declarations
24 namespace geos {
25 namespace geom {
-
26 class Coordinate;
+
26 class Coordinate;
27 }
28 namespace triangulate {
29 namespace tri {
@@ -81,50 +81,49 @@
32 }
33 }
34 
-
35 using geos::geom::Coordinate;
-
36 
-
37 namespace geos { // geos.
-
38 namespace triangulate { // geos.triangulate
-
39 namespace tri { // geos.triangulate.tri
-
40 
-
41 
-
49 class GEOS_DLL TriangulationBuilder {
-
50 
-
51 private:
-
52 
-
53  // Members
-
54  std::unordered_map<TriEdge, Tri*, TriEdge::HashCode> triMap;
-
55 
-
56  // Methods
-
57  Tri* find(const Coordinate& p0, const Coordinate& p1) const;
-
58  void addAdjacent(Tri* tri, Tri* adj, const Coordinate& p0, const Coordinate& p1);
+
35 namespace geos { // geos.
+
36 namespace triangulate { // geos.triangulate
+
37 namespace tri { // geos.triangulate.tri
+
38 
+
39 
+
47 class GEOS_DLL TriangulationBuilder {
+
48  using Coordinate = geos::geom::Coordinate;
+
49 
+
50 private:
+
51 
+
52  // Members
+
53  std::unordered_map<TriEdge, Tri*, TriEdge::HashCode> triMap;
+
54 
+
55  // Methods
+
56  Tri* find(const Coordinate& p0, const Coordinate& p1) const;
+
57  void addAdjacent(Tri* tri, Tri* adj, const Coordinate& p0, const Coordinate& p1);
+
58 
59 
-
60 
-
61 public:
-
62 
-
63  TriangulationBuilder(TriList<Tri>& triList);
-
64 
-
65  TriangulationBuilder() {};
-
66  void add(Tri* tri);
-
67 
-
73  static void build(TriList<Tri>& triList);
-
74 
-
75 };
+
60 public:
+
61 
+
62  TriangulationBuilder(TriList<Tri>& triList);
+
63 
+
64  TriangulationBuilder() {};
+
65  void add(Tri* tri);
+
66 
+
72  static void build(TriList<Tri>& triList);
+
73 
+
74 };
+
75 
76 
77 
78 
79 
80 
81 
-
82 
-
83 } // namespace geos.triangulate.tri
-
84 } // namespace geos.triangulate
-
85 } // namespace geos
-
86 
+
82 } // namespace geos.triangulate.tri
+
83 } // namespace geos.triangulate
+
84 } // namespace geos
+
85 
Coordinate is the lightweight class used to store coordinates.
Definition: Coordinate.h:217
-
-
Definition: Tri.h:49
-
Definition: TriangulationBuilder.h:49
+
Definition: TriList.h:50
+
Definition: Tri.h:45
+
Definition: TriangulationBuilder.h:47
static void build(TriList< Tri > &triList)
Basic namespace for all GEOS functionalities.
Definition: Angle.h:25
diff --git a/doxygen/UnaryUnionNG_8h_source.html b/doxygen/UnaryUnionNG_8h_source.html index f0e41e5659..eb43034619 100644 --- a/doxygen/UnaryUnionNG_8h_source.html +++ b/doxygen/UnaryUnionNG_8h_source.html @@ -83,61 +83,63 @@
34 namespace overlayng { // geos.operation.overlayng
35 
44 class GEOS_DLL UnaryUnionNG {
-
45 
-
46 private:
+
45  using Geometry = geos::geom::Geometry;
+
46  using PrecisionModel = geos::geom::PrecisionModel;
47 
-
48  // Members
+
48 private:
49 
-
50 
+
50  // Members
51 
-
52 public:
+
52 
53 
-
57  class NGUnionStrategy : public operation::geounion::UnionStrategy {
-
58 
-
59  public:
+
54 public:
+
55 
+
59  class NGUnionStrategy : public operation::geounion::UnionStrategy {
60 
-
61  NGUnionStrategy(const PrecisionModel& p_pm)
-
62  : pm(p_pm)
-
63  {};
-
64 
-
65  std::unique_ptr<geom::Geometry>
-
66  Union(const geom::Geometry* g0, const geom::Geometry* g1) override
-
67  {
-
68  return OverlayNG::overlay(g0, g1, OverlayNG::UNION, &pm);
-
69  }
-
70 
-
71  bool
-
72  isFloatingPrecision() const override
-
73  {
-
74  return OverlayUtil::isFloating(&pm);
-
75  }
-
76 
-
77  private:
+
61  public:
+
62 
+
63  NGUnionStrategy(const PrecisionModel& p_pm)
+
64  : pm(p_pm)
+
65  {};
+
66 
+
67  std::unique_ptr<geom::Geometry>
+
68  Union(const geom::Geometry* g0, const geom::Geometry* g1) override
+
69  {
+
70  return OverlayNG::overlay(g0, g1, OverlayNG::UNION, &pm);
+
71  }
+
72 
+
73  bool
+
74  isFloatingPrecision() const override
+
75  {
+
76  return OverlayUtil::isFloating(&pm);
+
77  }
78 
-
79  const geom::PrecisionModel& pm;
+
79  private:
80 
-
81  };
+
81  const geom::PrecisionModel& pm;
82 
-
83 
-
84  // static methods
-
85  static std::unique_ptr<Geometry> Union(const Geometry* geom, const PrecisionModel& pm);
-
86  static std::unique_ptr<Geometry> Union(const Geometry* geom);
-
87 
-
88 
-
89 };
+
83  };
+
84 
+
85 
+
86  // static methods
+
87  static std::unique_ptr<Geometry> Union(const Geometry* geom, const PrecisionModel& pm);
+
88  static std::unique_ptr<Geometry> Union(const Geometry* geom);
+
89 
90 
-
91 
-
92 } // namespace geos.operation.overlayng
-
93 } // namespace geos.operation
-
94 } // namespace geos
-
95 
+
91 };
+
92 
+
93 
+
94 } // namespace geos.operation.overlayng
+
95 } // namespace geos.operation
+
96 } // namespace geos
+
97 
Basic implementation of Geometry, constructed and destructed by GeometryFactory.
Definition: Geometry.h:197
Specifies the precision model of the Coordinate in a Geometry.
Definition: PrecisionModel.h:88
Definition: UnionStrategy.h:40
static std::unique_ptr< Geometry > overlay(const Geometry *geom0, const Geometry *geom1, int opCode, const PrecisionModel *pm)
-
Definition: UnaryUnionNG.h:57
-
bool isFloatingPrecision() const override
Definition: UnaryUnionNG.h:72
-
std::unique_ptr< geom::Geometry > Union(const geom::Geometry *g0, const geom::Geometry *g1) override
Definition: UnaryUnionNG.h:66
+
Definition: UnaryUnionNG.h:59
+
bool isFloatingPrecision() const override
Definition: UnaryUnionNG.h:74
+
std::unique_ptr< geom::Geometry > Union(const geom::Geometry *g0, const geom::Geometry *g1) override
Definition: UnaryUnionNG.h:68
Definition: UnaryUnionNG.h:44
Basic namespace for all GEOS functionalities.
Definition: Angle.h:25
diff --git a/doxygen/VertexRingCounter_8h_source.html b/doxygen/VertexRingCounter_8h_source.html index 485c3b3a61..8add6ca325 100644 --- a/doxygen/VertexRingCounter_8h_source.html +++ b/doxygen/VertexRingCounter_8h_source.html @@ -71,53 +71,50 @@
22 
23 namespace geos {
24 namespace geom {
-
25 class CoordinateSequence;
-
26 class Geometry;
+
25 class CoordinateSequence;
+
26 class Geometry;
27 }
28 }
29 
-
30 using geos::geom::Coordinate;
-
31 using geos::geom::CoordinateSequence;
-
32 using geos::geom::CoordinateSequenceFilter;
-
33 using geos::geom::Geometry;
-
34 
-
35 
-
36 namespace geos {
-
37 namespace coverage { // geos::coverage
+
30 namespace geos {
+
31 namespace coverage { // geos::coverage
+
32 
+
33 class VertexRingCounter : public geos::geom::CoordinateSequenceFilter
+
34 {
+
35  using Coordinate = geos::geom::Coordinate;
+
36  using CoordinateSequence = geos::geom::CoordinateSequence;
+
37  using Geometry = geos::geom::Geometry;
38 
-
39 class VertexRingCounter : public CoordinateSequenceFilter
-
40 {
-
41 
-
42 public:
-
43 
-
44  VertexRingCounter(std::map<Coordinate, std::size_t>& counts)
-
45  : vertexCounts(counts)
-
46  {};
-
47 
-
48  bool isGeometryChanged() const override {
-
49  return false;
-
50  }
-
51 
-
52  bool isDone() const override {
-
53  return false;
-
54  }
-
55 
-
56  void filter_ro(const CoordinateSequence& seq, std::size_t i) override;
-
57 
-
58  static void count(
-
59  const std::vector<const Geometry*>& geoms,
-
60  std::map<Coordinate, std::size_t>& counts);
-
61 
-
62 private:
-
63 
-
64  std::map<Coordinate, std::size_t>& vertexCounts;
+
39 public:
+
40 
+
41  VertexRingCounter(std::map<Coordinate, std::size_t>& counts)
+
42  : vertexCounts(counts)
+
43  {};
+
44 
+
45  bool isGeometryChanged() const override {
+
46  return false;
+
47  }
+
48 
+
49  bool isDone() const override {
+
50  return false;
+
51  }
+
52 
+
53  void filter_ro(const CoordinateSequence& seq, std::size_t i) override;
+
54 
+
55  static void count(
+
56  const std::vector<const Geometry*>& geoms,
+
57  std::map<Coordinate, std::size_t>& counts);
+
58 
+
59 private:
+
60 
+
61  std::map<Coordinate, std::size_t>& vertexCounts;
+
62 
+
63 }; // VertexRingCounter
+
64 
65 
-
66 }; // VertexRingCounter
-
67 
-
68 
-
69 
-
70 } // geos::coverage
-
71 } // geos
+
66 
+
67 } // geos::coverage
+
68 } // geos
Interface for classes which provide operations that can be applied to the coordinates in a Coordinate...
Definition: CoordinateSequenceFilter.h:56
The internal representation of a list of coordinates inside a Geometry.
Definition: CoordinateSequence.h:56
Coordinate is the lightweight class used to store coordinates.
Definition: Coordinate.h:217
diff --git a/doxygen/VertexSequencePackedRtree_8h_source.html b/doxygen/VertexSequencePackedRtree_8h_source.html index 44b1507e04..67e1df468a 100644 --- a/doxygen/VertexSequencePackedRtree_8h_source.html +++ b/doxygen/VertexSequencePackedRtree_8h_source.html @@ -69,92 +69,90 @@
20 // Forward declarations
21 namespace geos {
22 namespace geom {
-
23 class Coordinate;
-
24 class CoordinateSequence;
-
25 class Envelope;
+
23 class Coordinate;
+
24 class CoordinateSequence;
+
25 class Envelope;
26 }
27 }
28 
-
29 using geos::geom::Coordinate;
-
30 using geos::geom::CoordinateSequence;
-
31 using geos::geom::Envelope;
+
29 namespace geos {
+
30 namespace index {
+
31 
32 
-
33 
-
34 namespace geos {
-
35 namespace index {
-
36 
-
37 
-
54 class GEOS_DLL VertexSequencePackedRtree {
+
49 class GEOS_DLL VertexSequencePackedRtree {
+
50  using Coordinate = geos::geom::Coordinate;
+
51  using CoordinateSequence = geos::geom::CoordinateSequence;
+
52  using Envelope = geos::geom::Envelope;
+
53 
+
54 private:
55 
-
56 private:
-
57 
-
58 
-
63  static constexpr std::size_t NODE_CAPACITY = 16;
-
64 
-
65  // Members
-
66  const CoordinateSequence& items;
-
67  std::vector<bool> removedItems;
-
68  std::vector<std::size_t> levelOffset;
-
69  std::size_t nodeCapacity = NODE_CAPACITY;
-
70  std::vector<Envelope> bounds;
-
71 
+
56 
+
61  static constexpr std::size_t NODE_CAPACITY = 16;
+
62 
+
63  // Members
+
64  const CoordinateSequence& items;
+
65  std::vector<bool> removedItems;
+
66  std::vector<std::size_t> levelOffset;
+
67  std::size_t nodeCapacity = NODE_CAPACITY;
+
68  std::vector<Envelope> bounds;
+
69 
+
70 
+
71  // Methods
72 
-
73  // Methods
+
73  void build();
74 
-
75  void build();
-
76 
-
87  std::vector<std::size_t> computeLevelOffsets();
-
88 
-
89  static std::size_t ceilDivisor(std::size_t num, std::size_t denom);
-
90  static std::size_t clampMax(std::size_t x, std::size_t max);
+
85  std::vector<std::size_t> computeLevelOffsets();
+
86 
+
87  static std::size_t ceilDivisor(std::size_t num, std::size_t denom);
+
88  static std::size_t clampMax(std::size_t x, std::size_t max);
+
89 
+
90  std::size_t levelNodeCount(std::size_t numNodes);
91 
-
92  std::size_t levelNodeCount(std::size_t numNodes);
+
92  std::vector<Envelope> createBounds();
93 
-
94  std::vector<Envelope> createBounds();
-
95 
-
96  void fillItemBounds(std::vector<Envelope>& bounds);
-
97  void fillLevelBounds(std::size_t lvl, std::vector<Envelope>& bounds);
-
98 
-
99  static Envelope computeNodeEnvelope(const std::vector<Envelope>& bounds,
+
94  void fillItemBounds(std::vector<Envelope>& bounds);
+
95  void fillLevelBounds(std::size_t lvl, std::vector<Envelope>& bounds);
+
96 
+
97  static Envelope computeNodeEnvelope(const std::vector<Envelope>& bounds,
+
98  std::size_t start, std::size_t end);
+
99  static Envelope computeItemEnvelope(const CoordinateSequence& items,
100  std::size_t start, std::size_t end);
-
101  static Envelope computeItemEnvelope(const CoordinateSequence& items,
-
102  std::size_t start, std::size_t end);
-
103 
-
104  void queryNode(const Envelope& queryEnv,
-
105  std::size_t level, std::size_t nodeIndex,
-
106  std::vector<std::size_t>& result) const;
-
107  void queryNodeRange(const Envelope& queryEnv,
-
108  std::size_t level, std::size_t nodeStartIndex,
+
101 
+
102  void queryNode(const Envelope& queryEnv,
+
103  std::size_t level, std::size_t nodeIndex,
+
104  std::vector<std::size_t>& result) const;
+
105  void queryNodeRange(const Envelope& queryEnv,
+
106  std::size_t level, std::size_t nodeStartIndex,
+
107  std::vector<std::size_t>& result) const;
+
108  void queryItemRange(const Envelope& queryEnv, std::size_t itemIndex,
109  std::vector<std::size_t>& result) const;
-
110  void queryItemRange(const Envelope& queryEnv, std::size_t itemIndex,
-
111  std::vector<std::size_t>& result) const;
-
112 
-
113  std::size_t levelSize(std::size_t level) const;
-
114  bool isNodeEmpty(std::size_t level, std::size_t index);
-
115  bool isItemsNodeEmpty(std::size_t nodeIndex);
-
116 
+
110 
+
111  std::size_t levelSize(std::size_t level) const;
+
112  bool isNodeEmpty(std::size_t level, std::size_t index);
+
113  bool isItemsNodeEmpty(std::size_t nodeIndex);
+
114 
+
115 
+
116 public:
117 
-
118 public:
-
119 
-
126  VertexSequencePackedRtree(const CoordinateSequence& pts);
+
124  VertexSequencePackedRtree(const CoordinateSequence& pts);
+
125 
+
126  std::vector<Envelope> getBounds();
127 
-
128  std::vector<Envelope> getBounds();
-
129 
-
135  void remove(std::size_t index);
-
136 
-
145  void query(const Envelope& queryEnv, std::vector<std::size_t>& result) const;
+
133  void remove(std::size_t index);
+
134 
+
143  void query(const Envelope& queryEnv, std::vector<std::size_t>& result) const;
+
144 
+
145 };
146 
-
147 };
+
147 
148 
-
149 
-
150 
-
151 } // namespace geos.index
-
152 } // namespace geos
-
153 
+
149 } // namespace geos.index
+
150 } // namespace geos
+
151 
The internal representation of a list of coordinates inside a Geometry.
Definition: CoordinateSequence.h:56
Coordinate is the lightweight class used to store coordinates.
Definition: Coordinate.h:217
An Envelope defines a rectangulare region of the 2D coordinate plane.
Definition: Envelope.h:59
-
Definition: VertexSequencePackedRtree.h:54
+
Definition: VertexSequencePackedRtree.h:49
void query(const Envelope &queryEnv, std::vector< std::size_t > &result) const
void remove(std::size_t index)
VertexSequencePackedRtree(const CoordinateSequence &pts)
diff --git a/doxygen/algorithm_2Rectangle_8h_source.html b/doxygen/algorithm_2Rectangle_8h_source.html index eda3c06833..a01a561405 100644 --- a/doxygen/algorithm_2Rectangle_8h_source.html +++ b/doxygen/algorithm_2Rectangle_8h_source.html @@ -70,47 +70,46 @@
21 namespace geos {
22 namespace geom {
23 class Coordinate;
-
24 class GeometryFactory;
-
25 class Polygon;
+
24 class GeometryFactory;
+
25 class Polygon;
26 }
27 }
28 
-
29 using geos::geom::CoordinateXY;
-
30 using geos::geom::GeometryFactory;
-
31 using geos::geom::LineSegment;
-
32 using geos::geom::Polygon;
-
33 
-
34 namespace geos {
-
35 namespace algorithm {
-
36 
-
37 class GEOS_DLL Rectangle {
-
38 
-
39 public:
-
40 
-
64  static std::unique_ptr<Polygon>
-
65  createFromSidePts(
-
66  const CoordinateXY& baseRightPt,
-
67  const CoordinateXY& baseLeftPt,
-
68  const CoordinateXY& oppositePt,
-
69  const CoordinateXY& leftSidePt,
-
70  const CoordinateXY& rightSidePt,
-
71  const GeometryFactory* factory);
-
72 
-
73 private:
-
74 
-
84  static double
-
85  computeLineEquationC(double a, double b, const CoordinateXY& p);
-
86 
-
87  static LineSegment
-
88  createLineForStandardEquation(double a, double b, double c);
-
89 
-
90 };
+
29 namespace geos {
+
30 namespace algorithm {
+
31 
+
32 class GEOS_DLL Rectangle {
+
33  using CoordinateXY = geos::geom::CoordinateXY;
+
34  using GeometryFactory = geos::geom::GeometryFactory;
+
35  using LineSegment = geos::geom::LineSegment;
+
36  using Polygon = geos::geom::Polygon;
+
37 
+
38 public:
+
39 
+
63  static std::unique_ptr<Polygon>
+
64  createFromSidePts(
+
65  const CoordinateXY& baseRightPt,
+
66  const CoordinateXY& baseLeftPt,
+
67  const CoordinateXY& oppositePt,
+
68  const CoordinateXY& leftSidePt,
+
69  const CoordinateXY& rightSidePt,
+
70  const GeometryFactory* factory);
+
71 
+
72 private:
+
73 
+
83  static double
+
84  computeLineEquationC(double a, double b, const CoordinateXY& p);
+
85 
+
86  static LineSegment
+
87  createLineForStandardEquation(double a, double b, double c);
+
88 
+
89 };
+
90 
91 
-
92 
-
93 } // namespace geos::algorithm
-
94 } // namespace geos
+
92 } // namespace geos::algorithm
+
93 } // namespace geos
+
94 
95 
-
96 
Supplies a set of utility methods for building Geometry objects from CoordinateSequence or other Geom...
Definition: GeometryFactory.h:70
Definition: LineSegment.h:61
Represents a linear polygon, which may include holes.
Definition: Polygon.h:61
diff --git a/doxygen/annotated.html b/doxygen/annotated.html index 25d1e29b5d..42ec9eaf77 100644 --- a/doxygen/annotated.html +++ b/doxygen/annotated.html @@ -366,24 +366,25 @@  CEdgeSourceInfo  CElevationModelA simple elevation model used to populate missing Z values in overlay results  CIndexedPointOnLineLocator - CIntersectionPointBuilder - CLineBuilder - CLineLimiter - COverlayEdge - COverlayGraph - COverlayLabel - COverlayMixedPoints - COverlayNG - COverlayNGRobust - COverlayPoints - COverlayUtil - CPrecisionReducer - CPrecisionUtil - CInherentScaleFilter - CRingClipper - CRobustClipEnvelopeComputer - CUnaryUnionNG - CNGUnionStrategy + CInputGeometry + CIntersectionPointBuilder + CLineBuilder + CLineLimiter + COverlayEdge + COverlayGraph + COverlayLabel + COverlayMixedPoints + COverlayNG + COverlayNGRobust + COverlayPoints + COverlayUtil + CPrecisionReducer + CPrecisionUtil + CInherentScaleFilter + CRingClipper + CRobustClipEnvelopeComputer + CUnaryUnionNG + CNGUnionStrategy  NpolygonizeAn API for polygonizing sets of lines  CBuildAreaCreates an areal geometry formed by the constituent linework of given geometry  CEdgeRingRepresents a ring of PolygonizeDirectedEdge which form a ring of a polygon. The ring may be either an outer shell or a hole diff --git a/doxygen/classes.html b/doxygen/classes.html index 0217bcedc0..4ed9f6bd27 100644 --- a/doxygen/classes.html +++ b/doxygen/classes.html @@ -71,7 +71,7 @@
HalfEdge (geos::edgegraph)
HCoordinate (geos::algorithm)
HilbertCode (geos::shape::fractal)
HoleAssigner (geos::operation::polygonize)
HotPixel (geos::noding::snapround)
I
-
IllegalArgumentException (geos::util)
IllegalStateException (geos::util)
IncrementalDelaunayTriangulator (geos::triangulate)
IndexedDistanceToPoint (geos::algorithm::construct)
IndexedFacetDistance (geos::operation::distance)
IndexedPointInAreaLocator (geos::algorithm::locate)
IndexedPointInPolygonsLocator (geos::algorithm::construct)
IndexedPointOnLineLocator (geos::operation::overlayng)
PrecisionUtil::InherentScaleFilter (geos::operation::overlayng)
InteriorPointArea (geos::algorithm)
InteriorPointLine (geos::algorithm)
InteriorPointPoint (geos::algorithm)
Interrupt (geos::util)
Intersection (geos::algorithm)
IntersectionAdder (geos::noding)
IntersectionFinderAdder (geos::noding)
IntersectionMatrix (geos::geom)
IntersectionPointBuilder (geos::operation::overlayng)
AbstractSTRtree::IntersectsOp (geos::index::strtree)
Interval (geos::index::bintree)
Interval (geos::index::strtree)
IntervalSize (geos::index::quadtree)
InvalidSegmentDetector (geos::coverage)
IsSimpleOp (geos::operation::valid)
IsValidOp (geos::operation::valid)
ItemBoundable (geos::index::strtree)
ItemDistance (geos::index::strtree)
ItemVisitor (geos::index)
IteratedNoder (geos::noding)
+
IllegalArgumentException (geos::util)
IllegalStateException (geos::util)
IncrementalDelaunayTriangulator (geos::triangulate)
IndexedDistanceToPoint (geos::algorithm::construct)
IndexedFacetDistance (geos::operation::distance)
IndexedPointInAreaLocator (geos::algorithm::locate)
IndexedPointInPolygonsLocator (geos::algorithm::construct)
IndexedPointOnLineLocator (geos::operation::overlayng)
PrecisionUtil::InherentScaleFilter (geos::operation::overlayng)
InputGeometry (geos::operation::overlayng)
InteriorPointArea (geos::algorithm)
InteriorPointLine (geos::algorithm)
InteriorPointPoint (geos::algorithm)
Interrupt (geos::util)
Intersection (geos::algorithm)
IntersectionAdder (geos::noding)
IntersectionFinderAdder (geos::noding)
IntersectionMatrix (geos::geom)
IntersectionPointBuilder (geos::operation::overlayng)
AbstractSTRtree::IntersectsOp (geos::index::strtree)
Interval (geos::index::bintree)
Interval (geos::index::strtree)
IntervalSize (geos::index::quadtree)
InvalidSegmentDetector (geos::coverage)
IsSimpleOp (geos::operation::valid)
IsValidOp (geos::operation::valid)
ItemBoundable (geos::index::strtree)
ItemDistance (geos::index::strtree)
ItemVisitor (geos::index)
IteratedNoder (geos::noding)
K
KdNode (geos::index::kdtree)
KdTree (geos::index::kdtree)
Key (geos::index::bintree)
Key (geos::index::quadtree)
diff --git a/doxygen/classgeos_1_1algorithm_1_1construct_1_1IndexedPointInPolygonsLocator.html b/doxygen/classgeos_1_1algorithm_1_1construct_1_1IndexedPointInPolygonsLocator.html index 1168108129..7047c0b855 100644 --- a/doxygen/classgeos_1_1algorithm_1_1construct_1_1IndexedPointInPolygonsLocator.html +++ b/doxygen/classgeos_1_1algorithm_1_1construct_1_1IndexedPointInPolygonsLocator.html @@ -61,7 +61,7 @@  IndexedPointInPolygonsLocator (const Geometry &geom)  Creates an instance to locate a point in polygonal elements. More...
  -Location locate (const CoordinateXY *p) +Location locate (const CoordinateXY *p)  Determines the Location of a point in the polygonal elements of a Geometry. More...
  @@ -104,7 +104,7 @@

- + diff --git a/doxygen/classgeos_1_1geomgraph_1_1TopologyLocation.html b/doxygen/classgeos_1_1geomgraph_1_1TopologyLocation.html index 1fd228b16d..11e5d21226 100644 --- a/doxygen/classgeos_1_1geomgraph_1_1TopologyLocation.html +++ b/doxygen/classgeos_1_1geomgraph_1_1TopologyLocation.html @@ -59,11 +59,11 @@
Location geos::algorithm::construct::IndexedPointInPolygonsLocator::locate Location geos::algorithm::construct::IndexedPointInPolygonsLocator::locate ( const CoordinateXY *  p)
- + +  @@ -72,7 +72,7 @@ TopologyLocation &  +Location  @@ -91,25 +91,25 @@ void  +void  +void  +void  +void  +const std::array< Location, 3 > &  +void  +bool  @@ -134,7 +134,7 @@
  • RIGHT: right-hand side
  • If the parent component is a line edge or node, there is a single topological relationship attribute, ON.

    -

    The possible values of a topological location are {Location::NONE, Location::EXTERIOR, Location::BOUNDARY, Location::INTERIOR}

    +

    The possible values of a topological location are {Location::NONE, Location::EXTERIOR, Location::BOUNDARY, Location::INTERIOR}

    The labelling is stored in an array location[j] where where j has the values ON, LEFT, RIGHT

    Constructor & Destructor Documentation

    @@ -149,19 +149,19 @@

    geos::geomgraph::TopologyLocation::TopologyLocation

    - + - + - + @@ -178,7 +178,7 @@

    Constructs a TopologyLocation specifying how points on, to the left of, and to the right of some GraphComponent relate to some Geometry.

    -

    Possible values for the parameters are Location::NONE, Location::EXTERIOR, Location::BOUNDARY, and Location::INTERIOR.

    +

    Possible values for the parameters are Location::NONE, Location::EXTERIOR, Location::BOUNDARY, and Location::INTERIOR.

    See also
    Location
    @@ -206,7 +206,7 @@

    -
    Returns
    true if any locations is Location::NONE
    +
    Returns
    true if any locations is Location::NONE
    @@ -233,7 +233,7 @@

    -
    Returns
    true if all locations are Location::NONE
    +
    Returns
    true if all locations are Location::NONE
    diff --git a/doxygen/classgeos_1_1index_1_1strtree_1_1TemplateSTRtreeImpl.html b/doxygen/classgeos_1_1index_1_1strtree_1_1TemplateSTRtreeImpl.html index 2b8ff87fc6..dd662f8f25 100644 --- a/doxygen/classgeos_1_1index_1_1strtree_1_1TemplateSTRtreeImpl.html +++ b/doxygen/classgeos_1_1index_1_1strtree_1_1TemplateSTRtreeImpl.html @@ -60,7 +60,7 @@

    #include <TemplateSTRtree.h>

    -

    Inherited by geos::index::strtree::TemplateSTRtree< const Edge * >, geos::index::strtree::TemplateSTRtree< SegmentView, index::strtree::IntervalTraits >, geos::index::strtree::TemplateSTRtree< const FacetSequence * >, geos::index::strtree::TemplateSTRtree< const geos::index::chain::MonotoneChain * >, geos::index::strtree::TemplateSTRtree< const geos::geom::LinearRing * >, geos::index::strtree::TemplateSTRtree< geos::operation::polygonize::EdgeRing * >, geos::index::strtree::TemplateSTRtree< const MonotoneChain * >, and geos::index::strtree::TemplateSTRtree< IndexedPointInAreaLocator * >.

    +

    Inherited by geos::index::strtree::TemplateSTRtree< SegmentView, index::strtree::IntervalTraits >, geos::index::strtree::TemplateSTRtree< const FacetSequence * >, geos::index::strtree::TemplateSTRtree< const geos::index::chain::MonotoneChain * >, geos::index::strtree::TemplateSTRtree< const geos::geom::LinearRing * >, and geos::index::strtree::TemplateSTRtree< geos::operation::polygonize::EdgeRing * >.

    Public Member Functions

     TopologyLocation (Location on, Location left, Location right)
     TopologyLocation (Location on, Location left, Location right)
     Constructs a TopologyLocation specifying how points on, to the left of, and to the right of some GraphComponent relate to some Geometry. More...
     
    TopologyLocation (Location on)
    TopologyLocation (Location on)
     
     TopologyLocation (const TopologyLocation &gl)
    operator= (const TopologyLocation &gl)
     
    -Location get (std::size_t posIndex) const
    get (std::size_t posIndex) const
     
    bool isNull () const
     
    flip ()
     
    -void setAllLocations (Location locValue)
    setAllLocations (Location locValue)
     
    -void setAllLocationsIfNull (Location locValue)
    setAllLocationsIfNull (Location locValue)
     
    -void setLocation (std::size_t locIndex, Location locValue)
    setLocation (std::size_t locIndex, Location locValue)
     
    -void setLocation (Location locValue)
    setLocation (Location locValue)
     
    -const std::array< Location, 3 > & getLocations () const
    getLocations () const
     
    -void setLocations (Location on, Location left, Location right)
    setLocations (Location on, Location left, Location right)
     
    -bool allPositionsEqual (Location loc) const
    allPositionsEqual (Location loc) const
     
    void merge (const TopologyLocation &gl)
    (Location Location  on,
    Location Location  left,
    Location Location  right 
    diff --git a/doxygen/classgeos_1_1operation_1_1overlayng_1_1InputGeometry-members.html b/doxygen/classgeos_1_1operation_1_1overlayng_1_1InputGeometry-members.html new file mode 100644 index 0000000000..c340d89a6f --- /dev/null +++ b/doxygen/classgeos_1_1operation_1_1overlayng_1_1InputGeometry-members.html @@ -0,0 +1,74 @@ + + + + + + + +GEOS: Member List + + + + + + +
    +
    +

    Public Types

    + + + + + +
    +
    GEOS +  3.14.0dev +
    +
    + + + + + + + + + +
    +
    +
    geos::operation::overlayng::InputGeometry Member List
    +
    +
    + +

    This is the complete list of members for geos::operation::overlayng::InputGeometry, including all inherited members.

    + + + + + + + + + + + + + + + + +
    getAreaIndex() const (defined in geos::operation::overlayng::InputGeometry)geos::operation::overlayng::InputGeometry
    getDimension(uint8_t index) const (defined in geos::operation::overlayng::InputGeometry)geos::operation::overlayng::InputGeometry
    getEnvelope(uint8_t geomIndex) const (defined in geos::operation::overlayng::InputGeometry)geos::operation::overlayng::InputGeometry
    getGeometry(uint8_t geomIndex) const (defined in geos::operation::overlayng::InputGeometry)geos::operation::overlayng::InputGeometry
    getLocator(uint8_t geomIndex) (defined in geos::operation::overlayng::InputGeometry)geos::operation::overlayng::InputGeometry
    hasEdges(uint8_t geomIndex) constgeos::operation::overlayng::InputGeometry
    hasPoints() const (defined in geos::operation::overlayng::InputGeometry)geos::operation::overlayng::InputGeometry
    InputGeometry(const Geometry *geomA, const Geometry *geomB) (defined in geos::operation::overlayng::InputGeometry)geos::operation::overlayng::InputGeometry
    isAllPoints() const (defined in geos::operation::overlayng::InputGeometry)geos::operation::overlayng::InputGeometry
    isArea(uint8_t geomIndex) const (defined in geos::operation::overlayng::InputGeometry)geos::operation::overlayng::InputGeometry
    isEmpty(uint8_t geomIndex) const (defined in geos::operation::overlayng::InputGeometry)geos::operation::overlayng::InputGeometry
    isLine(uint8_t geomIndex) const (defined in geos::operation::overlayng::InputGeometry)geos::operation::overlayng::InputGeometry
    isSingle() const (defined in geos::operation::overlayng::InputGeometry)geos::operation::overlayng::InputGeometry
    locatePointInArea(uint8_t geomIndex, const Coordinate &pt)geos::operation::overlayng::InputGeometry
    setCollapsed(uint8_t geomIndex, bool isGeomCollapsed) (defined in geos::operation::overlayng::InputGeometry)geos::operation::overlayng::InputGeometry
    + + + + diff --git a/doxygen/classgeos_1_1operation_1_1overlayng_1_1InputGeometry.html b/doxygen/classgeos_1_1operation_1_1overlayng_1_1InputGeometry.html new file mode 100644 index 0000000000..6430eee08e --- /dev/null +++ b/doxygen/classgeos_1_1operation_1_1overlayng_1_1InputGeometry.html @@ -0,0 +1,179 @@ + + + + + + + +GEOS: geos::operation::overlayng::InputGeometry Class Reference + + + + + + +
    +
    + + + + + + +
    +
    GEOS +  3.14.0dev +
    +
    +
    + + + + + + + +
    +
    + +
    +
    geos::operation::overlayng::InputGeometry Class Reference
    +
    +
    + +

    #include <InputGeometry.h>

    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

    +Public Member Functions

    InputGeometry (const Geometry *geomA, const Geometry *geomB)
     
    +bool isSingle () const
     
    +int getDimension (uint8_t index) const
     
    +const GeometrygetGeometry (uint8_t geomIndex) const
     
    +const EnvelopegetEnvelope (uint8_t geomIndex) const
     
    +bool isEmpty (uint8_t geomIndex) const
     
    +bool isArea (uint8_t geomIndex) const
     
    +int getAreaIndex () const
     
    +bool isLine (uint8_t geomIndex) const
     
    +bool isAllPoints () const
     
    +bool hasPoints () const
     
    bool hasEdges (uint8_t geomIndex) const
     
    Location locatePointInArea (uint8_t geomIndex, const Coordinate &pt)
     
    +PointOnGeometryLocatorgetLocator (uint8_t geomIndex)
     
    +void setCollapsed (uint8_t geomIndex, bool isGeomCollapsed)
     
    +

    Detailed Description

    +

    Manages the input geometries for an overlay operation. The second geometry is allowed to be null, to support for instance precision reduction.

    +
    Author
    Martin Davis
    +

    Member Function Documentation

    + +

    ◆ hasEdges()

    + +
    +
    + + + + + + + + +
    bool geos::operation::overlayng::InputGeometry::hasEdges (uint8_t geomIndex) const
    +
    +

    Tests if an input geometry has edges. This indicates that topology needs to be computed for them.

    +
    Parameters
    + + +
    geomIndex
    +
    +
    +
    Returns
    true if the input geometry has edges
    + +
    +
    + +

    ◆ locatePointInArea()

    + +
    +
    + + + + + + + + + + + + + + + + + + +
    Location geos::operation::overlayng::InputGeometry::locatePointInArea (uint8_t geomIndex,
    const Coordinatept 
    )
    +
    +

    Determines the location within an area geometry. This allows disconnected edges to be fully located.

    +
    Parameters
    + + + +
    geomIndexthe index of the geometry
    ptthe coordinate to locate
    +
    +
    +
    Returns
    the location of the coordinate
    +
    See also
    Location
    + +
    +
    +
    The documentation for this class was generated from the following file: +
    + + + + diff --git a/doxygen/classgeos_1_1operation_1_1overlayng_1_1LineBuilder.html b/doxygen/classgeos_1_1operation_1_1overlayng_1_1LineBuilder.html index 418b66a367..aa61f84c21 100644 --- a/doxygen/classgeos_1_1operation_1_1overlayng_1_1LineBuilder.html +++ b/doxygen/classgeos_1_1operation_1_1overlayng_1_1LineBuilder.html @@ -56,7 +56,7 @@

    Public Member Functions

    LineBuilder (const InputGeometry *inputGeom, OverlayGraph *p_graph, bool p_hasResultArea, int p_opCode, const geom::GeometryFactory *geomFact) + LineBuilder (const InputGeometry *inputGeom, OverlayGraph *p_graph, bool p_hasResultArea, int p_opCode, const geom::GeometryFactory *geomFact)    LineBuilder (const LineBuilder &)=delete diff --git a/doxygen/classgeos_1_1operation_1_1overlayng_1_1OverlayLabel.html b/doxygen/classgeos_1_1operation_1_1overlayng_1_1OverlayLabel.html index b519575e45..1b163261d1 100644 --- a/doxygen/classgeos_1_1operation_1_1overlayng_1_1OverlayLabel.html +++ b/doxygen/classgeos_1_1operation_1_1overlayng_1_1OverlayLabel.html @@ -376,8 +376,6 @@

    Tests if a label is for an edge where two area touch along their boundary.

    -

    References geos::geom::Position::RIGHT.

    - diff --git a/doxygen/classgeos_1_1operation_1_1overlayng_1_1OverlayUtil.html b/doxygen/classgeos_1_1operation_1_1overlayng_1_1OverlayUtil.html index 9139039a06..7bb7e56d31 100644 --- a/doxygen/classgeos_1_1operation_1_1overlayng_1_1OverlayUtil.html +++ b/doxygen/classgeos_1_1operation_1_1overlayng_1_1OverlayUtil.html @@ -58,7 +58,7 @@ static bool isFloating (const PrecisionModel *pm)   -static bool clippingEnvelope (int opCode, const InputGeometry *inputGeom, const PrecisionModel *pm, Envelope &rsltEnvelope) +static bool clippingEnvelope (int opCode, const InputGeometry *inputGeom, const PrecisionModel *pm, Envelope &rsltEnvelope)   static bool isEmptyResult (int opCode, const Geometry *a, const Geometry *b, const PrecisionModel *pm)   @@ -104,7 +104,7 @@

    - const InputGeometry *  + const InputGeometryinputGeom, diff --git a/doxygen/coverage_2CoverageUnion_8h_source.html b/doxygen/coverage_2CoverageUnion_8h_source.html index 16e26c7578..ad8b6d7b35 100644 --- a/doxygen/coverage_2CoverageUnion_8h_source.html +++ b/doxygen/coverage_2CoverageUnion_8h_source.html @@ -70,30 +70,30 @@
    21 // Forward declarations
    22 namespace geos {
    23 namespace geom {
    -
    24 class Geometry;
    +
    24 class Geometry;
    25 }
    26 }
    27 
    - -
    29 
    -
    30 namespace geos { // geos
    -
    31 namespace coverage { // geos::coverage
    -
    32 
    -
    41 class GEOS_DLL CoverageUnion {
    -
    42 
    -
    43 private:
    +
    28 namespace geos { // geos
    +
    29 namespace coverage { // geos::coverage
    +
    30 
    +
    39 class GEOS_DLL CoverageUnion {
    + +
    41 
    +
    42 private:
    +
    43 
    44 
    -
    45 
    -
    46 public:
    -
    47 
    -
    54  static std::unique_ptr<Geometry> Union(std::vector<const Geometry*>& coverage);
    -
    55 
    -
    62  static std::unique_ptr<Geometry> Union(const Geometry* coverage);
    -
    63 
    -
    64 };
    -
    65 
    -
    66 } // namespace geos::coverage
    -
    67 } // namespace geos
    +
    45 public:
    +
    46 
    +
    53  static std::unique_ptr<Geometry> Union(std::vector<const Geometry*>& coverage);
    +
    54 
    +
    61  static std::unique_ptr<Geometry> Union(const Geometry* coverage);
    +
    62 
    +
    63 };
    +
    64 
    +
    65 } // namespace geos::coverage
    +
    66 } // namespace geos
    +
    67 
    68 
    69 
    70 
    @@ -103,8 +103,7 @@
    74 
    75 
    76 
    -
    77 
    -
    Definition: coverage/CoverageUnion.h:41
    +
    Definition: coverage/CoverageUnion.h:39
    static std::unique_ptr< Geometry > Union(const Geometry *coverage)
    static std::unique_ptr< Geometry > Union(std::vector< const Geometry * > &coverage)
    Basic implementation of Geometry, constructed and destructed by GeometryFactory.
    Definition: Geometry.h:197
    diff --git a/doxygen/functions_func_h.html b/doxygen/functions_func_h.html index 4d4fff481d..1f65845081 100644 --- a/doxygen/functions_func_h.html +++ b/doxygen/functions_func_h.html @@ -65,6 +65,9 @@

    - h -