HoleAssigner.h
/**********************************************************************
*
* GEOS - Geometry Engine Open Source
* http://geos.osgeo.org
*
* Copyright (C) 2019 Daniel Baston <dbaston@gmail.com>
*
* 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.
*
**********************************************************************
*
* Last port: operation/polygonize/HoleAssigner.java 0b3c7e3eb0d3e
*
**********************************************************************/
#pragma once
#include <geos/operation/polygonize/EdgeRing.h>
#include <geos/index/strtree/TemplateSTRtree.h>
#include <vector>
namespace geos {
namespace operation {
namespace polygonize {
class GEOS_DLL HoleAssigner {
public:
static void assignHolesToShells(std::vector<EdgeRing*> & holes, std::vector<EdgeRing*> & shells);
private:
explicit HoleAssigner(std::vector<EdgeRing*> & shells) : m_shells(shells) {
buildIndex();
}
void assignHolesToShells(std::vector<EdgeRing*> & holes);
void assignHoleToShell(EdgeRing* holeER);
std::vector<EdgeRing*> findShells(const geom::Envelope & ringEnv);
EdgeRing* findEdgeRingContaining(EdgeRing* testER);
void buildIndex();
std::vector<EdgeRing*>& m_shells;
geos::index::strtree::TemplateSTRtree<EdgeRing*> m_shellIndex;
};
}
}
}
geos::geom::Envelope
An Envelope defines a rectangulare region of the 2D coordinate plane.
Definition Envelope.h:59
geos::operation::polygonize::EdgeRing
Represents a ring of PolygonizeDirectedEdge which form a ring of a polygon. The ring may be either an...
Definition operation/polygonize/EdgeRing.h:59
geos::operation::polygonize::HoleAssigner::assignHolesToShells
static void assignHolesToShells(std::vector< EdgeRing * > &holes, std::vector< EdgeRing * > &shells)
geos::operation::polygonize
An API for polygonizing sets of lines.
Definition namespaces.h:232
geos::operation
Provides classes for implementing operations on geometries.
Definition CleanCoverage.h:34
geos
Basic namespace for all GEOS functionalities.
Definition geos.h:38