19 #ifndef GEOS_OPERATION_DISTANCE_FACETSEQUENCETREEBUILDER_H
20 #define GEOS_OPERATION_DISTANCE_FACETSEQUENCETREEBUILDER_H
22 #include <geos/index/ItemVisitor.h>
23 #include <geos/index/strtree/STRtree.h>
24 #include <geos/geom/Geometry.h>
25 #include <geos/geom/CoordinateSequence.h>
26 #include <geos/operation/distance/FacetSequence.h>
31 class GEOS_DLL FacetSequenceTreeBuilder {
34 static const int FACET_SEQUENCE_SIZE = 6;
37 static const int STR_TREE_NODE_CAPACITY = 4;
39 static void addFacetSequences(
const geom::Geometry* geom,
40 const geom::CoordinateSequence* pts,
41 std::vector<FacetSequence> & sections);
42 static std::vector<FacetSequence> computeFacetSequences(
const geom::Geometry* g);
46 FacetSequenceTree(std::vector<FacetSequence> &&seq) : STRtree(STR_TREE_NODE_CAPACITY), sequences(seq) {
47 for (
auto& fs : sequences) {
48 STRtree::insert(fs.getEnvelope(), &fs);
53 std::vector<FacetSequence> sequences;
63 static std::unique_ptr<geos::index::strtree::STRtree> build(
const geom::Geometry* g);
A query-only R-tree created using the Sort-Tile-Recursive (STR) algorithm. For two-dimensional spatia...
Definition: STRtree.h:64
Basic namespace for all GEOS functionalities.
Definition: IndexedNestedRingTester.h:26