21#include <geos/index/ItemVisitor.h>
22#include <geos/index/strtree/TemplateSTRtree.h>
23#include <geos/geom/Geometry.h>
24#include <geos/geom/CoordinateSequence.h>
25#include <geos/operation/distance/FacetSequence.h>
30class GEOS_DLL FacetSequenceTreeBuilder {
33 static const std::size_t FACET_SEQUENCE_SIZE = 6;
36 static const std::size_t STR_TREE_NODE_CAPACITY = 4;
38 static void addFacetSequences(
const geom::Geometry* geom,
39 const geom::CoordinateSequence* pts,
40 std::vector<FacetSequence> & sections);
41 static std::vector<FacetSequence> computeFacetSequences(
const geom::Geometry* g);
43 class FacetSequenceTree :
public geos::index::strtree::TemplateSTRtree<const FacetSequence*> {
46 FacetSequenceTree(std::vector<FacetSequence> &&seq) :
47 TemplateSTRtree(STR_TREE_NODE_CAPACITY, seq.size()), sequences(seq) {
48 for (
auto& fs : sequences) {
49 TemplateSTRtree::insert(fs.getEnvelope(), &fs);
54 std::vector<FacetSequence> sequences;
64 static std::unique_ptr<geos::index::strtree::TemplateSTRtree<const FacetSequence*>> build(
const geom::Geometry* g);
Basic namespace for all GEOS functionalities.
Definition geos.h:39