From d7102075476d7034359ac80df9d6612e1e600359 Mon Sep 17 00:00:00 2001 From: kikitte Date: Fri, 8 Nov 2024 03:05:59 +0800 Subject: [PATCH] move using-declarations into class body to avoid polluting global (#1186) namespace --- include/geos/algorithm/CGAlgorithmsDD.h | 3 +-- include/geos/algorithm/MinimumAreaRectangle.h | 16 +++++------ include/geos/algorithm/PolygonNodeTopology.h | 4 +-- include/geos/algorithm/Rectangle.h | 9 +++---- .../construct/IndexedDistanceToPoint.h | 7 +++-- .../construct/IndexedPointInPolygonsLocator.h | 12 ++++----- .../algorithm/construct/LargestEmptyCircle.h | 3 +-- .../construct/MaximumInscribedCircle.h | 5 ++-- include/geos/algorithm/hull/ConcaveHull.h | 19 +++++++------ .../algorithm/hull/ConcaveHullOfPolygons.h | 27 +++++++++---------- include/geos/algorithm/hull/HullTri.h | 16 +++++------ .../geos/algorithm/hull/HullTriangulation.h | 19 ++++++------- .../algorithm/hull/OuterShellsExtracter.h | 12 +++------ include/geos/coverage/Corner.h | 11 +++----- .../coverage/CoverageBoundarySegmentFinder.h | 14 +++++----- include/geos/coverage/CoverageEdge.h | 16 +++++------ include/geos/coverage/CoverageGapFinder.h | 4 +-- include/geos/coverage/CoveragePolygon.h | 9 +++---- .../geos/coverage/CoveragePolygonValidator.h | 15 ++++++----- include/geos/coverage/CoverageRing.h | 15 +++++------ include/geos/coverage/CoverageRingEdges.h | 15 +++++------ include/geos/coverage/CoverageSimplifier.h | 12 +++------ include/geos/coverage/CoverageUnion.h | 3 +-- include/geos/coverage/CoverageValidator.h | 6 ++--- .../geos/coverage/InvalidSegmentDetector.h | 10 +++---- include/geos/coverage/TPVWSimplifier.h | 26 +++++++++--------- include/geos/coverage/VertexRingCounter.h | 11 +++----- .../geos/geom/prep/BasicPreparedGeometry.h | 4 +-- include/geos/geomgraph/Label.h | 1 + include/geos/geomgraph/TopologyLocation.h | 5 ++-- .../geos/index/VertexSequencePackedRtree.h | 8 +++--- include/geos/noding/BoundaryChainNoder.h | 3 +-- .../operation/buffer/BufferCurveSetBuilder.h | 1 + include/geos/operation/buffer/OffsetCurve.h | 14 +++++----- .../operation/buffer/OffsetCurveBuilder.h | 6 ++--- .../operation/buffer/OffsetCurveSection.h | 11 ++++---- .../geos/operation/buffer/SegmentMCIndex.h | 16 ++++++----- .../geos/operation/overlayng/CoverageUnion.h | 3 +-- include/geos/operation/overlayng/Edge.h | 1 + include/geos/operation/overlayng/EdgeKey.h | 4 +-- .../operation/overlayng/EdgeNodingBuilder.h | 8 ++++++ .../geos/operation/overlayng/InputGeometry.h | 8 +++--- .../geos/operation/overlayng/LineLimiter.h | 5 ++-- .../operation/overlayng/MaximalEdgeRing.h | 5 ++-- .../geos/operation/overlayng/OverlayEdge.h | 9 +++---- .../operation/overlayng/OverlayEdgeRing.h | 11 +++++--- .../geos/operation/overlayng/OverlayGraph.h | 4 +-- .../geos/operation/overlayng/OverlayLabel.h | 5 ++-- .../operation/overlayng/OverlayMixedPoints.h | 13 ++++++--- include/geos/operation/overlayng/OverlayNG.h | 3 +++ .../operation/overlayng/OverlayNGRobust.h | 1 + .../geos/operation/overlayng/OverlayPoints.h | 9 +++++-- .../geos/operation/overlayng/OverlayUtil.h | 12 ++++++--- .../operation/overlayng/PrecisionReducer.h | 4 +-- .../geos/operation/overlayng/PrecisionUtil.h | 6 +++-- .../geos/operation/overlayng/RingClipper.h | 5 ++-- .../overlayng/RobustClipEnvelopeComputer.h | 8 ++++-- .../geos/operation/overlayng/UnaryUnionNG.h | 2 ++ .../operation/relateng/AdjacentEdgeLocator.h | 16 +++++------ .../geos/operation/relateng/BasicPredicate.h | 8 +++--- .../operation/relateng/DimensionLocation.h | 5 +--- .../relateng/EdgeSegmentIntersector.h | 10 +++---- .../relateng/EdgeSegmentOverlapAction.h | 10 +++---- .../operation/relateng/EdgeSetIntersector.h | 16 +++++------ .../operation/relateng/IMPatternMatcher.h | 12 +++------ include/geos/operation/relateng/IMPredicate.h | 12 ++++----- .../operation/relateng/LineStringExtracter.h | 10 +++---- .../geos/operation/relateng/LinearBoundary.h | 11 +++----- include/geos/operation/relateng/NodeSection.h | 7 ++--- .../geos/operation/relateng/NodeSections.h | 7 ++--- .../operation/relateng/PolygonNodeConverter.h | 1 + include/geos/operation/relateng/RelateEdge.h | 9 +++---- .../geos/operation/relateng/RelateGeometry.h | 18 +++++++++---- .../relateng/RelateMatrixPredicate.h | 11 +++----- include/geos/operation/relateng/RelateNG.h | 15 ++++++----- include/geos/operation/relateng/RelateNode.h | 7 ++--- .../operation/relateng/RelatePointLocator.h | 19 ++++++------- .../geos/operation/relateng/RelatePredicate.h | 7 ++--- .../operation/relateng/RelateSegmentString.h | 13 ++++----- .../operation/relateng/TopologyComputer.h | 17 +++++------- .../operation/relateng/TopologyPredicate.h | 7 ++--- include/geos/operation/union/CoverageUnion.h | 16 +++++------ .../operation/valid/IndexedNestedHoleTester.h | 8 +++--- .../valid/IndexedNestedPolygonTester.h | 14 +++++----- include/geos/operation/valid/IsValidOp.h | 1 + .../valid/PolygonIntersectionAnalyzer.h | 5 ++-- include/geos/operation/valid/PolygonRing.h | 6 ++--- .../operation/valid/PolygonRingSelfNode.h | 3 +-- .../geos/operation/valid/PolygonRingTouch.h | 3 +-- .../operation/valid/PolygonTopologyAnalyzer.h | 10 +++---- include/geos/simplify/ComponentJumpChecker.h | 7 +++-- include/geos/simplify/LinkedLine.h | 6 ++--- include/geos/simplify/LinkedRing.h | 6 ++--- include/geos/simplify/PolygonHullSimplifier.h | 15 +++++------ include/geos/simplify/RingHull.h | 17 ++++++------ include/geos/simplify/TaggedLineString.h | 5 ++-- .../simplify/TaggedLineStringSimplifier.h | 8 +++--- .../polygon/ConstrainedDelaunayTriangulator.h | 13 +++++---- .../triangulate/polygon/PolygonEarClipper.h | 15 ++++++----- .../triangulate/polygon/PolygonHoleJoiner.h | 14 +++++----- .../geos/triangulate/polygon/PolygonNoder.h | 14 +++++----- .../triangulate/polygon/PolygonTriangulator.h | 13 +++++---- .../triangulate/polygon/TriDelaunayImprover.h | 9 +++---- include/geos/triangulate/tri/Tri.h | 8 +++--- include/geos/triangulate/tri/TriEdge.h | 3 +-- include/geos/triangulate/tri/TriList.h | 7 +++-- .../triangulate/tri/TriangulationBuilder.h | 3 +-- src/algorithm/CGAlgorithmsDD.cpp | 2 +- .../IndexedPointInPolygonsLocator.cpp | 1 + src/algorithm/hull/HullTriangulation.cpp | 1 + src/coverage/Corner.cpp | 2 ++ .../CoverageBoundarySegmentFinder.cpp | 1 + src/coverage/CoverageEdge.cpp | 3 +++ src/coverage/CoveragePolygonValidator.cpp | 1 + src/coverage/TPVWSimplifier.cpp | 1 + src/index/VertexSequencePackedRtree.cpp | 2 ++ src/operation/overlayng/EdgeNodingBuilder.cpp | 1 + src/operation/overlayng/InputGeometry.cpp | 5 ++++ .../overlayng/IntersectionPointBuilder.cpp | 2 +- src/operation/overlayng/LineLimiter.cpp | 2 ++ src/operation/overlayng/OverlayEdgeRing.cpp | 1 + src/operation/overlayng/OverlayLabel.cpp | 1 + .../overlayng/OverlayMixedPoints.cpp | 2 ++ src/operation/overlayng/OverlayPoints.cpp | 2 +- src/operation/overlayng/PolygonBuilder.cpp | 1 + src/operation/overlayng/PrecisionReducer.cpp | 3 +++ src/operation/overlayng/RingClipper.cpp | 1 + .../overlayng/RobustClipEnvelopeComputer.cpp | 1 + src/operation/relateng/RelateEdge.cpp | 1 + src/operation/relateng/RelateGeometry.cpp | 1 + src/operation/relateng/RelateNode.cpp | 1 + .../valid/IndexedNestedPolygonTester.cpp | 1 + .../valid/PolygonIntersectionAnalyzer.cpp | 7 ++--- src/simplify/LinkedRing.cpp | 1 + .../ConstrainedDelaunayTriangulator.cpp | 1 + src/triangulate/polygon/PolygonEarClipper.cpp | 2 ++ src/triangulate/polygon/PolygonHoleJoiner.cpp | 2 ++ src/triangulate/polygon/PolygonNoder.cpp | 1 + .../polygon/PolygonTriangulator.cpp | 2 +- src/triangulate/tri/Tri.cpp | 2 +- tests/unit/coverage/TPVWSimplifierTest.cpp | 1 + .../index/VertexSequencePackedRtreeTest.cpp | 2 +- .../relateng/RelateNGBoundaryNodeRuleTest.cpp | 1 + 143 files changed, 510 insertions(+), 543 deletions(-) diff --git a/include/geos/algorithm/CGAlgorithmsDD.h b/include/geos/algorithm/CGAlgorithmsDD.h index ef251c3ee4..eb81e07c72 100644 --- a/include/geos/algorithm/CGAlgorithmsDD.h +++ b/include/geos/algorithm/CGAlgorithmsDD.h @@ -29,13 +29,12 @@ class CoordinateSequence; } } -using namespace geos::math; - namespace geos { namespace algorithm { // geos::algorithm /// Implements basic computational geometry algorithms using extended precision float-point arithmetic. class GEOS_DLL CGAlgorithmsDD { + using DD = geos::math::DD; public: diff --git a/include/geos/algorithm/MinimumAreaRectangle.h b/include/geos/algorithm/MinimumAreaRectangle.h index 0e340a981c..434f4c7f74 100644 --- a/include/geos/algorithm/MinimumAreaRectangle.h +++ b/include/geos/algorithm/MinimumAreaRectangle.h @@ -32,15 +32,6 @@ namespace geos { } } -using geos::geom::CoordinateSequence; -using geos::geom::CoordinateXY; -using geos::geom::Geometry; -using geos::geom::GeometryFactory; -using geos::geom::LineSegment; -using geos::geom::LineString; -using geos::geom::Polygon; - - namespace geos { namespace algorithm { // geos::algorithm @@ -65,6 +56,13 @@ namespace algorithm { // geos::algorithm * */ class GEOS_DLL MinimumAreaRectangle { + using CoordinateSequence = geos::geom::CoordinateSequence; + using CoordinateXY = geos::geom::CoordinateXY; + using Geometry = geos::geom::Geometry; + using GeometryFactory = geos::geom::GeometryFactory; + using LineSegment = geos::geom::LineSegment; + using LineString = geos::geom::LineString; + using Polygon = geos::geom::Polygon; private: diff --git a/include/geos/algorithm/PolygonNodeTopology.h b/include/geos/algorithm/PolygonNodeTopology.h index ca3de04f23..8a4eb76e1a 100644 --- a/include/geos/algorithm/PolygonNodeTopology.h +++ b/include/geos/algorithm/PolygonNodeTopology.h @@ -25,9 +25,6 @@ class CoordinateXY; } } -using geos::geom::CoordinateXY; - - namespace geos { namespace algorithm { // geos::algorithm @@ -39,6 +36,7 @@ namespace algorithm { // geos::algorithm * */ class GEOS_DLL PolygonNodeTopology { + using CoordinateXY = geos::geom::CoordinateXY; public: diff --git a/include/geos/algorithm/Rectangle.h b/include/geos/algorithm/Rectangle.h index ef073ee47e..c1786534c4 100644 --- a/include/geos/algorithm/Rectangle.h +++ b/include/geos/algorithm/Rectangle.h @@ -26,15 +26,14 @@ class Polygon; } } -using geos::geom::CoordinateXY; -using geos::geom::GeometryFactory; -using geos::geom::LineSegment; -using geos::geom::Polygon; - namespace geos { namespace algorithm { class GEOS_DLL Rectangle { + using CoordinateXY = geos::geom::CoordinateXY; + using GeometryFactory = geos::geom::GeometryFactory; + using LineSegment = geos::geom::LineSegment; + using Polygon = geos::geom::Polygon; public: diff --git a/include/geos/algorithm/construct/IndexedDistanceToPoint.h b/include/geos/algorithm/construct/IndexedDistanceToPoint.h index 68d8452451..7509973cf4 100644 --- a/include/geos/algorithm/construct/IndexedDistanceToPoint.h +++ b/include/geos/algorithm/construct/IndexedDistanceToPoint.h @@ -25,10 +25,6 @@ #include #include -using geos::geom::Geometry; -using geos::geom::Point; -using geos::operation::distance::IndexedFacetDistance; - namespace geos { namespace algorithm { // geos::algorithm namespace construct { // geos::algorithm::construct @@ -43,6 +39,9 @@ namespace construct { // geos::algorithm::construct * \author Martin Davis */ class GEOS_DLL IndexedDistanceToPoint { + using Geometry = geos::geom::Geometry; + using Point = geos::geom::Point; + using IndexedFacetDistance = geos::operation::distance::IndexedFacetDistance; public: /** diff --git a/include/geos/algorithm/construct/IndexedPointInPolygonsLocator.h b/include/geos/algorithm/construct/IndexedPointInPolygonsLocator.h index dd82d55a4a..59325daf9b 100644 --- a/include/geos/algorithm/construct/IndexedPointInPolygonsLocator.h +++ b/include/geos/algorithm/construct/IndexedPointInPolygonsLocator.h @@ -25,12 +25,6 @@ #include #include -using geos::geom::Geometry; -using geos::geom::CoordinateXY; -using geos::geom::Location; -using geos::index::strtree::TemplateSTRtree; -using geos::algorithm::locate::IndexedPointInAreaLocator; - namespace geos { namespace algorithm { // geos::algorithm namespace construct { // geos::algorithm::construct @@ -43,6 +37,12 @@ namespace construct { // geos::algorithm::construct * \author Martin Davis */ class GEOS_DLL IndexedPointInPolygonsLocator { + using Geometry = geos::geom::Geometry; + using CoordinateXY = geos::geom::CoordinateXY; + using Location = geos::geom::Location; + template + using TemplateSTRtree = geos::index::strtree::TemplateSTRtree; + using IndexedPointInAreaLocator = geos::algorithm::locate::IndexedPointInAreaLocator; public: /** diff --git a/include/geos/algorithm/construct/LargestEmptyCircle.h b/include/geos/algorithm/construct/LargestEmptyCircle.h index f19931488d..0f4b6d08c9 100644 --- a/include/geos/algorithm/construct/LargestEmptyCircle.h +++ b/include/geos/algorithm/construct/LargestEmptyCircle.h @@ -40,8 +40,6 @@ class Point; } } -using geos::operation::distance::IndexedFacetDistance; - namespace geos { namespace algorithm { // geos::algorithm namespace construct { // geos::algorithm::construct @@ -75,6 +73,7 @@ namespace construct { // geos::algorithm::construct * \author Martin Davis */ class GEOS_DLL LargestEmptyCircle { + using IndexedFacetDistance = geos::operation::distance::IndexedFacetDistance; public: diff --git a/include/geos/algorithm/construct/MaximumInscribedCircle.h b/include/geos/algorithm/construct/MaximumInscribedCircle.h index 1da12c0381..3e6ba54ce4 100644 --- a/include/geos/algorithm/construct/MaximumInscribedCircle.h +++ b/include/geos/algorithm/construct/MaximumInscribedCircle.h @@ -41,9 +41,6 @@ class Point; } } -using geos::algorithm::locate::IndexedPointInAreaLocator; -using geos::operation::distance::IndexedFacetDistance; - namespace geos { namespace algorithm { // geos::algorithm namespace construct { // geos::algorithm::construct @@ -54,6 +51,8 @@ namespace construct { // geos::algorithm::construct * Also computes two points which are separated by the distance. */ class GEOS_DLL MaximumInscribedCircle { + using IndexedPointInAreaLocator = geos::algorithm::locate::IndexedPointInAreaLocator; + using IndexedFacetDistance = geos::operation::distance::IndexedFacetDistance; public: diff --git a/include/geos/algorithm/hull/ConcaveHull.h b/include/geos/algorithm/hull/ConcaveHull.h index 6201e21b5c..ce9de47d3b 100644 --- a/include/geos/algorithm/hull/ConcaveHull.h +++ b/include/geos/algorithm/hull/ConcaveHull.h @@ -37,16 +37,6 @@ class QuadEdgeSubdivision; } } -using geos::geom::Coordinate; -using geos::geom::Geometry; -using geos::geom::GeometryFactory; -using geos::geom::Triangle; -using geos::triangulate::quadedge::QuadEdge; -using geos::triangulate::quadedge::QuadEdgeSubdivision; -using geos::triangulate::quadedge::TriangleVisitor; -using geos::triangulate::tri::Tri; -using geos::triangulate::tri::TriList; - namespace geos { namespace algorithm { // geos::algorithm namespace hull { // geos::algorithm::hull @@ -93,6 +83,15 @@ typedef std::priority_queue, HullTri::HullTriCom * @author mdavis */ class GEOS_DLL ConcaveHull { + using Coordinate = geos::geom::Coordinate; + using Geometry = geos::geom::Geometry; + using GeometryFactory = geos::geom::GeometryFactory; + using Triangle = geos::geom::Triangle; + using QuadEdge = geos::triangulate::quadedge::QuadEdge; + using QuadEdgeSubdivision = geos::triangulate::quadedge::QuadEdgeSubdivision; + using Tri = geos::triangulate::tri::Tri; + template + using TriList = geos::triangulate::tri::TriList; public: diff --git a/include/geos/algorithm/hull/ConcaveHullOfPolygons.h b/include/geos/algorithm/hull/ConcaveHullOfPolygons.h index 1c99ab9ed2..f13dd03276 100644 --- a/include/geos/algorithm/hull/ConcaveHullOfPolygons.h +++ b/include/geos/algorithm/hull/ConcaveHullOfPolygons.h @@ -15,6 +15,7 @@ #pragma once #include +#include #include #include @@ -38,21 +39,6 @@ class Tri; } } -#include - - -using geos::geom::Coordinate; -using geos::geom::CoordinateSequence; -using geos::geom::Envelope; -using geos::geom::Geometry; -using geos::geom::GeometryCollection; -using geos::geom::GeometryFactory; -using geos::geom::LinearRing; -using geos::geom::Polygon; -using geos::triangulate::tri::Tri; -using geos::triangulate::tri::TriList; - - namespace geos { namespace algorithm { // geos::algorithm namespace hull { // geos::algorithm::hull @@ -95,6 +81,17 @@ namespace hull { // geos::algorithm::hull * */ class GEOS_DLL ConcaveHullOfPolygons { + using Coordinate = geos::geom::Coordinate; + using CoordinateSequence = geos::geom::CoordinateSequence; + using Envelope = geos::geom::Envelope; + using Geometry = geos::geom::Geometry; + using GeometryCollection = geos::geom::GeometryCollection; + using GeometryFactory = geos::geom::GeometryFactory; + using LinearRing = geos::geom::LinearRing; + using Polygon = geos::geom::Polygon; + using Tri = geos::triangulate::tri::Tri; + template + using TriList = geos::triangulate::tri::TriList; private: diff --git a/include/geos/algorithm/hull/HullTri.h b/include/geos/algorithm/hull/HullTri.h index 4fbc587aec..0e04dbe16a 100644 --- a/include/geos/algorithm/hull/HullTri.h +++ b/include/geos/algorithm/hull/HullTri.h @@ -33,20 +33,20 @@ namespace quadedge { } } -using geos::geom::Coordinate; -using geos::geom::Triangle; -using geos::triangulate::tri::Tri; -using geos::triangulate::tri::TriList; - namespace geos { namespace algorithm { // geos::algorithm namespace hull { // geos::algorithm::hull -class HullTri : public Tri -{ - private: +class HullTri : public geos::triangulate::tri::Tri { + using Coordinate = geos::geom::Coordinate; + using Triangle = geos::geom::Triangle; + using Tri = geos::triangulate::tri::Tri; + template + using TriList = geos::triangulate::tri::TriList; + +private: double m_size; bool m_isMarked = false; diff --git a/include/geos/algorithm/hull/HullTriangulation.h b/include/geos/algorithm/hull/HullTriangulation.h index 05808c8425..5a921dd2bc 100644 --- a/include/geos/algorithm/hull/HullTriangulation.h +++ b/include/geos/algorithm/hull/HullTriangulation.h @@ -15,7 +15,6 @@ #pragma once #include -#include #include #include @@ -34,16 +33,6 @@ class QuadEdgeSubdivision; } } -using geos::geom::Geometry; -using geos::geom::GeometryFactory; -using geos::geom::Coordinate; -using geos::triangulate::tri::Tri; -using geos::triangulate::tri::TriList; -using geos::triangulate::quadedge::QuadEdge; -using geos::triangulate::quadedge::QuadEdgeSubdivision; -using geos::triangulate::quadedge::TriangleVisitor; - - namespace geos { namespace algorithm { // geos::algorithm namespace hull { // geos::algorithm::hull @@ -51,6 +40,14 @@ namespace hull { // geos::algorithm::hull class HullTriangulation { + using Geometry = geos::geom::Geometry; + using GeometryFactory = geos::geom::GeometryFactory; + using Coordinate = geos::geom::Coordinate; + template + using TriList = geos::triangulate::tri::TriList; + using QuadEdge = geos::triangulate::quadedge::QuadEdge; + using QuadEdgeSubdivision = geos::triangulate::quadedge::QuadEdgeSubdivision; + using TriangleVisitor = geos::triangulate::quadedge::TriangleVisitor; private: diff --git a/include/geos/algorithm/hull/OuterShellsExtracter.h b/include/geos/algorithm/hull/OuterShellsExtracter.h index ad0a054b05..3c09267c19 100644 --- a/include/geos/algorithm/hull/OuterShellsExtracter.h +++ b/include/geos/algorithm/hull/OuterShellsExtracter.h @@ -18,20 +18,11 @@ namespace geos { namespace geom { -class Coordinate; -class CoordinateSequence; -class Envelope; class Geometry; -class GeometryCollection; -class GeometryFactory; class LinearRing; -class Polygon; } } -using geos::geom::Geometry; -using geos::geom::LinearRing; - namespace geos { namespace algorithm { // geos::algorithm namespace hull { // geos::algorithm::hull @@ -44,6 +35,9 @@ namespace hull { // geos::algorithm::hull * \author Martin Davis */ class OuterShellsExtracter { + using Geometry = geos::geom::Geometry; + using LinearRing = geos::geom::LinearRing; + private: OuterShellsExtracter(const Geometry& g); diff --git a/include/geos/coverage/Corner.h b/include/geos/coverage/Corner.h index 5cada2413c..373ee04f73 100644 --- a/include/geos/coverage/Corner.h +++ b/include/geos/coverage/Corner.h @@ -32,19 +32,16 @@ class LineString; } } - -using geos::geom::Coordinate; -using geos::geom::Envelope; -using geos::geom::LineString; -using geos::simplify::LinkedLine; - - namespace geos { namespace coverage { // geos::coverage class Corner { + using Coordinate = geos::geom::Coordinate; + using Envelope = geos::geom::Envelope; + using LineString = geos::geom::LineString; + using LinkedLine = geos::simplify::LinkedLine; public: diff --git a/include/geos/coverage/CoverageBoundarySegmentFinder.h b/include/geos/coverage/CoverageBoundarySegmentFinder.h index cc23093ba9..359ea7aecb 100644 --- a/include/geos/coverage/CoverageBoundarySegmentFinder.h +++ b/include/geos/coverage/CoverageBoundarySegmentFinder.h @@ -28,18 +28,16 @@ class Geometry; } } -using geos::geom::Coordinate; -using geos::geom::CoordinateSequence; -using geos::geom::CoordinateSequenceFilter; -using geos::geom::Geometry; -using geos::geom::LineSegment; - namespace geos { namespace coverage { // geos::coverage -class CoverageBoundarySegmentFinder : public CoordinateSequenceFilter +class CoverageBoundarySegmentFinder : public geos::geom::CoordinateSequenceFilter { - + using Coordinate = geos::geom::Coordinate; + using CoordinateSequence = geos::geom::CoordinateSequence; + using CoordinateSequenceFilter = geos::geom::CoordinateSequenceFilter; + using Geometry = geos::geom::Geometry; + using LineSegment = geos::geom::LineSegment; public: diff --git a/include/geos/coverage/CoverageEdge.h b/include/geos/coverage/CoverageEdge.h index 6404b653f8..60afd1c7ca 100644 --- a/include/geos/coverage/CoverageEdge.h +++ b/include/geos/coverage/CoverageEdge.h @@ -32,14 +32,6 @@ class GeometryFactory; } } -using geos::geom::Coordinate; -using geos::geom::CoordinateSequence; -using geos::geom::GeometryFactory; -using geos::geom::LinearRing; -using geos::geom::LineString; -using geos::geom::LineSegment; -using geos::geom::MultiLineString; - namespace geos { // geos. namespace coverage { // geos.coverage @@ -52,6 +44,14 @@ namespace coverage { // geos.coverage * */ class GEOS_DLL CoverageEdge { + using Coordinate = geos::geom::Coordinate; + using CoordinateSequence = geos::geom::CoordinateSequence; + using GeometryFactory = geos::geom::GeometryFactory; + using LinearRing = geos::geom::LinearRing; + using LineString = geos::geom::LineString; + using LineSegment = geos::geom::LineSegment; + using MultiLineString = geos::geom::MultiLineString; + private: diff --git a/include/geos/coverage/CoverageGapFinder.h b/include/geos/coverage/CoverageGapFinder.h index 3a9780f40f..4be685f706 100644 --- a/include/geos/coverage/CoverageGapFinder.h +++ b/include/geos/coverage/CoverageGapFinder.h @@ -27,8 +27,6 @@ class LinearRing; } } -using geos::geom::Geometry; -using geos::geom::LinearRing; namespace geos { // geos @@ -50,6 +48,8 @@ namespace coverage { // geos::coverage * */ class GEOS_DLL CoverageGapFinder { + using Geometry = geos::geom::Geometry; + using LinearRing = geos::geom::LinearRing; private: diff --git a/include/geos/coverage/CoveragePolygon.h b/include/geos/coverage/CoveragePolygon.h index e56668c456..4363ea06e1 100644 --- a/include/geos/coverage/CoveragePolygon.h +++ b/include/geos/coverage/CoveragePolygon.h @@ -25,15 +25,14 @@ class Polygon; } } -using geos::geom::CoordinateXY; -using geos::geom::Envelope; -using geos::geom::Polygon; -using geos::algorithm::locate::IndexedPointInAreaLocator; - namespace geos { // geos namespace coverage { // geos::coverage class GEOS_DLL CoveragePolygon { + using CoordinateXY = geos::geom::CoordinateXY; + using Envelope = geos::geom::Envelope; + using Polygon = geos::geom::Polygon; + using IndexedPointInAreaLocator = geos::algorithm::locate::IndexedPointInAreaLocator; // Members const Polygon* m_polygon; diff --git a/include/geos/coverage/CoveragePolygonValidator.h b/include/geos/coverage/CoveragePolygonValidator.h index 8f635de385..8c49bcc013 100644 --- a/include/geos/coverage/CoveragePolygonValidator.h +++ b/include/geos/coverage/CoveragePolygonValidator.h @@ -33,12 +33,6 @@ class GeometryFactory; } } -using geos::geom::Coordinate; -using geos::geom::Envelope; -using geos::geom::Geometry; -using geos::geom::GeometryFactory; -using geos::geom::LineSegment; -using geos::algorithm::locate::IndexedPointInAreaLocator; namespace geos { // geos namespace coverage { // geos::coverage @@ -96,6 +90,15 @@ namespace coverage { // geos::coverage * */ class GEOS_DLL CoveragePolygonValidator { + using Coordinate = geos::geom::Coordinate; + using CoordinateSequence = geos::geom::CoordinateSequence; + using Envelope = geos::geom::Envelope; + using Polygon = geos::geom::Polygon; + using LinearRing = geos::geom::LinearRing; + using Geometry = geos::geom::Geometry; + using GeometryFactory = geos::geom::GeometryFactory; + using LineSegment = geos::geom::LineSegment; + using IndexedPointInAreaLocator = geos::algorithm::locate::IndexedPointInAreaLocator; private: diff --git a/include/geos/coverage/CoverageRing.h b/include/geos/coverage/CoverageRing.h index 76bd44aaf4..f9a78f7302 100644 --- a/include/geos/coverage/CoverageRing.h +++ b/include/geos/coverage/CoverageRing.h @@ -31,18 +31,17 @@ class Polygon; } } -using geos::geom::Coordinate; -using geos::geom::CoordinateSequence; -using geos::geom::Geometry; -using geos::geom::GeometryFactory; -using geos::geom::Polygon; -using geos::geom::LineString; -using geos::geom::LinearRing; - namespace geos { // geos. namespace coverage { // geos.coverage class GEOS_DLL CoverageRing : public noding::BasicSegmentString { + using Coordinate = geos::geom::Coordinate; + using CoordinateSequence = geos::geom::CoordinateSequence; + using Geometry = geos::geom::Geometry; + using GeometryFactory = geos::geom::GeometryFactory; + using Polygon = geos::geom::Polygon; + using LineString = geos::geom::LineString; + using LinearRing = geos::geom::LinearRing; private: diff --git a/include/geos/coverage/CoverageRingEdges.h b/include/geos/coverage/CoverageRingEdges.h index ec28098525..5a0f4ac1b9 100644 --- a/include/geos/coverage/CoverageRingEdges.h +++ b/include/geos/coverage/CoverageRingEdges.h @@ -36,14 +36,6 @@ class CoverageEdge; } } -using geos::geom::Coordinate; -using geos::geom::CoordinateSequence; -using geos::geom::Geometry; -using geos::geom::LinearRing; -using geos::geom::LineSegment; -using geos::geom::MultiPolygon; -using geos::geom::Polygon; - namespace geos { // geos namespace coverage { // geos.coverage @@ -58,6 +50,13 @@ namespace coverage { // geos.coverage * @author Martin Davis */ class GEOS_DLL CoverageRingEdges { + using Coordinate = geos::geom::Coordinate; + using CoordinateSequence = geos::geom::CoordinateSequence; + using Geometry = geos::geom::Geometry; + using LinearRing = geos::geom::LinearRing; + using LineSegment = geos::geom::LineSegment; + using MultiPolygon = geos::geom::MultiPolygon; + using Polygon = geos::geom::Polygon; private: diff --git a/include/geos/coverage/CoverageSimplifier.h b/include/geos/coverage/CoverageSimplifier.h index 5e23028d38..74df234dda 100644 --- a/include/geos/coverage/CoverageSimplifier.h +++ b/include/geos/coverage/CoverageSimplifier.h @@ -32,13 +32,6 @@ class CoverageEdge; } } - -using geos::coverage::CoverageEdge; -using geos::geom::Geometry; -using geos::geom::GeometryFactory; -using geos::geom::MultiLineString; - - namespace geos { namespace coverage { // geos::coverage @@ -74,7 +67,10 @@ namespace coverage { // geos::coverage * @author Martin Davis */ class GEOS_DLL CoverageSimplifier { - + using CoverageEdge = geos::coverage::CoverageEdge; + using Geometry = geos::geom::Geometry; + using GeometryFactory = geos::geom::GeometryFactory; + using MultiLineString = geos::geom::MultiLineString; public: diff --git a/include/geos/coverage/CoverageUnion.h b/include/geos/coverage/CoverageUnion.h index 8983c19c0f..2749488e51 100644 --- a/include/geos/coverage/CoverageUnion.h +++ b/include/geos/coverage/CoverageUnion.h @@ -25,8 +25,6 @@ class Geometry; } } -using geos::geom::Geometry; - namespace geos { // geos namespace coverage { // geos::coverage @@ -39,6 +37,7 @@ namespace coverage { // geos::coverage * */ class GEOS_DLL CoverageUnion { + using Geometry = geos::geom::Geometry; private: diff --git a/include/geos/coverage/CoverageValidator.h b/include/geos/coverage/CoverageValidator.h index 86a53e68dc..2185d23cbe 100644 --- a/include/geos/coverage/CoverageValidator.h +++ b/include/geos/coverage/CoverageValidator.h @@ -24,9 +24,6 @@ class Geometry; } } -using geos::geom::Geometry; -using geos::index::strtree::TemplateSTRtree; - namespace geos { // geos namespace coverage { // geos::coverage @@ -63,6 +60,9 @@ namespace coverage { // geos::coverage * */ class GEOS_DLL CoverageValidator { + using Geometry = geos::geom::Geometry; + template + using TemplateSTRtree = geos::index::strtree::TemplateSTRtree; private: diff --git a/include/geos/coverage/InvalidSegmentDetector.h b/include/geos/coverage/InvalidSegmentDetector.h index 66f9783407..a1f085001e 100644 --- a/include/geos/coverage/InvalidSegmentDetector.h +++ b/include/geos/coverage/InvalidSegmentDetector.h @@ -30,12 +30,6 @@ class CoverageRing; } } - -using geos::noding::SegmentIntersector; -using geos::noding::SegmentString; -using geos::geom::Coordinate; - - namespace geos { // geos. namespace coverage { // geos.coverage @@ -52,7 +46,9 @@ namespace coverage { // geos.coverage * @author Martin Davis * */ -class GEOS_DLL InvalidSegmentDetector : public SegmentIntersector { +class GEOS_DLL InvalidSegmentDetector : public geos::noding::SegmentIntersector { + using SegmentString = geos::noding::SegmentString; + using Coordinate = geos::geom::Coordinate; private: diff --git a/include/geos/coverage/TPVWSimplifier.h b/include/geos/coverage/TPVWSimplifier.h index 657616e873..0b904c8a83 100644 --- a/include/geos/coverage/TPVWSimplifier.h +++ b/include/geos/coverage/TPVWSimplifier.h @@ -35,20 +35,6 @@ class MultiLineString; } } - -using geos::coverage::Corner; -using geos::geom::Coordinate; -using geos::geom::CoordinateSequence; -using geos::geom::Envelope; -using geos::geom::Geometry; -using geos::geom::GeometryFactory; -using geos::geom::LineString; -using geos::geom::MultiLineString; -using geos::index::VertexSequencePackedRtree; -using geos::index::strtree::TemplateSTRtree; -using geos::simplify::LinkedLine; - - namespace geos { namespace coverage { // geos::coverage @@ -73,6 +59,18 @@ namespace coverage { // geos::coverage */ class GEOS_DLL TPVWSimplifier { + using Corner = geos::coverage::Corner; + using Coordinate = geos::geom::Coordinate; + using CoordinateSequence = geos::geom::CoordinateSequence; + using Envelope = geos::geom::Envelope; + using Geometry = geos::geom::Geometry; + using GeometryFactory = geos::geom::GeometryFactory; + using LineString = geos::geom::LineString; + using MultiLineString = geos::geom::MultiLineString; + using VertexSequencePackedRtree = geos::index::VertexSequencePackedRtree; + template + using TemplateSTRtree = geos::index::strtree::TemplateSTRtree; + using LinkedLine = geos::simplify::LinkedLine; public: diff --git a/include/geos/coverage/VertexRingCounter.h b/include/geos/coverage/VertexRingCounter.h index a8899ae91a..c0982ad2b4 100644 --- a/include/geos/coverage/VertexRingCounter.h +++ b/include/geos/coverage/VertexRingCounter.h @@ -27,17 +27,14 @@ class Geometry; } } -using geos::geom::Coordinate; -using geos::geom::CoordinateSequence; -using geos::geom::CoordinateSequenceFilter; -using geos::geom::Geometry; - - namespace geos { namespace coverage { // geos::coverage -class VertexRingCounter : public CoordinateSequenceFilter +class VertexRingCounter : public geos::geom::CoordinateSequenceFilter { + using Coordinate = geos::geom::Coordinate; + using CoordinateSequence = geos::geom::CoordinateSequence; + using Geometry = geos::geom::Geometry; public: diff --git a/include/geos/geom/prep/BasicPreparedGeometry.h b/include/geos/geom/prep/BasicPreparedGeometry.h index f061de451e..5e7323be5c 100644 --- a/include/geos/geom/prep/BasicPreparedGeometry.h +++ b/include/geos/geom/prep/BasicPreparedGeometry.h @@ -38,8 +38,6 @@ namespace geos { namespace geom { // geos::geom namespace prep { // geos::geom::prep -using geos::operation::relateng::RelateNG; - // * \class BasicPreparedGeometry /** @@ -56,6 +54,8 @@ using geos::operation::relateng::RelateNG; * */ class BasicPreparedGeometry: public PreparedGeometry { + using RelateNG = geos::operation::relateng::RelateNG; + private: const geom::Geometry* baseGeom; std::vector representativePts; diff --git a/include/geos/geomgraph/Label.h b/include/geos/geomgraph/Label.h index 773b822ad5..b0966db128 100644 --- a/include/geos/geomgraph/Label.h +++ b/include/geos/geomgraph/Label.h @@ -55,6 +55,7 @@ namespace geomgraph { // geos.geomgraph * */ class GEOS_DLL Label final { + using Position = geos::geom::Position; public: diff --git a/include/geos/geomgraph/TopologyLocation.h b/include/geos/geomgraph/TopologyLocation.h index 7c37159ed9..0c831ef936 100644 --- a/include/geos/geomgraph/TopologyLocation.h +++ b/include/geos/geomgraph/TopologyLocation.h @@ -34,9 +34,6 @@ #pragma warning(disable: 4251) // warning C4251: needs to have dll-interface to be used by clients of class #endif -using geos::geom::Position; -using geos::geom::Location; - namespace geos { namespace geomgraph { // geos.geomgraph @@ -61,6 +58,8 @@ namespace geomgraph { // geos.geomgraph * where j has the values ON, LEFT, RIGHT */ class GEOS_DLL TopologyLocation { + using Position = geos::geom::Position; + using Location = geos::geom::Location; public: diff --git a/include/geos/index/VertexSequencePackedRtree.h b/include/geos/index/VertexSequencePackedRtree.h index cab7eeeed6..8cf08364e2 100644 --- a/include/geos/index/VertexSequencePackedRtree.h +++ b/include/geos/index/VertexSequencePackedRtree.h @@ -26,11 +26,6 @@ class Envelope; } } -using geos::geom::Coordinate; -using geos::geom::CoordinateSequence; -using geos::geom::Envelope; - - namespace geos { namespace index { @@ -52,6 +47,9 @@ namespace index { * */ class GEOS_DLL VertexSequencePackedRtree { + using Coordinate = geos::geom::Coordinate; + using CoordinateSequence = geos::geom::CoordinateSequence; + using Envelope = geos::geom::Envelope; private: diff --git a/include/geos/noding/BoundaryChainNoder.h b/include/geos/noding/BoundaryChainNoder.h index 890f400bc4..dc6bd0be2b 100644 --- a/include/geos/noding/BoundaryChainNoder.h +++ b/include/geos/noding/BoundaryChainNoder.h @@ -31,8 +31,6 @@ class NodedSegmentString; } } -using geos::geom::Coordinate; - namespace geos { // geos namespace noding { // geos::noding @@ -55,6 +53,7 @@ namespace noding { // geos::noding * */ class GEOS_DLL BoundaryChainNoder : public Noder { + using Coordinate = geos::geom::Coordinate; private: diff --git a/include/geos/operation/buffer/BufferCurveSetBuilder.h b/include/geos/operation/buffer/BufferCurveSetBuilder.h index e731840bfe..ca5fc64dd4 100644 --- a/include/geos/operation/buffer/BufferCurveSetBuilder.h +++ b/include/geos/operation/buffer/BufferCurveSetBuilder.h @@ -70,6 +70,7 @@ namespace buffer { // geos.operation.buffer * */ class GEOS_DLL BufferCurveSetBuilder { + using CoordinateSequence = geos::geom::CoordinateSequence; private: diff --git a/include/geos/operation/buffer/OffsetCurve.h b/include/geos/operation/buffer/OffsetCurve.h index 403ca98b70..3b218aa4a8 100644 --- a/include/geos/operation/buffer/OffsetCurve.h +++ b/include/geos/operation/buffer/OffsetCurve.h @@ -37,13 +37,6 @@ class SegmentMCIndex; } } -using geos::geom::Coordinate; -using geos::geom::CoordinateSequence; -using geos::geom::Geometry; -using geos::geom::GeometryFactory; -using geos::geom::LineString; -using geos::geom::Polygon; - namespace geos { namespace operation { namespace buffer { @@ -88,7 +81,12 @@ namespace buffer { * */ class GEOS_DLL OffsetCurve { - + using Coordinate = geos::geom::Coordinate; + using CoordinateSequence = geos::geom::CoordinateSequence; + using Geometry = geos::geom::Geometry; + using GeometryFactory = geos::geom::GeometryFactory; + using LineString = geos::geom::LineString; + using Polygon = geos::geom::Polygon; private: diff --git a/include/geos/operation/buffer/OffsetCurveBuilder.h b/include/geos/operation/buffer/OffsetCurveBuilder.h index f73672b1cc..1f6cddf74d 100644 --- a/include/geos/operation/buffer/OffsetCurveBuilder.h +++ b/include/geos/operation/buffer/OffsetCurveBuilder.h @@ -40,9 +40,6 @@ class PrecisionModel; } } -using geos::geom::CoordinateSequence; -using geos::geom::PrecisionModel; - namespace geos { namespace operation { // geos.operation namespace buffer { // geos.operation.buffer @@ -66,6 +63,9 @@ namespace buffer { // geos.operation.buffer * See removeRepeatedAndInvalidPoints. */ class GEOS_DLL OffsetCurveBuilder { + using CoordinateSequence = geos::geom::CoordinateSequence; + using PrecisionModel = geos::geom::PrecisionModel; + public: /* diff --git a/include/geos/operation/buffer/OffsetCurveSection.h b/include/geos/operation/buffer/OffsetCurveSection.h index e73d759ce5..2f953b87e5 100644 --- a/include/geos/operation/buffer/OffsetCurveSection.h +++ b/include/geos/operation/buffer/OffsetCurveSection.h @@ -31,12 +31,6 @@ class LineString; } } -using geos::geom::Coordinate; -using geos::geom::CoordinateSequence; -using geos::geom::Geometry; -using geos::geom::GeometryFactory; -using geos::geom::LineString; - namespace geos { // geos. namespace operation { // geos.operation namespace buffer { // geos.operation.buffer @@ -53,6 +47,11 @@ namespace buffer { // geos.operation.buffer * @author mdavis */ class GEOS_DLL OffsetCurveSection { + using Coordinate = geos::geom::Coordinate; + using CoordinateSequence = geos::geom::CoordinateSequence; + using Geometry = geos::geom::Geometry; + using GeometryFactory = geos::geom::GeometryFactory; + using LineString = geos::geom::LineString; private: diff --git a/include/geos/operation/buffer/SegmentMCIndex.h b/include/geos/operation/buffer/SegmentMCIndex.h index a6ba27a79e..1e23aeba6d 100644 --- a/include/geos/operation/buffer/SegmentMCIndex.h +++ b/include/geos/operation/buffer/SegmentMCIndex.h @@ -26,20 +26,22 @@ class Envelope; } } -using geos::geom::CoordinateSequence; -using geos::geom::Envelope; -using namespace geos::index; - namespace geos { namespace operation { namespace buffer { class GEOS_DLL SegmentMCIndex { + using CoordinateSequence = geos::geom::CoordinateSequence; + using Envelope = geos::geom::Envelope; + using MonotoneChain = geos::index::chain::MonotoneChain; + using MonotoneChainSelectAction = geos::index::chain::MonotoneChainSelectAction; + template + using TemplateSTRtree = geos::index::strtree::TemplateSTRtree; private: - strtree::TemplateSTRtree index; - std::vector segChains; + TemplateSTRtree index; + std::vector segChains; void buildIndex(const CoordinateSequence* segs); @@ -47,7 +49,7 @@ class GEOS_DLL SegmentMCIndex { SegmentMCIndex(const CoordinateSequence* segs); - void query(const Envelope* env, chain::MonotoneChainSelectAction& action); + void query(const Envelope* env, MonotoneChainSelectAction& action); }; diff --git a/include/geos/operation/overlayng/CoverageUnion.h b/include/geos/operation/overlayng/CoverageUnion.h index 6c7a8be845..3bfb38e4b4 100644 --- a/include/geos/operation/overlayng/CoverageUnion.h +++ b/include/geos/operation/overlayng/CoverageUnion.h @@ -24,8 +24,6 @@ class Geometry; } } -using geos::geom::Geometry; - namespace geos { // geos. namespace operation { // geos.operation namespace overlayng { // geos.operation.overlayng @@ -67,6 +65,7 @@ namespace overlayng { // geos.operation.overlayng * */ class GEOS_DLL CoverageUnion { + using Geometry = geos::geom::Geometry; private: diff --git a/include/geos/operation/overlayng/Edge.h b/include/geos/operation/overlayng/Edge.h index 9db3362ad9..b0f670b7b5 100644 --- a/include/geos/operation/overlayng/Edge.h +++ b/include/geos/operation/overlayng/Edge.h @@ -53,6 +53,7 @@ namespace overlayng { // geos.operation.overlayng * @author mdavis */ class GEOS_DLL Edge { + using Location = geos::geom::Location; private: diff --git a/include/geos/operation/overlayng/EdgeKey.h b/include/geos/operation/overlayng/EdgeKey.h index 3014bc30fc..ef66e4653d 100644 --- a/include/geos/operation/overlayng/EdgeKey.h +++ b/include/geos/operation/overlayng/EdgeKey.h @@ -26,9 +26,6 @@ namespace geos { // geos. namespace operation { // geos.operation namespace overlayng { // geos.operation.overlayng - -using geos::geom::Coordinate; - /** * A key for sorting and comparing edges in a noded arrangement. * Relies on the fact that in a correctly noded arrangement @@ -39,6 +36,7 @@ using geos::geom::Coordinate; * */ class GEOS_DLL EdgeKey { + using Coordinate = geos::geom::Coordinate; private: diff --git a/include/geos/operation/overlayng/EdgeNodingBuilder.h b/include/geos/operation/overlayng/EdgeNodingBuilder.h index f846571500..9d2195b35f 100644 --- a/include/geos/operation/overlayng/EdgeNodingBuilder.h +++ b/include/geos/operation/overlayng/EdgeNodingBuilder.h @@ -62,6 +62,14 @@ namespace overlayng { // geos.operation.overlayng * @author mdavis */ class GEOS_DLL EdgeNodingBuilder { + using PrecisionModel = geos::geom::PrecisionModel; + using Envelope = geos::geom::Envelope; + using GeometryCollection = geos::geom::GeometryCollection; + using Polygon = geos::geom::Polygon; + using CoordinateSequence = geos::geom::CoordinateSequence; + using LinearRing = geos::geom::LinearRing; + using LineString = geos::geom::LineString; + using Geometry = geos::geom::Geometry; private: diff --git a/include/geos/operation/overlayng/InputGeometry.h b/include/geos/operation/overlayng/InputGeometry.h index 862ac9f0f2..a1ecff0e44 100644 --- a/include/geos/operation/overlayng/InputGeometry.h +++ b/include/geos/operation/overlayng/InputGeometry.h @@ -38,10 +38,12 @@ namespace overlayng { // geos.operation.overlayng * */ -using namespace geos::algorithm::locate; -using namespace geos::geom; - class GEOS_DLL InputGeometry { + using Geometry = geos::geom::Geometry; + using Envelope = geos::geom::Envelope; + using Coordinate = geos::geom::Coordinate; + using Location = geos::geom::Location; + using PointOnGeometryLocator = geos::algorithm::locate::PointOnGeometryLocator; private: diff --git a/include/geos/operation/overlayng/LineLimiter.h b/include/geos/operation/overlayng/LineLimiter.h index f4ec5fb086..8a9b27f49a 100644 --- a/include/geos/operation/overlayng/LineLimiter.h +++ b/include/geos/operation/overlayng/LineLimiter.h @@ -30,8 +30,6 @@ class CoordinateSequence; } } -using namespace geos::geom; - namespace geos { // geos. namespace operation { // geos.operation namespace overlayng { // geos.operation.overlayng @@ -54,6 +52,9 @@ namespace overlayng { // geos.operation.overlayng * @author Martin Davis */ class GEOS_DLL LineLimiter { + using Envelope = geos::geom::Envelope; + using Coordinate = geos::geom::Coordinate; + using CoordinateSequence = geos::geom::CoordinateSequence; private: diff --git a/include/geos/operation/overlayng/MaximalEdgeRing.h b/include/geos/operation/overlayng/MaximalEdgeRing.h index 359753eb86..489625ef99 100644 --- a/include/geos/operation/overlayng/MaximalEdgeRing.h +++ b/include/geos/operation/overlayng/MaximalEdgeRing.h @@ -24,7 +24,6 @@ namespace geos { namespace geom { class Coordinate; -class CoordinateArray; class GeometryFactory; } namespace operation { @@ -39,9 +38,9 @@ namespace geos { // geos. namespace operation { // geos.operation namespace overlayng { // geos.operation.overlayng -using namespace geos::geom; - class GEOS_DLL MaximalEdgeRing { + using Coordinate = geos::geom::Coordinate; + using GeometryFactory = geos::geom::GeometryFactory; private: diff --git a/include/geos/operation/overlayng/OverlayEdge.h b/include/geos/operation/overlayng/OverlayEdge.h index 7cb6d41eee..42d3632cd6 100644 --- a/include/geos/operation/overlayng/OverlayEdge.h +++ b/include/geos/operation/overlayng/OverlayEdge.h @@ -37,11 +37,6 @@ class MaximalEdgeRing; } } -using geos::geom::Coordinate; -using geos::geom::CoordinateXYZM; -using geos::geom::CoordinateSequence; -using geos::geom::Location; - namespace geos { // geos. namespace operation { // geos.operation namespace overlayng { // geos.operation.overlayng @@ -50,6 +45,10 @@ namespace overlayng { // geos.operation.overlayng * Creates a single OverlayEdge. */ class GEOS_DLL OverlayEdge : public edgegraph::HalfEdge { + using Coordinate = geos::geom::Coordinate; + using CoordinateXYZM = geos::geom::CoordinateXYZM; + using CoordinateSequence = geos::geom::CoordinateSequence; + using Location = geos::geom::Location; private: diff --git a/include/geos/operation/overlayng/OverlayEdgeRing.h b/include/geos/operation/overlayng/OverlayEdgeRing.h index a5c3237bff..b2509f02c2 100644 --- a/include/geos/operation/overlayng/OverlayEdgeRing.h +++ b/include/geos/operation/overlayng/OverlayEdgeRing.h @@ -44,11 +44,14 @@ namespace geos { // geos. namespace operation { // geos.operation namespace overlayng { // geos.operation.overlayng -using namespace geos::geom; -using algorithm::locate::PointOnGeometryLocator; -using algorithm::locate::IndexedPointInAreaLocator; - class GEOS_DLL OverlayEdgeRing { + using Coordinate = geos::geom::Coordinate; + using CoordinateSequence = geos::geom::CoordinateSequence; + using GeometryFactory = geos::geom::GeometryFactory; + using LinearRing = geos::geom::LinearRing; + using Polygon = geos::geom::Polygon; + using PointOnGeometryLocator = algorithm::locate::PointOnGeometryLocator; + using IndexedPointInAreaLocator = algorithm::locate::IndexedPointInAreaLocator; private: diff --git a/include/geos/operation/overlayng/OverlayGraph.h b/include/geos/operation/overlayng/OverlayGraph.h index 718390fcda..e44c46b2ec 100644 --- a/include/geos/operation/overlayng/OverlayGraph.h +++ b/include/geos/operation/overlayng/OverlayGraph.h @@ -39,8 +39,6 @@ namespace geos { // geos. namespace operation { // geos.operation namespace overlayng { // geos.operation.overlayng -using namespace geos::geom; - /** * A planar graph of {@link OverlayEdge}, representing * the topology resulting from an overlay operation. @@ -52,6 +50,8 @@ using namespace geos::geom; * */ class GEOS_DLL OverlayGraph { + using Coordinate = geos::geom::Coordinate; + using CoordinateSequence = geos::geom::CoordinateSequence; private: diff --git a/include/geos/operation/overlayng/OverlayLabel.h b/include/geos/operation/overlayng/OverlayLabel.h index 59dab36843..d0c0040777 100644 --- a/include/geos/operation/overlayng/OverlayLabel.h +++ b/include/geos/operation/overlayng/OverlayLabel.h @@ -20,9 +20,6 @@ #include #include -using geos::geom::Location; -using geos::geom::Position; - namespace geos { // geos. namespace operation { // geos.operation namespace overlayng { // geos.operation.overlayng @@ -87,6 +84,8 @@ namespace overlayng { // geos.operation.overlayng * @author Martin Davis */ class GEOS_DLL OverlayLabel { + using Location = geos::geom::Location; + using Position = geos::geom::Position; private: diff --git a/include/geos/operation/overlayng/OverlayMixedPoints.h b/include/geos/operation/overlayng/OverlayMixedPoints.h index b83b8802d1..c7b6812289 100644 --- a/include/geos/operation/overlayng/OverlayMixedPoints.h +++ b/include/geos/operation/overlayng/OverlayMixedPoints.h @@ -46,9 +46,6 @@ namespace geos { // geos. namespace operation { // geos.operation namespace overlayng { // geos.operation.overlayng -using namespace geos::geom; -using algorithm::locate::PointOnGeometryLocator; - /** * Computes an overlay where one input is Point(s) and one is not. * This class supports overlay being used as an efficient way @@ -77,6 +74,16 @@ using algorithm::locate::PointOnGeometryLocator; * @author Martin Davis */ class GEOS_DLL OverlayMixedPoints { + using GeometryFactory = geos::geom::GeometryFactory; + using PrecisionModel = geos::geom::PrecisionModel; + using Geometry = geos::geom::Geometry; + using Coordinate = geos::geom::Coordinate; + using CoordinateXY = geos::geom::CoordinateXY; + using CoordinateSequence = geos::geom::CoordinateSequence; + using Point = geos::geom::Point; + using Polygon = geos::geom::Polygon; + using LineString = geos::geom::LineString; + using PointOnGeometryLocator = algorithm::locate::PointOnGeometryLocator; private: diff --git a/include/geos/operation/overlayng/OverlayNG.h b/include/geos/operation/overlayng/OverlayNG.h index 12b10ea092..9a3ad28054 100644 --- a/include/geos/operation/overlayng/OverlayNG.h +++ b/include/geos/operation/overlayng/OverlayNG.h @@ -118,6 +118,9 @@ namespace overlayng { // geos.operation.overlayng * */ class GEOS_DLL OverlayNG { + using Geometry = geos::geom::Geometry; + using PrecisionModel = geos::geom::PrecisionModel; + using Location = geos::geom::Location; private: diff --git a/include/geos/operation/overlayng/OverlayNGRobust.h b/include/geos/operation/overlayng/OverlayNGRobust.h index 0f1829ec87..c63d7d3b5b 100644 --- a/include/geos/operation/overlayng/OverlayNGRobust.h +++ b/include/geos/operation/overlayng/OverlayNGRobust.h @@ -62,6 +62,7 @@ namespace overlayng { // geos.operation.overlayng * @author Martin Davis */ class GEOS_DLL OverlayNGRobust { + using Geometry = geos::geom::Geometry; private: diff --git a/include/geos/operation/overlayng/OverlayPoints.h b/include/geos/operation/overlayng/OverlayPoints.h index e357dcdcaa..0130c30692 100644 --- a/include/geos/operation/overlayng/OverlayPoints.h +++ b/include/geos/operation/overlayng/OverlayPoints.h @@ -37,8 +37,6 @@ namespace geos { // geos. namespace operation { // geos.operation namespace overlayng { // geos.operation.overlayng -using namespace geos::geom; - /** * Performs an overlay operation on inputs which are both point geometries. * @@ -53,6 +51,13 @@ using namespace geos::geom; * @author Martin Davis */ class GEOS_DLL OverlayPoints { + using Coordinate = geos::geom::Coordinate; + using CoordinateXY = geos::geom::CoordinateXY; + using CoordinateSequence = geos::geom::CoordinateSequence; + using GeometryFactory = geos::geom::GeometryFactory; + using Geometry = geos::geom::Geometry; + using Point = geos::geom::Point; + using PrecisionModel = geos::geom::PrecisionModel; private: diff --git a/include/geos/operation/overlayng/OverlayUtil.h b/include/geos/operation/overlayng/OverlayUtil.h index 9d30dca34d..bc0dbadfbb 100644 --- a/include/geos/operation/overlayng/OverlayUtil.h +++ b/include/geos/operation/overlayng/OverlayUtil.h @@ -41,13 +41,10 @@ class OverlayGraph; } } - namespace geos { // geos. namespace operation { // geos.operation namespace overlayng { // geos.operation.overlayng -using namespace geos::geom; - /** * Utility methods for overlay processing. * @@ -55,6 +52,15 @@ using namespace geos::geom; * */ class GEOS_DLL OverlayUtil { + using Geometry = geos::geom::Geometry; + using Coordinate = geos::geom::Coordinate; + using CoordinateSequence = geos::geom::CoordinateSequence; + using Envelope = geos::geom::Envelope; + using Point = geos::geom::Point; + using LineString = geos::geom::LineString; + using Polygon = geos::geom::Polygon; + using GeometryFactory = geos::geom::GeometryFactory; + using PrecisionModel = geos::geom::PrecisionModel; private: diff --git a/include/geos/operation/overlayng/PrecisionReducer.h b/include/geos/operation/overlayng/PrecisionReducer.h index c01bb6e7f7..50f34299ef 100644 --- a/include/geos/operation/overlayng/PrecisionReducer.h +++ b/include/geos/operation/overlayng/PrecisionReducer.h @@ -35,8 +35,6 @@ namespace geos { // geos. namespace operation { // geos.operation namespace overlayng { // geos.operation.overlayng -using namespace geos::geom; - /** * Reduces the precision of a geometry by rounding it to the * supplied {@link geom::PrecisionModel}. @@ -50,6 +48,8 @@ using namespace geos::geom; * This provides an effective way to node / snap-round a collection of {@link geom::LineString}s. */ class GEOS_DLL PrecisionReducer { + using PrecisionModel = geos::geom::PrecisionModel; + using Geometry = geos::geom::Geometry; private: diff --git a/include/geos/operation/overlayng/PrecisionUtil.h b/include/geos/operation/overlayng/PrecisionUtil.h index 71def5647b..b515a19dea 100644 --- a/include/geos/operation/overlayng/PrecisionUtil.h +++ b/include/geos/operation/overlayng/PrecisionUtil.h @@ -38,8 +38,6 @@ namespace geos { // geos. namespace operation { // geos.operation namespace overlayng { // geos.operation.overlayng -using namespace geos::geom; - /** * Unions a collection of geometries in an * efficient way, using {@link OverlayNG} @@ -47,6 +45,10 @@ using namespace geos::geom; * @author Martin Davis */ class GEOS_DLL PrecisionUtil { + using Geometry = geos::geom::Geometry; + using Envelope = geos::geom::Envelope; + using PrecisionModel = geos::geom::PrecisionModel; + using CoordinateFilter = geos::geom::CoordinateFilter; private: diff --git a/include/geos/operation/overlayng/RingClipper.h b/include/geos/operation/overlayng/RingClipper.h index dffd1fd99c..d8f6a186eb 100644 --- a/include/geos/operation/overlayng/RingClipper.h +++ b/include/geos/operation/overlayng/RingClipper.h @@ -27,8 +27,6 @@ class CoordinateSequence; } } -using namespace geos::geom; - namespace geos { // geos. namespace operation { // geos.operation namespace overlayng { // geos.operation.overlayng @@ -62,6 +60,9 @@ namespace overlayng { // geos.operation.overlayng * */ class GEOS_DLL RingClipper { + using Coordinate = geos::geom::Coordinate; + using CoordinateSequence = geos::geom::CoordinateSequence; + using Envelope = geos::geom::Envelope; private: diff --git a/include/geos/operation/overlayng/RobustClipEnvelopeComputer.h b/include/geos/operation/overlayng/RobustClipEnvelopeComputer.h index c75c05633f..4c43ed706c 100644 --- a/include/geos/operation/overlayng/RobustClipEnvelopeComputer.h +++ b/include/geos/operation/overlayng/RobustClipEnvelopeComputer.h @@ -38,8 +38,6 @@ namespace geos { // geos. namespace operation { // geos.operation namespace overlayng { // geos.operation.overlayng -using namespace geos::geom; - /** * Computes a robust clipping envelope for a pair of polygonal geometries. * The envelope is computed to be large enough to include the full @@ -50,6 +48,12 @@ using namespace geos::geom; * @author mdavis */ class GEOS_DLL RobustClipEnvelopeComputer { + using Coordinate = geos::geom::Coordinate; + using Geometry = geos::geom::Geometry; + using GeometryCollection = geos::geom::GeometryCollection; + using Polygon = geos::geom::Polygon; + using LinearRing = geos::geom::LinearRing; + using Envelope = geos::geom::Envelope; private: diff --git a/include/geos/operation/overlayng/UnaryUnionNG.h b/include/geos/operation/overlayng/UnaryUnionNG.h index dd7a251d9d..ebc7d75a61 100644 --- a/include/geos/operation/overlayng/UnaryUnionNG.h +++ b/include/geos/operation/overlayng/UnaryUnionNG.h @@ -42,6 +42,8 @@ namespace overlayng { // geos.operation.overlayng * */ class GEOS_DLL UnaryUnionNG { + using Geometry = geos::geom::Geometry; + using PrecisionModel = geos::geom::PrecisionModel; private: diff --git a/include/geos/operation/relateng/AdjacentEdgeLocator.h b/include/geos/operation/relateng/AdjacentEdgeLocator.h index d6e5769859..3a84a79c66 100644 --- a/include/geos/operation/relateng/AdjacentEdgeLocator.h +++ b/include/geos/operation/relateng/AdjacentEdgeLocator.h @@ -36,16 +36,6 @@ namespace geom { } } - -using geos::geom::CoordinateXY; -using geos::geom::CoordinateSequence; -using geos::geom::Geometry; -using geos::geom::LinearRing; -using geos::geom::Polygon; -using geos::geom::Location; - - - namespace geos { // geos. namespace operation { // geos.operation namespace relateng { // geos.operation.relateng @@ -65,6 +55,12 @@ namespace relateng { // geos.operation.relateng * */ class GEOS_DLL AdjacentEdgeLocator { + using CoordinateXY = geos::geom::CoordinateXY; + using CoordinateSequence = geos::geom::CoordinateSequence; + using Geometry = geos::geom::Geometry; + using LinearRing = geos::geom::LinearRing; + using Polygon = geos::geom::Polygon; + using Location = geos::geom::Location; public: diff --git a/include/geos/operation/relateng/BasicPredicate.h b/include/geos/operation/relateng/BasicPredicate.h index 2ed3f05396..083973e7c0 100644 --- a/include/geos/operation/relateng/BasicPredicate.h +++ b/include/geos/operation/relateng/BasicPredicate.h @@ -29,17 +29,15 @@ namespace geom { } } - -using geos::geom::Envelope; -using geos::geom::Location; - - namespace geos { // geos. namespace operation { // geos.operation. namespace relateng { // geos.operation.relateng class GEOS_DLL BasicPredicate : public TopologyPredicate { +protected: + using Envelope = geos::geom::Envelope; + using Location = geos::geom::Location; private: diff --git a/include/geos/operation/relateng/DimensionLocation.h b/include/geos/operation/relateng/DimensionLocation.h index 6d3d87050a..22c327aa1b 100644 --- a/include/geos/operation/relateng/DimensionLocation.h +++ b/include/geos/operation/relateng/DimensionLocation.h @@ -18,16 +18,13 @@ #include #include - -using geos::geom::Location; - - namespace geos { // geos. namespace operation { // geos.operation namespace relateng { // geos.operation.relateng class GEOS_DLL DimensionLocation { + using Location = geos::geom::Location; public: diff --git a/include/geos/operation/relateng/EdgeSegmentIntersector.h b/include/geos/operation/relateng/EdgeSegmentIntersector.h index 1b05b6f134..29714863b1 100644 --- a/include/geos/operation/relateng/EdgeSegmentIntersector.h +++ b/include/geos/operation/relateng/EdgeSegmentIntersector.h @@ -34,17 +34,13 @@ namespace relateng { } } - -using geos::noding::SegmentIntersector; -using geos::noding::SegmentString; -using geos::algorithm::LineIntersector; - - namespace geos { // geos. namespace operation { // geos.operation namespace relateng { // geos.operation.relateng -class GEOS_DLL EdgeSegmentIntersector : public SegmentIntersector { +class GEOS_DLL EdgeSegmentIntersector : public geos::noding::SegmentIntersector { + using SegmentString = geos::noding::SegmentString; + using LineIntersector = geos::algorithm::LineIntersector; private: diff --git a/include/geos/operation/relateng/EdgeSegmentOverlapAction.h b/include/geos/operation/relateng/EdgeSegmentOverlapAction.h index 7f84ec7979..3364a4d41d 100644 --- a/include/geos/operation/relateng/EdgeSegmentOverlapAction.h +++ b/include/geos/operation/relateng/EdgeSegmentOverlapAction.h @@ -35,12 +35,6 @@ namespace noding { } } - -using geos::index::chain::MonotoneChain; -using geos::index::chain::MonotoneChainOverlapAction; -using geos::noding::SegmentIntersector; - - namespace geos { namespace operation { // geos::operation namespace relateng { // geos::operation::relateng @@ -49,7 +43,9 @@ namespace relateng { // geos::operation::relateng * The action for the internal iterator for performing * overlap queries on a MonotoneChain. */ -class GEOS_DLL EdgeSegmentOverlapAction : public MonotoneChainOverlapAction { +class GEOS_DLL EdgeSegmentOverlapAction : public geos::index::chain::MonotoneChainOverlapAction { + using MonotoneChain = geos::index::chain::MonotoneChain; + using SegmentIntersector = geos::noding::SegmentIntersector; private: diff --git a/include/geos/operation/relateng/EdgeSetIntersector.h b/include/geos/operation/relateng/EdgeSetIntersector.h index 0b59eabc94..302a397a5f 100644 --- a/include/geos/operation/relateng/EdgeSetIntersector.h +++ b/include/geos/operation/relateng/EdgeSetIntersector.h @@ -38,20 +38,18 @@ namespace relateng { } } - -using geos::geom::Envelope; -using geos::geom::Geometry; -using geos::index::strtree::TemplateSTRtree; -using geos::index::chain::MonotoneChain; -using geos::noding::SegmentString; -using geos::operation::relateng::EdgeSegmentIntersector; - - namespace geos { // geos. namespace operation { // geos.operation namespace relateng { // geos.operation.relateng class GEOS_DLL EdgeSetIntersector { + using Envelope = geos::geom::Envelope; + using Geometry = geos::geom::Geometry; + template + using TemplateSTRtree = geos::index::strtree::TemplateSTRtree; + using MonotoneChain = geos::index::chain::MonotoneChain; + using SegmentString = geos::noding::SegmentString; + using EdgeSegmentIntersector = geos::operation::relateng::EdgeSegmentIntersector; private: diff --git a/include/geos/operation/relateng/IMPatternMatcher.h b/include/geos/operation/relateng/IMPatternMatcher.h index be8486c576..21fc028836 100644 --- a/include/geos/operation/relateng/IMPatternMatcher.h +++ b/include/geos/operation/relateng/IMPatternMatcher.h @@ -31,20 +31,16 @@ namespace geom { } } - -using geos::geom::Envelope; -using geos::geom::Location; -using geos::geom::Dimension; -using geos::geom::IntersectionMatrix; - - namespace geos { // geos. namespace operation { // geos.operation. namespace relateng { // geos.operation.relateng class GEOS_DLL IMPatternMatcher : public IMPredicate { - + using Envelope = geos::geom::Envelope; + using Location = geos::geom::Location; + using Dimension = geos::geom::Dimension; + using IntersectionMatrix = geos::geom::IntersectionMatrix; private: diff --git a/include/geos/operation/relateng/IMPredicate.h b/include/geos/operation/relateng/IMPredicate.h index 6cf9f9b10d..afd6543a71 100644 --- a/include/geos/operation/relateng/IMPredicate.h +++ b/include/geos/operation/relateng/IMPredicate.h @@ -31,19 +31,17 @@ namespace geom { } } - -using geos::geom::Envelope; -using geos::geom::Location; -using geos::geom::Dimension; -using geos::geom::IntersectionMatrix; - - namespace geos { // geos. namespace operation { // geos.operation. namespace relateng { // geos.operation.relateng class GEOS_DLL IMPredicate : public BasicPredicate { +protected: + using Envelope = geos::geom::Envelope; + using Location = geos::geom::Location; + using Dimension = geos::geom::Dimension; + using IntersectionMatrix = geos::geom::IntersectionMatrix; private: diff --git a/include/geos/operation/relateng/LineStringExtracter.h b/include/geos/operation/relateng/LineStringExtracter.h index fc7298f882..993f783194 100644 --- a/include/geos/operation/relateng/LineStringExtracter.h +++ b/include/geos/operation/relateng/LineStringExtracter.h @@ -29,18 +29,14 @@ namespace geom { } } - -using geos::geom::LineString; -using geos::geom::Geometry; -using geos::geom::GeometryFilter; - - namespace geos { // geos. namespace operation { // geos.operation namespace relateng { // geos.operation.relateng -class GEOS_DLL LineStringExtracter : public GeometryFilter { +class GEOS_DLL LineStringExtracter : public geos::geom::GeometryFilter { + using LineString = geos::geom::LineString; + using Geometry = geos::geom::Geometry; private: diff --git a/include/geos/operation/relateng/LinearBoundary.h b/include/geos/operation/relateng/LinearBoundary.h index 18032663b2..9cd8fe6d83 100644 --- a/include/geos/operation/relateng/LinearBoundary.h +++ b/include/geos/operation/relateng/LinearBoundary.h @@ -32,18 +32,15 @@ namespace geom { } } - -using geos::algorithm::BoundaryNodeRule; -using geos::geom::Coordinate; -using geos::geom::CoordinateXY; -using geos::geom::LineString; - - namespace geos { // geos. namespace operation { // geos.operation namespace relateng { // geos.operation.relateng class GEOS_DLL LinearBoundary { + using BoundaryNodeRule = geos::algorithm::BoundaryNodeRule; + using Coordinate = geos::geom::Coordinate; + using CoordinateXY = geos::geom::CoordinateXY; + using LineString = geos::geom::LineString; private: diff --git a/include/geos/operation/relateng/NodeSection.h b/include/geos/operation/relateng/NodeSection.h index 8fe00870eb..16b85e949b 100644 --- a/include/geos/operation/relateng/NodeSection.h +++ b/include/geos/operation/relateng/NodeSection.h @@ -28,11 +28,6 @@ namespace geom { } } - -using geos::geom::CoordinateXY; -using geos::geom::Geometry; - - namespace geos { // geos. namespace operation { // geos.operation namespace relateng { // geos.operation.relateng @@ -53,6 +48,8 @@ namespace relateng { // geos.operation.relateng * */ class GEOS_DLL NodeSection { + using CoordinateXY = geos::geom::CoordinateXY; + using Geometry = geos::geom::Geometry; private: diff --git a/include/geos/operation/relateng/NodeSections.h b/include/geos/operation/relateng/NodeSections.h index d7d08b3420..ceafa12401 100644 --- a/include/geos/operation/relateng/NodeSections.h +++ b/include/geos/operation/relateng/NodeSections.h @@ -35,17 +35,14 @@ namespace geom { } } - -using geos::geom::CoordinateXY; -using geos::geom::Geometry; - - namespace geos { // geos. namespace operation { // geos.operation namespace relateng { // geos.operation.relateng class GEOS_DLL NodeSections { + using CoordinateXY = geos::geom::CoordinateXY; + using Geometry = geos::geom::Geometry; private: diff --git a/include/geos/operation/relateng/PolygonNodeConverter.h b/include/geos/operation/relateng/PolygonNodeConverter.h index 0b1ddce358..60d0fac435 100644 --- a/include/geos/operation/relateng/PolygonNodeConverter.h +++ b/include/geos/operation/relateng/PolygonNodeConverter.h @@ -64,6 +64,7 @@ namespace relateng { // geos.operation.relateng * @see RelateNode */ class GEOS_DLL PolygonNodeConverter { + using CoordinateXY = geos::geom::CoordinateXY; public: diff --git a/include/geos/operation/relateng/RelateEdge.h b/include/geos/operation/relateng/RelateEdge.h index 96afc244c8..176a93978c 100644 --- a/include/geos/operation/relateng/RelateEdge.h +++ b/include/geos/operation/relateng/RelateEdge.h @@ -34,18 +34,15 @@ namespace geom { } } - -using geos::geom::CoordinateXY; -using geos::geom::Geometry; -using geos::geom::Location; - - namespace geos { // geos. namespace operation { // geos.operation namespace relateng { // geos.operation.relateng class GEOS_DLL RelateEdge { + using CoordinateXY = geos::geom::CoordinateXY; + using Geometry = geos::geom::Geometry; + using Location = geos::geom::Location; private: diff --git a/include/geos/operation/relateng/RelateGeometry.h b/include/geos/operation/relateng/RelateGeometry.h index 53adf01b14..09753b682e 100644 --- a/include/geos/operation/relateng/RelateGeometry.h +++ b/include/geos/operation/relateng/RelateGeometry.h @@ -48,12 +48,20 @@ namespace geos { // geos. namespace operation { // geos.operation namespace relateng { // geos.operation.relateng -using namespace geos::geom; -using geos::algorithm::BoundaryNodeRule; -using geos::noding::SegmentString; - - class GEOS_DLL RelateGeometry { + using Coordinate = geos::geom::Coordinate; + using CoordinateSequence = geos::geom::CoordinateSequence; + using Dimension = geos::geom::Dimension; + using Envelope = geos::geom::Envelope; + using Geometry = geos::geom::Geometry; + using Location = geos::geom::Location; + using CoordinateXY = geos::geom::CoordinateXY; + using LinearRing = geos::geom::LinearRing; + using LineString = geos::geom::LineString; + using MultiPolygon = geos::geom::MultiPolygon; + using Point = geos::geom::Point; + using BoundaryNodeRule = geos::algorithm::BoundaryNodeRule; + using SegmentString = geos::noding::SegmentString; private: diff --git a/include/geos/operation/relateng/RelateMatrixPredicate.h b/include/geos/operation/relateng/RelateMatrixPredicate.h index b54ec2c3b9..0acc8e322d 100644 --- a/include/geos/operation/relateng/RelateMatrixPredicate.h +++ b/include/geos/operation/relateng/RelateMatrixPredicate.h @@ -31,19 +31,16 @@ namespace geom { } } - -using geos::geom::Envelope; -using geos::geom::Location; -using geos::geom::Dimension; -using geos::geom::IntersectionMatrix; - - namespace geos { // geos. namespace operation { // geos.operation. namespace relateng { // geos.operation.relateng class GEOS_DLL RelateMatrixPredicate : public IMPredicate { + using Envelope = geos::geom::Envelope; + using Location = geos::geom::Location; + using Dimension = geos::geom::Dimension; + using IntersectionMatrix = geos::geom::IntersectionMatrix; public: diff --git a/include/geos/operation/relateng/RelateNG.h b/include/geos/operation/relateng/RelateNG.h index b55f2ddfc6..66f38395d4 100644 --- a/include/geos/operation/relateng/RelateNG.h +++ b/include/geos/operation/relateng/RelateNG.h @@ -48,13 +48,6 @@ namespace geos { // geos. namespace operation { // geos.operation namespace relateng { // geos.operation.relateng - -using geos::geom::CoordinateXY; -using geos::geom::Geometry; -using geos::algorithm::BoundaryNodeRule; -using geos::noding::MCIndexSegmentSetMutualIntersector; - - /** * Computes the value of topological predicates between two geometries based on the * Dimensionally-Extended 9-Intersection Model (DE-9IM). @@ -91,6 +84,14 @@ using geos::noding::MCIndexSegmentSetMutualIntersector; * @see PreparedGeometry */ class GEOS_DLL RelateNG { + using CoordinateXY = geos::geom::CoordinateXY; + using Geometry = geos::geom::Geometry; + using BoundaryNodeRule = geos::algorithm::BoundaryNodeRule; + using MCIndexSegmentSetMutualIntersector = geos::noding::MCIndexSegmentSetMutualIntersector; + using LinearRing = geos::geom::LinearRing; + using Envelope = geos::geom::Envelope; + using SegmentString = geos::noding::SegmentString; + using IntersectionMatrix = geos::geom::IntersectionMatrix; private: diff --git a/include/geos/operation/relateng/RelateNode.h b/include/geos/operation/relateng/RelateNode.h index 581eec3592..7c43903245 100644 --- a/include/geos/operation/relateng/RelateNode.h +++ b/include/geos/operation/relateng/RelateNode.h @@ -37,17 +37,14 @@ namespace geom { } } - -using geos::geom::CoordinateXY; -using geos::geom::Geometry; - - namespace geos { // geos. namespace operation { // geos.operation namespace relateng { // geos.operation.relateng class GEOS_DLL RelateNode { + using CoordinateXY = geos::geom::CoordinateXY; + using Geometry = geos::geom::Geometry; private: diff --git a/include/geos/operation/relateng/RelatePointLocator.h b/include/geos/operation/relateng/RelatePointLocator.h index 3ac03da64b..a2cb3cfe32 100644 --- a/include/geos/operation/relateng/RelatePointLocator.h +++ b/include/geos/operation/relateng/RelatePointLocator.h @@ -47,17 +47,6 @@ namespace geom { } } - -using geos::algorithm::BoundaryNodeRule; -using geos::algorithm::locate::PointOnGeometryLocator; -using geos::geom::Coordinate; -using geos::geom::CoordinateXY; -using geos::geom::Geometry; -using geos::geom::LineString; -using geos::geom::Point; -using geos::geom::Location; - - namespace geos { // geos. namespace operation { // geos.operation namespace relateng { // geos.operation.relateng @@ -84,6 +73,14 @@ namespace relateng { // geos.operation.relateng * @author Martin Davis */ class GEOS_DLL RelatePointLocator { + using BoundaryNodeRule = geos::algorithm::BoundaryNodeRule; + using PointOnGeometryLocator = geos::algorithm::locate::PointOnGeometryLocator; + using Coordinate = geos::geom::Coordinate; + using CoordinateXY = geos::geom::CoordinateXY; + using Geometry = geos::geom::Geometry; + using LineString = geos::geom::LineString; + using Point = geos::geom::Point; + using Location = geos::geom::Location; private: diff --git a/include/geos/operation/relateng/RelatePredicate.h b/include/geos/operation/relateng/RelatePredicate.h index ca1db412f1..c7950d3a83 100644 --- a/include/geos/operation/relateng/RelatePredicate.h +++ b/include/geos/operation/relateng/RelatePredicate.h @@ -23,17 +23,14 @@ #include #include - -using geos::geom::Envelope; -using geos::geom::Location; - - namespace geos { // geos. namespace operation { // geos.operation. namespace relateng { // geos.operation.relateng class GEOS_DLL RelatePredicate { + using Envelope = geos::geom::Envelope; + using Location = geos::geom::Location; public: diff --git a/include/geos/operation/relateng/RelateSegmentString.h b/include/geos/operation/relateng/RelateSegmentString.h index f2e6caff45..dcd486a760 100644 --- a/include/geos/operation/relateng/RelateSegmentString.h +++ b/include/geos/operation/relateng/RelateSegmentString.h @@ -38,20 +38,17 @@ namespace relateng { } } - -using geos::noding::BasicSegmentString; -using geos::geom::Geometry; -using geos::geom::CoordinateXY; -using geos::geom::CoordinateSequence; - - namespace geos { // geos. namespace operation { // geos.operation namespace relateng { // geos.operation.relateng -class GEOS_DLL RelateSegmentString : public BasicSegmentString { +class GEOS_DLL RelateSegmentString : public geos::noding::BasicSegmentString { + using BasicSegmentString = geos::noding::BasicSegmentString; + using Geometry = geos::geom::Geometry; + using CoordinateXY = geos::geom::CoordinateXY; + using CoordinateSequence = geos::geom::CoordinateSequence; private: diff --git a/include/geos/operation/relateng/TopologyComputer.h b/include/geos/operation/relateng/TopologyComputer.h index 4b52598b36..e016d8e6e8 100644 --- a/include/geos/operation/relateng/TopologyComputer.h +++ b/include/geos/operation/relateng/TopologyComputer.h @@ -32,22 +32,19 @@ namespace relateng { } } - -using geos::geom::CoordinateXY; -using geos::geom::Location; -using geos::operation::relateng::NodeSection; -using geos::operation::relateng::NodeSections; -using geos::operation::relateng::RelateGeometry; -using geos::operation::relateng::RelateNode; -using geos::operation::relateng::TopologyPredicate; - - namespace geos { // geos. namespace operation { // geos.operation namespace relateng { // geos.operation.relateng class GEOS_DLL TopologyComputer { + using CoordinateXY = geos::geom::CoordinateXY; + using Location = geos::geom::Location; + using NodeSection = geos::operation::relateng::NodeSection; + using NodeSections = geos::operation::relateng::NodeSections; + using RelateGeometry = geos::operation::relateng::RelateGeometry; + using RelateNode = geos::operation::relateng::RelateNode; + using TopologyPredicate = geos::operation::relateng::TopologyPredicate; private: diff --git a/include/geos/operation/relateng/TopologyPredicate.h b/include/geos/operation/relateng/TopologyPredicate.h index 52ec524d86..b944d6b146 100644 --- a/include/geos/operation/relateng/TopologyPredicate.h +++ b/include/geos/operation/relateng/TopologyPredicate.h @@ -28,17 +28,14 @@ namespace geom { } } - -using geos::geom::Envelope; -using geos::geom::Location; - - namespace geos { // geos. namespace operation { // geos.operation namespace relateng { // geos.operation.relateng class GEOS_DLL TopologyPredicate { + using Envelope = geos::geom::Envelope; + using Location = geos::geom::Location; public: diff --git a/include/geos/operation/union/CoverageUnion.h b/include/geos/operation/union/CoverageUnion.h index 4b29b8e222..9579b4b2ca 100644 --- a/include/geos/operation/union/CoverageUnion.h +++ b/include/geos/operation/union/CoverageUnion.h @@ -28,19 +28,19 @@ namespace geos { } } -using geos::geom::Geometry; -using geos::geom::GeometryFactory; -using geos::geom::Polygon; -using geos::geom::LineString; -using geos::geom::LinearRing; -using geos::geom::LineSegment; - - namespace geos { namespace operation { namespace geounion { class GEOS_DLL CoverageUnion { + using Geometry = geos::geom::Geometry; + using GeometryFactory = geos::geom::GeometryFactory; + using Polygon = geos::geom::Polygon; + using LineString = geos::geom::LineString; + using LinearRing = geos::geom::LinearRing; + using LineSegment = geos::geom::LineSegment; + + public: static std::unique_ptr Union(const Geometry* geom); diff --git a/include/geos/operation/valid/IndexedNestedHoleTester.h b/include/geos/operation/valid/IndexedNestedHoleTester.h index 8786c56d9c..c52e977a02 100644 --- a/include/geos/operation/valid/IndexedNestedHoleTester.h +++ b/include/geos/operation/valid/IndexedNestedHoleTester.h @@ -34,12 +34,10 @@ namespace geos { // geos. namespace operation { // geos.operation namespace valid { // geos.operation.valid -using geos::geom::Polygon; -using geos::geom::LinearRing; -using geos::geom::CoordinateXY; - - class GEOS_DLL IndexedNestedHoleTester { + using Polygon = geos::geom::Polygon; + using LinearRing = geos::geom::LinearRing; + using CoordinateXY = geos::geom::CoordinateXY; private: diff --git a/include/geos/operation/valid/IndexedNestedPolygonTester.h b/include/geos/operation/valid/IndexedNestedPolygonTester.h index 9ae9dd020c..22650be44f 100644 --- a/include/geos/operation/valid/IndexedNestedPolygonTester.h +++ b/include/geos/operation/valid/IndexedNestedPolygonTester.h @@ -37,14 +37,14 @@ namespace geos { // geos. namespace operation { // geos.operation namespace valid { // geos.operation.valid -using geos::geom::Polygon; -using geos::geom::MultiPolygon; -using geos::geom::LinearRing; -using geos::geom::CoordinateXY; -using algorithm::locate::IndexedPointInAreaLocator; -using index::strtree::TemplateSTRtree; - class GEOS_DLL IndexedNestedPolygonTester { + using Polygon = geos::geom::Polygon; + using MultiPolygon = geos::geom::MultiPolygon; + using LinearRing = geos::geom::LinearRing; + using CoordinateXY = geos::geom::CoordinateXY; + using IndexedPointInAreaLocator = algorithm::locate::IndexedPointInAreaLocator; + template + using TemplateSTRtree = index::strtree::TemplateSTRtree; private: diff --git a/include/geos/operation/valid/IsValidOp.h b/include/geos/operation/valid/IsValidOp.h index d669ddfd97..27c6fe4c42 100644 --- a/include/geos/operation/valid/IsValidOp.h +++ b/include/geos/operation/valid/IsValidOp.h @@ -55,6 +55,7 @@ namespace valid { // geos.operation.valid * @version 1.7 */ class GEOS_DLL IsValidOp { + using CoordinateXY = geos::geom::CoordinateXY; private: diff --git a/include/geos/operation/valid/PolygonIntersectionAnalyzer.h b/include/geos/operation/valid/PolygonIntersectionAnalyzer.h index 40542e18ef..4a2eed919e 100644 --- a/include/geos/operation/valid/PolygonIntersectionAnalyzer.h +++ b/include/geos/operation/valid/PolygonIntersectionAnalyzer.h @@ -36,10 +36,9 @@ namespace geos { // geos. namespace operation { // geos.operation namespace valid { // geos.operation.valid -using geos::geom::CoordinateXY; -using geos::noding::SegmentString; - class GEOS_DLL PolygonIntersectionAnalyzer : public noding::SegmentIntersector { + using CoordinateXY = geos::geom::CoordinateXY; + using SegmentString = geos::noding::SegmentString; private: diff --git a/include/geos/operation/valid/PolygonRing.h b/include/geos/operation/valid/PolygonRing.h index fc32e9d2f5..b1447c18ab 100644 --- a/include/geos/operation/valid/PolygonRing.h +++ b/include/geos/operation/valid/PolygonRing.h @@ -35,11 +35,9 @@ namespace geos { // geos. namespace operation { // geos.operation namespace valid { // geos.operation.valid -using geos::geom::CoordinateXY; -using geos::geom::LinearRing; - - class GEOS_DLL PolygonRing { + using CoordinateXY = geos::geom::CoordinateXY; + using LinearRing = geos::geom::LinearRing; private: diff --git a/include/geos/operation/valid/PolygonRingSelfNode.h b/include/geos/operation/valid/PolygonRingSelfNode.h index d9cd8b760b..2b95eebdb7 100644 --- a/include/geos/operation/valid/PolygonRingSelfNode.h +++ b/include/geos/operation/valid/PolygonRingSelfNode.h @@ -26,9 +26,8 @@ namespace geos { // geos. namespace operation { // geos.operation namespace valid { // geos.operation.valid -using geos::geom::CoordinateXY; - class GEOS_DLL PolygonRingSelfNode { + using CoordinateXY = geos::geom::CoordinateXY; private: diff --git a/include/geos/operation/valid/PolygonRingTouch.h b/include/geos/operation/valid/PolygonRingTouch.h index c8aea3df96..b59e64bbe1 100644 --- a/include/geos/operation/valid/PolygonRingTouch.h +++ b/include/geos/operation/valid/PolygonRingTouch.h @@ -34,9 +34,8 @@ namespace geos { // geos. namespace operation { // geos.operation namespace valid { // geos.operation.valid -using geos::geom::CoordinateXY; - class GEOS_DLL PolygonRingTouch { + using CoordinateXY = geos::geom::CoordinateXY; private: diff --git a/include/geos/operation/valid/PolygonTopologyAnalyzer.h b/include/geos/operation/valid/PolygonTopologyAnalyzer.h index bfb2ed430f..8d7238112d 100644 --- a/include/geos/operation/valid/PolygonTopologyAnalyzer.h +++ b/include/geos/operation/valid/PolygonTopologyAnalyzer.h @@ -35,12 +35,12 @@ namespace geos { // geos. namespace operation { // geos.operation namespace valid { // geos.operation.valid -using geos::geom::CoordinateXY; -using geos::geom::CoordinateSequence; -using geos::geom::Geometry; -using geos::geom::LinearRing; - class GEOS_DLL PolygonTopologyAnalyzer { + using CoordinateXY = geos::geom::CoordinateXY; + using CoordinateSequence = geos::geom::CoordinateSequence; + using Geometry = geos::geom::Geometry; + using LinearRing = geos::geom::LinearRing; + using SegmentString = geos::noding::SegmentString; private: diff --git a/include/geos/simplify/ComponentJumpChecker.h b/include/geos/simplify/ComponentJumpChecker.h index 59fdd2ecb2..d25cde5503 100644 --- a/include/geos/simplify/ComponentJumpChecker.h +++ b/include/geos/simplify/ComponentJumpChecker.h @@ -34,15 +34,14 @@ class TaggedLineString; } } -using geos::geom::Coordinate; -using geos::geom::Envelope; -using geos::geom::LineSegment; - namespace geos { namespace simplify { // geos::simplify class GEOS_DLL ComponentJumpChecker { + using Coordinate = geos::geom::Coordinate; + using Envelope = geos::geom::Envelope; + using LineSegment = geos::geom::LineSegment; private: diff --git a/include/geos/simplify/LinkedLine.h b/include/geos/simplify/LinkedLine.h index 7d78d59fe0..606bb7c8e1 100644 --- a/include/geos/simplify/LinkedLine.h +++ b/include/geos/simplify/LinkedLine.h @@ -29,15 +29,13 @@ class CoordinateSequence; } } -using geos::geom::Coordinate; -using geos::geom::CoordinateSequence; - - namespace geos { namespace simplify { // geos::simplify class LinkedLine { + using Coordinate = geos::geom::Coordinate; + using CoordinateSequence = geos::geom::CoordinateSequence; public: diff --git a/include/geos/simplify/LinkedRing.h b/include/geos/simplify/LinkedRing.h index 5df7eb98c8..85ea607f50 100644 --- a/include/geos/simplify/LinkedRing.h +++ b/include/geos/simplify/LinkedRing.h @@ -20,9 +20,6 @@ #include #include -using geos::geom::Coordinate; -using geos::geom::CoordinateSequence; - namespace geos { namespace simplify { // geos::simplify @@ -30,6 +27,9 @@ namespace simplify { // geos::simplify class LinkedRing { + using Coordinate = geos::geom::Coordinate; + using CoordinateSequence = geos::geom::CoordinateSequence; + private: const CoordinateSequence& m_coord; diff --git a/include/geos/simplify/PolygonHullSimplifier.h b/include/geos/simplify/PolygonHullSimplifier.h index db2a4b6b6e..ac603f2614 100644 --- a/include/geos/simplify/PolygonHullSimplifier.h +++ b/include/geos/simplify/PolygonHullSimplifier.h @@ -33,15 +33,6 @@ class RingHullIndex; } } - -using geos::geom::Envelope; -using geos::geom::Geometry; -using geos::geom::GeometryFactory; -using geos::geom::LinearRing; -using geos::geom::MultiPolygon; -using geos::geom::Polygon; - - namespace geos { namespace simplify { // geos::simplify @@ -84,6 +75,12 @@ namespace simplify { // geos::simplify */ class GEOS_DLL PolygonHullSimplifier { + using Envelope = geos::geom::Envelope; + using Geometry = geos::geom::Geometry; + using GeometryFactory = geos::geom::GeometryFactory; + using LinearRing = geos::geom::LinearRing; + using MultiPolygon = geos::geom::MultiPolygon; + using Polygon = geos::geom::Polygon; public: diff --git a/include/geos/simplify/RingHull.h b/include/geos/simplify/RingHull.h index fd8a0443bc..d22bb911f9 100644 --- a/include/geos/simplify/RingHull.h +++ b/include/geos/simplify/RingHull.h @@ -32,21 +32,20 @@ class RingHullIndex; } } - -using geos::geom::Coordinate; -using geos::geom::Envelope; -using geos::geom::LinearRing; -using geos::geom::LineString; -using geos::geom::Polygon; -using geos::index::VertexSequencePackedRtree; - - namespace geos { namespace simplify { // geos::simplify class RingHull { + using Coordinate = geos::geom::Coordinate; + using CoordinateSequence = geos::geom::CoordinateSequence; + using Envelope = geos::geom::Envelope; + using LinearRing = geos::geom::LinearRing; + using LineString = geos::geom::LineString; + using Polygon = geos::geom::Polygon; + using VertexSequencePackedRtree = geos::index::VertexSequencePackedRtree; + public: diff --git a/include/geos/simplify/TaggedLineString.h b/include/geos/simplify/TaggedLineString.h index b23f3a400d..a3f962b21c 100644 --- a/include/geos/simplify/TaggedLineString.h +++ b/include/geos/simplify/TaggedLineString.h @@ -47,9 +47,6 @@ class TaggedLineSegment; } } -using geos::geom::Coordinate; -using geos::geom::CoordinateSequence; - namespace geos { namespace simplify { // geos::simplify @@ -58,6 +55,8 @@ namespace simplify { // geos::simplify * Contains and owns a list of TaggedLineSegments. */ class GEOS_DLL TaggedLineString { + using Coordinate = geos::geom::Coordinate; + using CoordinateSequence = geos::geom::CoordinateSequence; public: diff --git a/include/geos/simplify/TaggedLineStringSimplifier.h b/include/geos/simplify/TaggedLineStringSimplifier.h index 3fba7e0d57..495a126289 100644 --- a/include/geos/simplify/TaggedLineStringSimplifier.h +++ b/include/geos/simplify/TaggedLineStringSimplifier.h @@ -51,11 +51,6 @@ class ComponentJumpChecker; } } -using geos::geom::CoordinateSequence; -using geos::geom::Coordinate; -using geos::geom::LineSegment; - - namespace geos { namespace simplify { // geos::simplify @@ -67,6 +62,9 @@ namespace simplify { // geos::simplify * */ class GEOS_DLL TaggedLineStringSimplifier { + using CoordinateSequence = geos::geom::CoordinateSequence; + using Coordinate = geos::geom::Coordinate; + using LineSegment = geos::geom::LineSegment; public: diff --git a/include/geos/triangulate/polygon/ConstrainedDelaunayTriangulator.h b/include/geos/triangulate/polygon/ConstrainedDelaunayTriangulator.h index 23c385d21e..f03c97cffe 100644 --- a/include/geos/triangulate/polygon/ConstrainedDelaunayTriangulator.h +++ b/include/geos/triangulate/polygon/ConstrainedDelaunayTriangulator.h @@ -26,13 +26,6 @@ class Polygon; } } -using geos::geom::Geometry; -using geos::geom::GeometryFactory; -using geos::geom::Polygon; -using geos::triangulate::tri::TriList; -using geos::triangulate::tri::Tri; - - namespace geos { namespace triangulate { namespace polygon { @@ -48,6 +41,12 @@ namespace polygon { * Holes are supported. */ class GEOS_DLL ConstrainedDelaunayTriangulator { + using Geometry = geos::geom::Geometry; + using GeometryFactory = geos::geom::GeometryFactory; + using Polygon = geos::geom::Polygon; + template + using TriList = geos::triangulate::tri::TriList; + using Tri = geos::triangulate::tri::Tri; private: diff --git a/include/geos/triangulate/polygon/PolygonEarClipper.h b/include/geos/triangulate/polygon/PolygonEarClipper.h index 5616216617..1eacca8bd8 100644 --- a/include/geos/triangulate/polygon/PolygonEarClipper.h +++ b/include/geos/triangulate/polygon/PolygonEarClipper.h @@ -32,13 +32,6 @@ class Envelope; } } -using geos::geom::Coordinate; -using geos::geom::Polygon; -using geos::geom::Envelope; -using geos::triangulate::tri::Tri; -using geos::triangulate::tri::TriList; -using geos::index::VertexSequencePackedRtree; - namespace geos { namespace triangulate { namespace polygon { @@ -65,6 +58,14 @@ namespace polygon { * */ class GEOS_DLL PolygonEarClipper { + using Coordinate = geos::geom::Coordinate; + using CoordinateSequence = geos::geom::CoordinateSequence; + using Polygon = geos::geom::Polygon; + using Envelope = geos::geom::Envelope; + using Tri = geos::triangulate::tri::Tri; + template + using TriList = geos::triangulate::tri::TriList; + using VertexSequencePackedRtree = geos::index::VertexSequencePackedRtree; private: diff --git a/include/geos/triangulate/polygon/PolygonHoleJoiner.h b/include/geos/triangulate/polygon/PolygonHoleJoiner.h index b65c0c0a04..870282f7dc 100644 --- a/include/geos/triangulate/polygon/PolygonHoleJoiner.h +++ b/include/geos/triangulate/polygon/PolygonHoleJoiner.h @@ -37,14 +37,6 @@ namespace noding { } } -using geos::geom::Coordinate; -using geos::geom::CoordinateSequence; -using geos::geom::Polygon; -using geos::geom::LinearRing; -using geos::noding::BasicSegmentString; -using geos::noding::SegmentSetMutualIntersector; - - namespace geos { namespace triangulate { namespace polygon { @@ -68,6 +60,12 @@ namespace polygon { * The output ring is always CW. */ class GEOS_DLL PolygonHoleJoiner { + using Coordinate = geos::geom::Coordinate; + using CoordinateSequence = geos::geom::CoordinateSequence; + using Polygon = geos::geom::Polygon; + using LinearRing = geos::geom::LinearRing; + using BasicSegmentString = geos::noding::BasicSegmentString; + using SegmentSetMutualIntersector = geos::noding::SegmentSetMutualIntersector; private: diff --git a/include/geos/triangulate/polygon/PolygonNoder.h b/include/geos/triangulate/polygon/PolygonNoder.h index 94c3556414..fde921356a 100644 --- a/include/geos/triangulate/polygon/PolygonNoder.h +++ b/include/geos/triangulate/polygon/PolygonNoder.h @@ -19,6 +19,7 @@ //#include #include +#include #include #include @@ -38,12 +39,6 @@ class LineIntersector; } } -using geos::geom::Coordinate; -using geos::geom::CoordinateSequence; -using geos::noding::NodedSegmentString; -using geos::algorithm::LineIntersector; - - namespace geos { namespace triangulate { namespace polygon { @@ -60,6 +55,13 @@ namespace polygon { * and does not trigger an error. */ class GEOS_DLL PolygonNoder { + using Coordinate = geos::geom::Coordinate; + using CoordinateSequence = geos::geom::CoordinateSequence; + using NodedSegmentString = geos::noding::NodedSegmentString; + using LineIntersector = geos::algorithm::LineIntersector; + using Tri = geos::triangulate::tri::Tri; + template + using TriList = geos::triangulate::tri::TriList; public: diff --git a/include/geos/triangulate/polygon/PolygonTriangulator.h b/include/geos/triangulate/polygon/PolygonTriangulator.h index 4df9cfe54a..8c6cd2b54b 100644 --- a/include/geos/triangulate/polygon/PolygonTriangulator.h +++ b/include/geos/triangulate/polygon/PolygonTriangulator.h @@ -26,13 +26,6 @@ class Polygon; } } -using geos::geom::Geometry; -using geos::geom::GeometryFactory; -using geos::geom::Polygon; -using geos::triangulate::tri::TriList; -using geos::triangulate::tri::Tri; - - namespace geos { namespace triangulate { namespace polygon { @@ -57,6 +50,12 @@ namespace polygon { * */ class GEOS_DLL PolygonTriangulator { + using Geometry = geos::geom::Geometry; + using GeometryFactory = geos::geom::GeometryFactory; + using Polygon = geos::geom::Polygon; + template + using TriList = geos::triangulate::tri::TriList; + using Tri = geos::triangulate::tri::Tri; private: diff --git a/include/geos/triangulate/polygon/TriDelaunayImprover.h b/include/geos/triangulate/polygon/TriDelaunayImprover.h index 3d1758d67a..956c4d8797 100644 --- a/include/geos/triangulate/polygon/TriDelaunayImprover.h +++ b/include/geos/triangulate/polygon/TriDelaunayImprover.h @@ -26,11 +26,6 @@ class Coordinate; } } -using geos::geom::Coordinate; -using geos::triangulate::tri::TriList; -using geos::triangulate::tri::Tri; - - namespace geos { namespace triangulate { namespace polygon { @@ -46,6 +41,10 @@ namespace polygon { * */ class GEOS_DLL TriDelaunayImprover { + using Coordinate = geos::geom::Coordinate; + using Tri = geos::triangulate::tri::Tri; + template + using TriList = geos::triangulate::tri::TriList; private: diff --git a/include/geos/triangulate/tri/Tri.h b/include/geos/triangulate/tri/Tri.h index 786e250d3e..06fecedc4b 100644 --- a/include/geos/triangulate/tri/Tri.h +++ b/include/geos/triangulate/tri/Tri.h @@ -28,10 +28,6 @@ class Polygon; } } -using geos::geom::Coordinate; -using geos::geom::Polygon; -using geos::geom::GeometryFactory; - namespace geos { // geos. namespace triangulate { // geos.triangulate namespace tri { // geos.triangulate.tri @@ -47,6 +43,10 @@ namespace tri { // geos.triangulate.tri * */ class GEOS_DLL Tri { + using Coordinate = geos::geom::Coordinate; + using Polygon = geos::geom::Polygon; + using Geometry = geos::geom::Geometry; + using GeometryFactory = geos::geom::GeometryFactory; protected: diff --git a/include/geos/triangulate/tri/TriEdge.h b/include/geos/triangulate/tri/TriEdge.h index 208006449b..14199b93d9 100644 --- a/include/geos/triangulate/tri/TriEdge.h +++ b/include/geos/triangulate/tri/TriEdge.h @@ -18,8 +18,6 @@ #include #include -using geos::geom::Coordinate; - namespace geos { // geos. namespace triangulate { // geos.triangulate namespace tri { // geos.triangulate.tri @@ -35,6 +33,7 @@ namespace tri { // geos.triangulate.tri * @author mdavis */ class GEOS_DLL TriEdge { + using Coordinate = geos::geom::Coordinate; private: diff --git a/include/geos/triangulate/tri/TriList.h b/include/geos/triangulate/tri/TriList.h index a71deb2114..78a622af37 100644 --- a/include/geos/triangulate/tri/TriList.h +++ b/include/geos/triangulate/tri/TriList.h @@ -31,10 +31,6 @@ class Geometry; } } -using geos::geom::Coordinate; -using geos::geom::Geometry; -using geos::geom::GeometryFactory; - typedef int TriIndex; namespace geos { // geos. @@ -52,6 +48,9 @@ namespace tri { // geos.triangulate.tri */ template class TriList { + using Coordinate = geos::geom::Coordinate; + using Geometry = geos::geom::Geometry; + using GeometryFactory = geos::geom::GeometryFactory; private: diff --git a/include/geos/triangulate/tri/TriangulationBuilder.h b/include/geos/triangulate/tri/TriangulationBuilder.h index 1faa2ca115..09f5a5e0c1 100644 --- a/include/geos/triangulate/tri/TriangulationBuilder.h +++ b/include/geos/triangulate/tri/TriangulationBuilder.h @@ -32,8 +32,6 @@ class Tri; } } -using geos::geom::Coordinate; - namespace geos { // geos. namespace triangulate { // geos.triangulate namespace tri { // geos.triangulate.tri @@ -47,6 +45,7 @@ namespace tri { // geos.triangulate.tri * */ class GEOS_DLL TriangulationBuilder { + using Coordinate = geos::geom::Coordinate; private: diff --git a/src/algorithm/CGAlgorithmsDD.cpp b/src/algorithm/CGAlgorithmsDD.cpp index ccfef602ef..0d61b335ed 100644 --- a/src/algorithm/CGAlgorithmsDD.cpp +++ b/src/algorithm/CGAlgorithmsDD.cpp @@ -20,11 +20,11 @@ #include #include #include -#include #include using namespace geos::geom; using namespace geos::algorithm; +using geos::math::DD; namespace { diff --git a/src/algorithm/construct/IndexedPointInPolygonsLocator.cpp b/src/algorithm/construct/IndexedPointInPolygonsLocator.cpp index bb9e51abe6..1832ef3cad 100644 --- a/src/algorithm/construct/IndexedPointInPolygonsLocator.cpp +++ b/src/algorithm/construct/IndexedPointInPolygonsLocator.cpp @@ -24,6 +24,7 @@ using geos::algorithm::locate::IndexedPointInAreaLocator; using geos::geom::Envelope; +using geos::geom::Location; using geos::geom::util::PolygonalExtracter; namespace geos { diff --git a/src/algorithm/hull/HullTriangulation.cpp b/src/algorithm/hull/HullTriangulation.cpp index ea8e0d4eb3..b9b77f8351 100644 --- a/src/algorithm/hull/HullTriangulation.cpp +++ b/src/algorithm/hull/HullTriangulation.cpp @@ -39,6 +39,7 @@ using geos::geom::Polygon; using geos::geom::Triangle; using geos::triangulate::DelaunayTriangulationBuilder; using geos::triangulate::tri::TriangulationBuilder; +using geos::triangulate::tri::Tri; using geos::operation::overlayng::CoverageUnion; namespace geos { diff --git a/src/coverage/Corner.cpp b/src/coverage/Corner.cpp index 743681e7b1..9aeb033ae6 100644 --- a/src/coverage/Corner.cpp +++ b/src/coverage/Corner.cpp @@ -25,9 +25,11 @@ using geos::coverage::Corner; using geos::geom::Coordinate; +using geos::geom::CoordinateSequence; using geos::geom::Envelope; using geos::geom::GeometryFactory; using geos::geom::Triangle; +using geos::geom::LineString; using geos::io::WKTWriter; namespace geos { diff --git a/src/coverage/CoverageBoundarySegmentFinder.cpp b/src/coverage/CoverageBoundarySegmentFinder.cpp index 22740acfef..d5759be7d4 100644 --- a/src/coverage/CoverageBoundarySegmentFinder.cpp +++ b/src/coverage/CoverageBoundarySegmentFinder.cpp @@ -19,6 +19,7 @@ using geos::geom::CoordinateSequence; using geos::geom::Geometry; +using geos::geom::LineSegment; namespace geos { // geos diff --git a/src/coverage/CoverageEdge.cpp b/src/coverage/CoverageEdge.cpp index a2114b9925..65971fc3ad 100644 --- a/src/coverage/CoverageEdge.cpp +++ b/src/coverage/CoverageEdge.cpp @@ -26,6 +26,9 @@ using geos::geom::Coordinate; using geos::geom::GeometryFactory; using geos::geom::LinearRing; using geos::geom::LineSegment; +using geos::geom::MultiLineString; +using geos::geom::LineString; +using geos::geom::CoordinateSequence; namespace geos { // geos diff --git a/src/coverage/CoveragePolygonValidator.cpp b/src/coverage/CoveragePolygonValidator.cpp index d0161c097b..16b252e009 100644 --- a/src/coverage/CoveragePolygonValidator.cpp +++ b/src/coverage/CoveragePolygonValidator.cpp @@ -43,6 +43,7 @@ using geos::geom::Location; using geos::geom::Polygon; using geos::geom::util::PolygonExtracter; using geos::noding::MCIndexSegmentSetMutualIntersector; +using geos::noding::SegmentString; using geos::operation::valid::RepeatedPointRemover; namespace geos { // geos diff --git a/src/coverage/TPVWSimplifier.cpp b/src/coverage/TPVWSimplifier.cpp index 7d395cdf3d..0bf36ac303 100644 --- a/src/coverage/TPVWSimplifier.cpp +++ b/src/coverage/TPVWSimplifier.cpp @@ -26,6 +26,7 @@ #include using geos::geom::Coordinate; +using geos::geom::CoordinateSequence; using geos::geom::Envelope; using geos::geom::Geometry; using geos::geom::GeometryFactory; diff --git a/src/index/VertexSequencePackedRtree.cpp b/src/index/VertexSequencePackedRtree.cpp index de75836a4a..7f11ec95ed 100644 --- a/src/index/VertexSequencePackedRtree.cpp +++ b/src/index/VertexSequencePackedRtree.cpp @@ -21,6 +21,8 @@ #include +using geos::geom::Envelope; + namespace geos { namespace index { diff --git a/src/operation/overlayng/EdgeNodingBuilder.cpp b/src/operation/overlayng/EdgeNodingBuilder.cpp index d617ca4f01..569633462d 100644 --- a/src/operation/overlayng/EdgeNodingBuilder.cpp +++ b/src/operation/overlayng/EdgeNodingBuilder.cpp @@ -32,6 +32,7 @@ namespace geos { // geos namespace operation { // geos.operation namespace overlayng { // geos.operation.overlayng +using namespace geos::geom; using geos::operation::valid::RepeatedPointRemover; using geos::noding::snapround::SnapRoundingNoder; using geos::noding::Noder; diff --git a/src/operation/overlayng/InputGeometry.cpp b/src/operation/overlayng/InputGeometry.cpp index 794971887f..95580ce7a5 100644 --- a/src/operation/overlayng/InputGeometry.cpp +++ b/src/operation/overlayng/InputGeometry.cpp @@ -18,6 +18,11 @@ namespace geos { // geos namespace operation { // geos.operation namespace overlayng { // geos.operation.overlayng +using geos::geom::Location; +using geos::geom::Geometry; +using geos::geom::Envelope; +using geos::algorithm::locate::IndexedPointInAreaLocator; +using geos::algorithm::locate::PointOnGeometryLocator; /*public*/ InputGeometry::InputGeometry(const Geometry* geomA, const Geometry* geomB) diff --git a/src/operation/overlayng/IntersectionPointBuilder.cpp b/src/operation/overlayng/IntersectionPointBuilder.cpp index dc41e44007..9289ad430b 100644 --- a/src/operation/overlayng/IntersectionPointBuilder.cpp +++ b/src/operation/overlayng/IntersectionPointBuilder.cpp @@ -19,7 +19,7 @@ #include #include - +using namespace geos::geom; namespace geos { // geos namespace operation { // geos.operation diff --git a/src/operation/overlayng/LineLimiter.cpp b/src/operation/overlayng/LineLimiter.cpp index 1c8106c358..57036e248c 100644 --- a/src/operation/overlayng/LineLimiter.cpp +++ b/src/operation/overlayng/LineLimiter.cpp @@ -20,6 +20,8 @@ #include +using geos::geom::CoordinateSequence; + namespace geos { // geos namespace operation { // geos.operation namespace overlayng { // geos.operation.overlayng diff --git a/src/operation/overlayng/OverlayEdgeRing.cpp b/src/operation/overlayng/OverlayEdgeRing.cpp index a1b3d1bddf..f45d464180 100644 --- a/src/operation/overlayng/OverlayEdgeRing.cpp +++ b/src/operation/overlayng/OverlayEdgeRing.cpp @@ -31,6 +31,7 @@ namespace overlayng { // geos.operation.overlayng using namespace geos::geom; using geos::operation::polygonize::EdgeRing; +using geos::algorithm::locate::PointOnGeometryLocator; diff --git a/src/operation/overlayng/OverlayLabel.cpp b/src/operation/overlayng/OverlayLabel.cpp index bcdc810c73..0570878f1e 100644 --- a/src/operation/overlayng/OverlayLabel.cpp +++ b/src/operation/overlayng/OverlayLabel.cpp @@ -14,6 +14,7 @@ #include +using geos::geom::Location; namespace geos { // geos namespace operation { // geos.operation diff --git a/src/operation/overlayng/OverlayMixedPoints.cpp b/src/operation/overlayng/OverlayMixedPoints.cpp index 1285186a2d..62492d6b70 100644 --- a/src/operation/overlayng/OverlayMixedPoints.cpp +++ b/src/operation/overlayng/OverlayMixedPoints.cpp @@ -36,6 +36,8 @@ namespace operation { // geos.operation namespace overlayng { // geos.operation.overlayng using namespace geos::geom; +using geos::algorithm::locate::PointOnGeometryLocator; +using geos::algorithm::locate::IndexedPointInAreaLocator; /** * @brief Extracts and rounds coordinates from a geometry diff --git a/src/operation/overlayng/OverlayPoints.cpp b/src/operation/overlayng/OverlayPoints.cpp index 6afe7a2112..66fbfbb742 100644 --- a/src/operation/overlayng/OverlayPoints.cpp +++ b/src/operation/overlayng/OverlayPoints.cpp @@ -21,7 +21,7 @@ #include #include - +using namespace geos::geom; namespace geos { // geos namespace operation { // geos.operation diff --git a/src/operation/overlayng/PolygonBuilder.cpp b/src/operation/overlayng/PolygonBuilder.cpp index 80b8f5bc07..abdb4a0fb8 100644 --- a/src/operation/overlayng/PolygonBuilder.cpp +++ b/src/operation/overlayng/PolygonBuilder.cpp @@ -20,6 +20,7 @@ #include +using geos::geom::Polygon; namespace geos { // geos namespace operation { // geos.operation diff --git a/src/operation/overlayng/PrecisionReducer.cpp b/src/operation/overlayng/PrecisionReducer.cpp index 85dbebdf09..96a0a7a4f5 100644 --- a/src/operation/overlayng/PrecisionReducer.cpp +++ b/src/operation/overlayng/PrecisionReducer.cpp @@ -22,6 +22,9 @@ namespace geos { // geos namespace operation { // geos.operation namespace overlayng { // geos.operation.overlayng +using geos::geom::Geometry; +using geos::geom::GeometryFactory; + /*public static*/ std::unique_ptr PrecisionReducer::reducePrecision(const Geometry* geom, const PrecisionModel* pm, bool replacePrecisionModel) diff --git a/src/operation/overlayng/RingClipper.cpp b/src/operation/overlayng/RingClipper.cpp index 6a87d5f3e9..cf108dd1e0 100644 --- a/src/operation/overlayng/RingClipper.cpp +++ b/src/operation/overlayng/RingClipper.cpp @@ -14,6 +14,7 @@ #include +using geos::geom::CoordinateSequence; namespace geos { // geos namespace operation { // geos.operation diff --git a/src/operation/overlayng/RobustClipEnvelopeComputer.cpp b/src/operation/overlayng/RobustClipEnvelopeComputer.cpp index 2786701d6d..a2275bc8db 100644 --- a/src/operation/overlayng/RobustClipEnvelopeComputer.cpp +++ b/src/operation/overlayng/RobustClipEnvelopeComputer.cpp @@ -25,6 +25,7 @@ namespace geos { // geos namespace operation { // geos.operation namespace overlayng { // geos.operation.overlayng +using namespace geos::geom; RobustClipEnvelopeComputer::RobustClipEnvelopeComputer(const Envelope* p_targetEnv) : targetEnv(p_targetEnv) diff --git a/src/operation/relateng/RelateEdge.cpp b/src/operation/relateng/RelateEdge.cpp index 4670b058bd..821cd99051 100644 --- a/src/operation/relateng/RelateEdge.cpp +++ b/src/operation/relateng/RelateEdge.cpp @@ -28,6 +28,7 @@ using geos::algorithm::PolygonNodeTopology; using geos::geom::CoordinateXY; using geos::geom::Dimension; using geos::geom::Position; +using geos::geom::Location; using geos::io::WKTWriter; diff --git a/src/operation/relateng/RelateGeometry.cpp b/src/operation/relateng/RelateGeometry.cpp index 668968eff4..df00ad594f 100644 --- a/src/operation/relateng/RelateGeometry.cpp +++ b/src/operation/relateng/RelateGeometry.cpp @@ -43,6 +43,7 @@ using geos::geom::util::ComponentCoordinateExtracter; using geos::geom::util::GeometryLister; using geos::geom::util::PointExtracter; using geos::operation::valid::RepeatedPointRemover; +using geos::noding::SegmentString; namespace geos { // geos diff --git a/src/operation/relateng/RelateNode.cpp b/src/operation/relateng/RelateNode.cpp index 0ec3045a6b..626b971228 100644 --- a/src/operation/relateng/RelateNode.cpp +++ b/src/operation/relateng/RelateNode.cpp @@ -29,6 +29,7 @@ using geos::geom::Geometry; using geos::geom::Dimension; using geos::geom::Position; using geos::io::WKTWriter; +using geos::geom::Location; namespace geos { // geos diff --git a/src/operation/valid/IndexedNestedPolygonTester.cpp b/src/operation/valid/IndexedNestedPolygonTester.cpp index 3dbaa3f26a..65f452f2e5 100644 --- a/src/operation/valid/IndexedNestedPolygonTester.cpp +++ b/src/operation/valid/IndexedNestedPolygonTester.cpp @@ -32,6 +32,7 @@ namespace operation { // geos.operation namespace valid { // geos.operation.valid using namespace geos::geom; +using geos::algorithm::locate::IndexedPointInAreaLocator; /* public */ diff --git a/src/operation/valid/PolygonIntersectionAnalyzer.cpp b/src/operation/valid/PolygonIntersectionAnalyzer.cpp index d64a37c081..7f71f0f08d 100644 --- a/src/operation/valid/PolygonIntersectionAnalyzer.cpp +++ b/src/operation/valid/PolygonIntersectionAnalyzer.cpp @@ -21,14 +21,15 @@ #include #include -using geos::geom::Coordinate; -using geos::noding::SegmentString; - namespace geos { // geos namespace operation { // geos.operation namespace valid { // geos.operation.valid +using geos::geom::Coordinate; +using geos::geom::CoordinateXY; +using geos::noding::SegmentString; + /* public */ void PolygonIntersectionAnalyzer::processIntersections( diff --git a/src/simplify/LinkedRing.cpp b/src/simplify/LinkedRing.cpp index 51bc28e39d..4a3212ce51 100644 --- a/src/simplify/LinkedRing.cpp +++ b/src/simplify/LinkedRing.cpp @@ -19,6 +19,7 @@ using geos::geom::Coordinate; +using geos::geom::CoordinateSequence; namespace geos { diff --git a/src/triangulate/polygon/ConstrainedDelaunayTriangulator.cpp b/src/triangulate/polygon/ConstrainedDelaunayTriangulator.cpp index 5f56b12c2a..7baca31f35 100644 --- a/src/triangulate/polygon/ConstrainedDelaunayTriangulator.cpp +++ b/src/triangulate/polygon/ConstrainedDelaunayTriangulator.cpp @@ -22,6 +22,7 @@ #include #include +using namespace geos::geom; namespace geos { namespace triangulate { diff --git a/src/triangulate/polygon/PolygonEarClipper.cpp b/src/triangulate/polygon/PolygonEarClipper.cpp index 3bb54069c1..c493353ef0 100644 --- a/src/triangulate/polygon/PolygonEarClipper.cpp +++ b/src/triangulate/polygon/PolygonEarClipper.cpp @@ -24,6 +24,8 @@ #include #include +using geos::geom::Envelope; +using geos::geom::Polygon; using geos::algorithm::Orientation; using geos::algorithm::Angle; using geos::triangulate::tri::TriList; diff --git a/src/triangulate/polygon/PolygonHoleJoiner.cpp b/src/triangulate/polygon/PolygonHoleJoiner.cpp index 8b4c0e9082..239491672f 100644 --- a/src/triangulate/polygon/PolygonHoleJoiner.cpp +++ b/src/triangulate/polygon/PolygonHoleJoiner.cpp @@ -38,6 +38,8 @@ using geos::algorithm::Orientation; using geos::algorithm::PolygonNodeTopology; using geos::geom::Coordinate; using geos::geom::CoordinateSequence; +using geos::geom::LinearRing; +using geos::geom::Polygon; using geos::noding::BasicSegmentString; using geos::noding::SegmentString; using geos::noding::NodedSegmentString; diff --git a/src/triangulate/polygon/PolygonNoder.cpp b/src/triangulate/polygon/PolygonNoder.cpp index b949bd5ce8..8e6a70ad95 100644 --- a/src/triangulate/polygon/PolygonNoder.cpp +++ b/src/triangulate/polygon/PolygonNoder.cpp @@ -24,6 +24,7 @@ using geos::algorithm::LineIntersector; using geos::geom::Coordinate; +using geos::geom::CoordinateSequence; using geos::noding::SegmentString; using geos::noding::NodedSegmentString; using geos::noding::SegmentIntersector; diff --git a/src/triangulate/polygon/PolygonTriangulator.cpp b/src/triangulate/polygon/PolygonTriangulator.cpp index ad490ed0a7..1e1381f569 100644 --- a/src/triangulate/polygon/PolygonTriangulator.cpp +++ b/src/triangulate/polygon/PolygonTriangulator.cpp @@ -20,7 +20,7 @@ #include #include - +using geos::geom::Geometry; namespace geos { namespace triangulate { diff --git a/src/triangulate/tri/Tri.cpp b/src/triangulate/tri/Tri.cpp index 55dce92177..ecf82ab8d5 100644 --- a/src/triangulate/tri/Tri.cpp +++ b/src/triangulate/tri/Tri.cpp @@ -25,7 +25,7 @@ #include #include - +using namespace geos::geom; using geos::util::IllegalArgumentException; using geos::algorithm::Orientation; using geos::geom::Triangle; diff --git a/tests/unit/coverage/TPVWSimplifierTest.cpp b/tests/unit/coverage/TPVWSimplifierTest.cpp index 3c1143a6c2..de8d0beac5 100644 --- a/tests/unit/coverage/TPVWSimplifierTest.cpp +++ b/tests/unit/coverage/TPVWSimplifierTest.cpp @@ -7,6 +7,7 @@ // geos #include +using namespace geos::geom; using geos::coverage::TPVWSimplifier; namespace tut { diff --git a/tests/unit/index/VertexSequencePackedRtreeTest.cpp b/tests/unit/index/VertexSequencePackedRtreeTest.cpp index 554187f703..877666e8db 100644 --- a/tests/unit/index/VertexSequencePackedRtreeTest.cpp +++ b/tests/unit/index/VertexSequencePackedRtreeTest.cpp @@ -15,8 +15,8 @@ // std #include +using namespace geos::geom; using geos::index::VertexSequencePackedRtree; -using geos::geom::Point; namespace tut { // diff --git a/tests/unit/operation/relateng/RelateNGBoundaryNodeRuleTest.cpp b/tests/unit/operation/relateng/RelateNGBoundaryNodeRuleTest.cpp index 603b9e1e2c..2c3d3ca147 100644 --- a/tests/unit/operation/relateng/RelateNGBoundaryNodeRuleTest.cpp +++ b/tests/unit/operation/relateng/RelateNGBoundaryNodeRuleTest.cpp @@ -18,6 +18,7 @@ using namespace geos::geom; using namespace geos::operation::relateng; +using geos::algorithm::BoundaryNodeRule; using geos::io::WKTReader; using geos::io::WKTWriter;