CoverageGapFinder.h
/**********************************************************************
*
* GEOS - Geometry Engine Open Source
* http://geos.osgeo.org
*
* Copyright (C) 2022 Paul Ramsey <pramsey@cleverelephant.ca>
*
* This is free software; you can redistribute and/or modify it under
* the terms of the GNU Lesser General Public Licence as published
* by the Free Software Foundation.
* See the COPYING file for more information.
*
**********************************************************************/
#pragma once
#include <geos/export.h>
#include <vector>
#include <memory>
// Forward declarations
namespace geos {
namespace geom {
class Geometry;
class LinearRing;
}
}
namespace geos { // geos
namespace coverage { // geos::coverage
class GEOS_DLL CoverageGapFinder {
using Geometry = geos::geom::Geometry;
using LinearRing = geos::geom::LinearRing;
private:
std::vector<const Geometry*>& m_coverage;
bool isGap(const LinearRing* hole, double gapWidth);
public:
CoverageGapFinder(std::vector<const Geometry*>& coverage)
: m_coverage(coverage)
{};
static std::unique_ptr<Geometry> findGaps(
std::vector<const Geometry*>& coverage,
double gapWidth);
std::unique_ptr<Geometry> findGaps(double gapWidth);
};
} // namespace geos::coverage
} // namespace geos
geos::coverage::CoverageGapFinder::findGaps
std::unique_ptr< Geometry > findGaps(double gapWidth)
geos::coverage::CoverageGapFinder::findGaps
static std::unique_ptr< Geometry > findGaps(std::vector< const Geometry * > &coverage, double gapWidth)
geos::coverage::CoverageGapFinder::CoverageGapFinder
CoverageGapFinder(std::vector< const Geometry * > &coverage)
Definition CoverageGapFinder.h:68
geos::geom::Geometry
Basic implementation of Geometry, constructed and destructed by GeometryFactory.
Definition Geometry.h:196
geos::geom::LinearRing
Models an OGC SFS LinearRing. A LinearRing is a LineString which is both closed and simple.
Definition LinearRing.h:54
geos::geom
Definition Angle.h:26
geos
Basic namespace for all GEOS functionalities.
Definition geos.h:38