diff --git a/include/geos/operation/overlayng/EdgeMerger.h b/include/geos/operation/overlayng/EdgeMerger.h index c02eda706..d1c7c9cc0 100644 --- a/include/geos/operation/overlayng/EdgeMerger.h +++ b/include/geos/operation/overlayng/EdgeMerger.h @@ -14,11 +14,7 @@ #pragma once -#include -#include -#include #include - #include #include @@ -31,7 +27,6 @@ class Coordinate; namespace operation { namespace overlayng { class Edge; -class EdgeKey; } } } diff --git a/include/geos/operation/overlayng/EdgeNodingBuilder.h b/include/geos/operation/overlayng/EdgeNodingBuilder.h index 9066bff2f..f84657150 100644 --- a/include/geos/operation/overlayng/EdgeNodingBuilder.h +++ b/include/geos/operation/overlayng/EdgeNodingBuilder.h @@ -40,8 +40,6 @@ #include #include -using namespace geos::geom; -using namespace geos::noding; namespace geos { // geos. @@ -57,7 +55,7 @@ namespace overlayng { // geos.operation.overlayng * - Extracts input edges, and attaches topological information * - if clipping is enabled, handles clipping or limiting input geometry * - chooses a {@link noding::Noder} based on provided precision model, unless a custom one is supplied - * - calls the chosen Noder, with precision model + * - calls the chosen noding::Noder, with precision model * - removes any fully collapsed noded edges * - builds {@link Edge}s and merges them * @@ -73,8 +71,8 @@ class GEOS_DLL EdgeNodingBuilder { // Members const PrecisionModel* pm; - std::unique_ptr> inputEdges; - Noder* customNoder; + std::unique_ptr> inputEdges; + noding::Noder* customNoder; std::array hasEdges; const Envelope* clipEnv; std::unique_ptr clipper; @@ -82,9 +80,9 @@ class GEOS_DLL EdgeNodingBuilder { // For use in createFloatingPrecisionNoder() algorithm::LineIntersector lineInt; - IntersectionAdder intAdder; - std::unique_ptr internalNoder; - std::unique_ptr spareInternalNoder; + noding::IntersectionAdder intAdder; + std::unique_ptr internalNoder; + std::unique_ptr spareInternalNoder; // EdgeSourceInfo*, Edge* owned by EdgeNodingBuilder, stored in deque std::deque edgeSourceInfoQue; std::deque edgeQue; @@ -99,9 +97,9 @@ class GEOS_DLL EdgeNodingBuilder { * - Floating precision: a conventional model (which may be non-robust). * In this case, a validation step is applied to the output from the noder. */ - Noder* getNoder(); - static std::unique_ptr createFixedPrecisionNoder(const PrecisionModel* pm); - std::unique_ptr createFloatingPrecisionNoder(bool doValidation); + noding::Noder* getNoder(); + static std::unique_ptr createFixedPrecisionNoder(const PrecisionModel* pm); + std::unique_ptr createFloatingPrecisionNoder(bool doValidation); void addCollection(const GeometryCollection* gc, uint8_t geomIndex); @@ -171,8 +169,8 @@ class GEOS_DLL EdgeNodingBuilder { * which is used to provide source topology info to the constructed Edges * (and is then discarded). */ - std::vector node(std::vector* segStrings); - std::vector createEdges(std::vector* segStrings); + std::vector node(std::vector* segStrings); + std::vector createEdges(std::vector* segStrings); public: @@ -182,9 +180,9 @@ class GEOS_DLL EdgeNodingBuilder { * If the noder is not provided, a suitable one will * be used based on the supplied precision model. */ - EdgeNodingBuilder(const PrecisionModel* p_pm, Noder* p_customNoder) + EdgeNodingBuilder(const PrecisionModel* p_pm, noding::Noder* p_customNoder) : pm(p_pm) - , inputEdges(new std::vector) + , inputEdges(new std::vector) , customNoder(p_customNoder) , hasEdges{{false,false}} , clipEnv(nullptr) @@ -195,7 +193,7 @@ class GEOS_DLL EdgeNodingBuilder { ~EdgeNodingBuilder() { - for (SegmentString* ss: *inputEdges) { + for (noding::SegmentString* ss: *inputEdges) { delete ss; } } @@ -203,7 +201,7 @@ class GEOS_DLL EdgeNodingBuilder { void setClipEnvelope(const Envelope* clipEnv); // returns newly allocated vector and segmentstrings - // std::vector* node(); + // std::vector* node(); /** * Reports whether there are noded edges diff --git a/src/operation/overlayng/EdgeMerger.cpp b/src/operation/overlayng/EdgeMerger.cpp index 205dcdb0e..5602213b4 100644 --- a/src/operation/overlayng/EdgeMerger.cpp +++ b/src/operation/overlayng/EdgeMerger.cpp @@ -17,7 +17,9 @@ #include #include #include - +#include +#include +#include namespace geos { // geos namespace operation { // geos.operation diff --git a/src/operation/overlayng/EdgeNodingBuilder.cpp b/src/operation/overlayng/EdgeNodingBuilder.cpp index 74800020f..d617ca4f0 100644 --- a/src/operation/overlayng/EdgeNodingBuilder.cpp +++ b/src/operation/overlayng/EdgeNodingBuilder.cpp @@ -19,7 +19,6 @@ #include #include #include -#include #include #include #include @@ -28,13 +27,20 @@ #include #include -using geos::operation::valid::RepeatedPointRemover; -using geos::noding::snapround::SnapRoundingNoder; namespace geos { // geos namespace operation { // geos.operation namespace overlayng { // geos.operation.overlayng +using geos::operation::valid::RepeatedPointRemover; +using geos::noding::snapround::SnapRoundingNoder; +using geos::noding::Noder; +using geos::noding::MCIndexNoder; +using geos::noding::ValidatingNoder; +using geos::noding::SegmentString; +using geos::noding::NodedSegmentString; + + /*private*/ Noder* EdgeNodingBuilder::getNoder()