GEOS  3.6.1
FacetSequenceTreeBuilder.h
1 /**********************************************************************
2  *
3  * GEOS - Geometry Engine Open Source
4  * http://geos.osgeo.org
5  *
6  * Copyright (C) 2016 Daniel Baston
7  *
8  * This is free software; you can redistribute and/or modify it under
9  * the terms of the GNU Lesser General Public Licence as published
10  * by the Free Software Foundation.
11  * See the COPYING file for more information.
12  *
13  **********************************************************************
14  *
15  * Last port: operation/distance/FacetSequenceTreeBuilder.java (f6187ee2 JTS-1.14)
16  *
17  **********************************************************************/
18 
19 #ifndef GEOS_OPERATION_DISTANCE_FACETSEQUENCETREEBUILDER_H
20 #define GEOS_OPERATION_DISTANCE_FACETSEQUENCETREEBUILDER_H
21 
22 #include <geos/index/strtree/STRtree.h>
23 #include <geos/geom/Geometry.h>
24 #include <geos/geom/CoordinateSequence.h>
25 #include <geos/operation/distance/FacetSequence.h>
26 
27 using namespace geos::geom;
28 using namespace geos::index::strtree;
29 using namespace geos::operation::distance;
30 
31 namespace geos {
32  namespace operation {
33  namespace distance {
34  class FacetSequenceTreeBuilder {
35  private:
36  // 6 seems to be a good facet sequence size
37  static const int FACET_SEQUENCE_SIZE = 6;
38 
39  // Seems to be better to use a minimum node capacity
40  static const int STR_TREE_NODE_CAPACITY = 4;
41 
42  static void addFacetSequences(const CoordinateSequence* pts, std::vector<FacetSequence*> & sections);
43  static std::vector<FacetSequence*> * computeFacetSequences(const Geometry* g);
44 
45  public:
46  static STRtree* build(const Geometry* g);
47  };
48  }
49  }
50 }
51 
52 #endif //GEOS_FACETSEQUENCETREEBUILDER_H
Contains the Geometry interface hierarchy and supporting classes.
Definition: IndexedNestedRingTester.h:26
A query-only R-tree created using the Sort-Tile-Recursive (STR) algorithm. For two-dimensional spatia...
Definition: STRtree.h:64
Basic implementation of Geometry, constructed and destructed by GeometryFactory.
Definition: Geometry.h:167
Provides classes for computing the distance between geometries.
Definition: opDistance.h:23
Basic namespace for all GEOS functionalities.
Definition: IndexedNestedRingTester.h:25
The internal representation of a list of coordinates inside a Geometry.
Definition: CoordinateSequence.h:59
Contains 2-D and 1-D versions of the Sort-Tile-Recursive (STR) tree, a query-only R-tree...
Definition: SIRtreePointInRing.h:32