Complete Note#1 in the http://wiki.osgeo.org/wiki/GEOS_Provenance_Review to get out...
[geos.git] / include / geos / opRelate.h
blob22e4d46c8e0bb37c81cbb78b1e1c6eda7e262a68
1 /**********************************************************************
3 * GEOS - Geometry Engine Open Source
4 * http://geos.osgeo.org
6 * Copyright (C) 2001-2002 Vivid Solutions Inc.
7 * Copyright (C) 2005 Refractions Research Inc.
9 * This is free software; you can redistribute and/or modify it under
10 * the terms of the GNU Lesser General Public Licence as published
11 * by the Free Software Foundation.
12 * See the COPYING file for more information.
14 **********************************************************************/
16 #ifndef GEOS_OPRELATE_H
17 #define GEOS_OPRELATE_H
19 namespace geos {
20 namespace operation { // geos::operation
23 /** \brief
24 * Contains classes to implement the computation of the spatial relationships of <CODE>Geometry</CODE>s.
26 * The <code>relate</code> algorithm computes the <code>IntersectionMatrix</code> describing the
27 * relationship of two <code>Geometry</code>s. The algorithm for computing <code>relate</code>
28 * uses the intersection operations supported by topology graphs. Although the <code>relate</code>
29 * result depends on the resultant graph formed by the computed intersections, there is
30 * no need to explicitly compute the entire graph.
31 * It is sufficient to compute the local structure of the graph
32 * at each intersection node.
33 * <P>
34 * The algorithm to compute <code>relate</code> has the following steps:
35 * <UL>
36 * <LI>Build topology graphs of the two input geometries. For each geometry
37 * all self-intersection nodes are computed and added to the graph.
38 * <LI>Compute nodes for all intersections between edges and nodes of the graphs.
39 * <LI>Compute the labeling for the computed nodes by merging the labels from the input graphs.
40 * <LI>Compute the labeling for isolated components of the graph (see below)
41 * <LI>Compute the <code>IntersectionMatrix</code> from the labels on the nodes and edges.
42 * </UL>
44 * <H3>Labeling isolated components</H3>
46 * Isolated components are components (edges or nodes) of an input <code>Geometry</code> which
47 * do not contain any intersections with the other input <code>Geometry</code>. The
48 * topological relationship of these components to the other input <code>Geometry</code>
49 * must be computed in order to determine the complete labeling of the component. This can
50 * be done by testing whether the component lies in the interior or exterior of the other
51 * <code>Geometry</code>. If the other <code>Geometry</code> is 1-dimensional, the isolated
52 * component must lie in the exterior (since otherwise it would have an intersection with an
53 * edge of the <code>Geometry</code>). If the other <code>Geometry</code> is 2-dimensional,
54 * a Point-In-Polygon test can be used to determine whether the isolated component is in the
55 * interior or exterior.
57 * <h2>Package Specification</h2>
59 * <ul>
60 * <li>Java Topology Suite Technical Specifications
61 * <li><A HREF="http://www.opengis.org/techno/specs.htm">
62 * OpenGIS Simple Features Specification for SQL</A>
63 * </ul>
66 namespace relate { // geos.operation.relate
68 } // namespace geos:operation:relate
69 } // namespace geos:operation
70 } // namespace geos
73 //#include <geos/operation/relate/EdgeEndBuilder.h>
74 //#include <geos/operation/relate/EdgeEndBundle.h>
75 //#include <geos/operation/relate/EdgeEndBundleStar.h>
76 #include <geos/operation/relate/RelateComputer.h>
77 //#include <geos/operation/relate/RelateNode.h>
78 //#include <geos/operation/relate/RelateNodeFactory.h>
79 //#include <geos/operation/relate/RelateNodeGraph.h>
80 #include <geos/operation/relate/RelateOp.h>
82 #endif