1 /********************************************************************** 2 * 3 * GEOS - Geometry Engine Open Source 4 * http://geos.osgeo.org 5 * 6 * Copyright (C) 2001-2002 Vivid Solutions Inc. 7 * Copyright (C) 2005-2006 Refractions Research Inc. 8 * Copyright (C) 2019 Nicklas Larsson 9 * 10 * This is free software; you can redistribute and/or modify it under 11 * the terms of the GNU Lesser General Public Licence as published 12 * by the Free Software Foundation. 13 * See the COPYING file for more information. 14 * 15 **********************************************************************/ 16 17 #ifndef GEOS_NAMESPACES_H 18 #define GEOS_NAMESPACES_H 19 20 namespace geos { 21 22 /// \brief 23 /// Contains classes and interfaces implementing fundamental computational 24 /// geometry algorithms. 25 /// 26 /// ### Robustness 27 /// 28 /// Geometrical algorithms involve a combination of combinatorial and numerical 29 /// computation. As with all numerical computation using finite-precision 30 /// numbers, the algorithms chosen are susceptible to problems of robustness. 31 /// A robustness problem occurs when a numerical calculation produces an 32 /// incorrect answer for some inputs due to round-off errors. Robustness 33 /// problems are especially serious in geometric computation, since they can 34 /// result in errors during topology building. 35 /// 36 /// There are many approaches to dealing with the problem of robustness in 37 /// geometrical computation. Not surprisingly, most robust algorithms are 38 /// substantially more complex and less performant than the non-robust 39 /// versions. Fortunately, JTS is sensitive to robustness problems in only a 40 /// few key functions (such as line intersection and the point-in-polygon 41 /// test). There are efficient robust algorithms available for these 42 /// functions, and these algorithms are implemented in JTS. 43 /// 44 /// ### Computational Performance 45 /// 46 /// Runtime performance is an important consideration for a production-quality 47 /// implementation of geometric algorithms. The most computationally intensive 48 /// algorithm used in JTS is intersection detection. JTS methods need to 49 /// determine both all intersection between the line segments in a single 50 /// Geometry (self-intersection) and all intersections between the line 51 /// segments of two different Geometries. 52 /// 53 /// The obvious naive algorithm for intersection detection (comparing every 54 /// segment with every other) has unacceptably slow performance. There is a 55 /// large literature of faster algorithms for intersection detection. 56 /// Unfortunately, many of them involve substantial code complexity. JTS tries 57 /// to balance code simplicity with performance gains. It uses some simple 58 /// techniques to produce substantial performance gains for common types of 59 /// input data. 60 /// 61 /// ### Package Specification 62 /// 63 /// - Java Topology Suite Technical Specifications 64 /// - <A HREF="http://www.opengis.org/techno/specs.htm"> 65 /// OpenGIS Simple Features Specification for SQL</A> 66 namespace algorithm { // geos::algorithm 67 68 /// Classes to compute distance metrics between geometries. 69 namespace distance {} 70 71 /// Classes which determine the Location of points in geometries. 72 namespace locate {} 73 } // namespace geos::algorithm 74 75 namespace geom { // geos.geom 76 77 /// \brief 78 /// Contains classes and interfaces implementing algorithms that optimize 79 /// the performance of repeated calls to specific geometric operations. 80 namespace prep {} 81 82 /// \brief 83 /// Provides classes that parse and modify Geometry objects. 84 namespace util {} 85 } // namespace geos.geom 86 87 /// \brief 88 /// Contains classes that implement topology graphs. 89 /// 90 /// The Java Topology Suite (JTS) is a Java API that implements a core set of 91 /// spatial data operations using an explicit precision model and robust 92 /// geometric algorithms. JTS is int ended to be used in the development of 93 /// applications that support the validation, cleaning, integration and 94 /// querying of spatial datasets. 95 /// 96 /// JTS attempts to implement the OpenGIS Simple Features Specification (SFS) 97 /// as accurately as possible. In some cases the SFS is unclear or omits a 98 /// specification; in this case JTS attempts to choose a reasonable and 99 /// consistent alternative. Differences from and elaborations of the SFS are 100 /// documented in this specification. 101 /// 102 /// ### Package Specification 103 /// 104 /// - Java Topology Suite Technical Specifications 105 /// - <A HREF="http://www.opengis.org/techno/specs.htm"> 106 /// OpenGIS Simple Features Specification for SQL</A> 107 namespace geomgraph { // geos.geomgraph 108 109 /// \brief 110 /// Contains classes that implement indexes for performing noding on 111 /// geometry graph edges. 112 namespace index {} 113 } // namespace geos.geomgraph 114 115 116 /// Provides classes for various kinds of spatial indexes. 117 namespace index { // geos.index 118 119 /// Contains classes that implement a Binary Interval Tree index 120 namespace bintree {} 121 122 /// Contains classes that implement Monotone Chains 123 namespace chain {} 124 125 /// \brief Contains classes that implement a static index on a set of 126 /// 1-dimensional intervals, using an R-Tree packed based on the order of 127 /// the interval midpoints. 128 namespace intervalrtree {} 129 130 /// Contains classes that implement a Quadtree spatial index 131 namespace quadtree {} 132 133 /// \brief Contains 2-D and 1-D versions of the Sort-Tile-Recursive (STR) 134 /// tree, a query-only R-tree. 135 namespace strtree {} 136 137 /// \brief Contains classes which implement a sweepline algorithm for 138 /// scanning geometric data structures. 139 namespace sweepline {} 140 } // namespace geos.index 141 142 /// \brief 143 /// Contains the interfaces for converting JTS objects to and from other 144 /// formats. 145 /// 146 /// The Java Topology Suite (JTS) is a Java API that implements a core set of 147 /// spatial data operations usin g an explicit precision model and robust 148 /// geometric algorithms. JTS is intended to be used in the devel opment of 149 /// applications that support the validation, cleaning, integration and 150 /// querying of spatial data sets. 151 /// 152 /// JTS attempts to implement the OpenGIS Simple Features Specification (SFS) 153 /// as accurately as possible. In some cases the SFS is unclear or omits a 154 /// specification; in this case JTS attempts to choose a reasonable and 155 /// consistent alternative. Differences from and elaborations of the SFS are 156 /// documented in this specification. 157 /// 158 /// ### Package Specification 159 /// 160 /// - Java Topology Suite Technical Specifications 161 /// - <A HREF="http://www.opengis.org/techno/specs.htm"> 162 /// OpenGIS Simple Features Specification for SQL</A> 163 /// 164 namespace io {} 165 166 /// \brief Contains classes and interfaces implementing linear referencing on 167 /// linear geometries. 168 namespace linearref {} 169 170 /// \brief Classes to compute nodings for arrangements of line segments and 171 /// line segment sequences. 172 namespace noding { // geos.noding 173 174 /// \brief Contains classes to implement the Snap Rounding algorithm for 175 /// noding linestrings. 176 namespace snapround {} 177 } // namespace geos.noding 178 179 /// Provides classes for implementing operations on geometries. 180 namespace operation { // geos.operation 181 182 /// Provides classes for computing buffers of geometries 183 namespace buffer {} 184 185 /// Provides classes for computing the distance between geometries. 186 namespace distance {} 187 188 /// \brief Provides classes for computing the intersection of a Geometry 189 /// and a clipping Rectangle. 190 namespace intersection {} 191 192 /// Line merging package. 193 namespace linemerge {} 194 195 /// \brief 196 /// Contains classes that perform a topological overlay to compute boolean 197 /// spatial functions. 198 /// 199 /// The Overlay Algorithm is used in spatial analysis methods for computing 200 /// set-theoretic operations (boolean combinations) of input 201 /// [Geometrys](\ref geom::Geometry). 202 /// The algorithm for computing the overlay uses the intersection operations 203 /// supported by topology graphs. To compute an overlay it is necessary to 204 /// explicitly compute the resultant graph formed by the computed 205 /// intersections. 206 /// 207 /// The algorithm to compute a set-theoretic spatial analysis method has the 208 /// following steps: 209 /// 210 /// - Build topology graphs of the two input geometries. For each geometry 211 /// all self-intersection nodes are computed and added to the graph. 212 /// - Compute nodes for all intersections between edges and nodes of the 213 /// graphs. 214 /// - Compute the labeling for the computed nodes by merging the labels from 215 /// the input graphs. 216 /// - Compute new edges between the compute intersection nodes. 217 /// Label the edges appropriately. 218 /// - Build the resultant graph from the new nodes and edges. 219 /// - Compute the labeling for isolated components of the graph. Add the 220 /// isolated components to the resultant graph. 221 /// - Compute the result of the boolean combination by selecting the node 222 /// and edges with the appropriate labels. Polygonize areas and sew linear 223 /// geometries together. 224 /// 225 /// ### Package Specification 226 /// 227 /// - Java Topology Suite Technical Specifications 228 /// - <A HREF="http://www.opengis.org/techno/specs.htm"> 229 /// OpenGIS Simple Features Specification for SQL</A> 230 namespace overlay {} 231 232 /// An API for polygonizing sets of lines. 233 namespace polygonize {} 234 235 /// \brief Classes which implement topological predicates optimized for 236 /// particular kinds of geometries. 237 namespace predicate {} 238 239 /// \brief Contains classes to implement the computation of the spatial 240 /// relationships of `Geometry`s. 241 /// 242 /// The `relate` algorithm computes the `IntersectionMatrix` describing the 243 /// relationship of two `Geometry`s. The algorithm for computing `relate` 244 /// uses the intersection operations supported by topology graphs. Although 245 /// the `relate` result depends on the resultant graph formed by the 246 /// computed intersections, there is no need to explicitly compute the 247 /// entire graph. It is sufficient to compute the local structure of the 248 /// graph at each intersection node. 249 /// 250 /// The algorithm to compute `relate` has the following steps: 251 /// 252 /// - Build topology graphs of the two input geometries. For each geometry 253 /// all self-intersection nodes are computed and added to the graph. 254 /// - Compute nodes for all intersections between edges and nodes of the 255 /// graphs. 256 /// - Compute the labeling for the computed nodes by merging the labels 257 /// from the input graphs. 258 /// - Compute the labeling for isolated components of the graph (see below) 259 /// - Compute the `IntersectionMatrix` from the labels on the nodes and 260 /// edges. 261 /// 262 /// ### Labeling isolated components 263 /// 264 /// Isolated components are components (edges or nodes) of an input 265 /// `Geometry` which do not contain any intersections with the other input 266 /// `Geometry`. The topological relationship of these components to the 267 /// other input `Geometry` must be computed in order to determine the 268 /// complete labeling of the component. This can be done by testing whether 269 /// the component lies in the interior or exterior of the other `Geometry`. 270 /// If the other `Geometry` is 1-dimensional, the isolated component must 271 /// lie in the exterior (since otherwise it would have an intersection with 272 /// an edge of the `Geometry`). If the other `Geometry` is 2-dimensional, 273 /// a Point-In-Polygon test can be used to determine whether the isolated 274 /// component is in the interior or exterior. 275 /// 276 /// ### Package Specification 277 /// 278 /// - Java Topology Suite Technical Specifications 279 /// - <A HREF="http://www.opengis.org/techno/specs.htm"> 280 /// OpenGIS Simple Features Specification for SQL</A> 281 namespace relate {} 282 283 /// Find shared paths among two linear Geometry objects. 284 namespace sharedpaths {} 285 286 /// Classes to perform efficient unioning of collections of geometries. 287 namespace geounion {} 288 289 /// Provides classes for testing the validity of geometries. 290 namespace valid {} 291 } // namespace geos.operation 292 293 /// Contains classes to implement a planar graph data structure. 294 namespace planargraph { // geos::planargraph 295 296 /// Planargraph algorithms. 297 namespace algorithm {} 298 } // namespace geos::planargraph 299 300 /// Provides classes for manipulating the precision model of Geometries. 301 namespace precision {} 302 303 /// Classes which implement algorithms for simplifying or generalizing geometries. 304 namespace simplify {} 305 306 /// Classes to compute Delaunay triangulations. 307 namespace triangulate { // geos.triangulate 308 309 /// \brief Classes to implement a topological subdivision of quadeges, to 310 /// support creating triangulations and Voronoi diagrams. 311 namespace quadedge {} 312 } // namespace geos.triangulate 313 314 /// Utility classes for GEOS. 315 namespace util {} 316 317 } // namespace geos 318 319 #endif // GEOS_NAMESPACES_H 320