Complete Note#1 in the http://wiki.osgeo.org/wiki/GEOS_Provenance_Review to get out...
[geos.git] / include / geos / noding / Noder.h
blobf8c18ada658534d8d84d69d976f943661682f2a6
1 /**********************************************************************
3 * GEOS - Geometry Engine Open Source
4 * http://geos.osgeo.org
6 * Copyright (C) 2006 Refractions Research Inc.
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.
13 **********************************************************************/
15 #ifndef GEOS_NODING_NODER_H
16 #define GEOS_NODING_NODER_H
18 #include <geos/export.h>
20 #include <vector>
21 #include <iostream>
23 #include <geos/inline.h>
25 // Forward declarations
26 namespace geos {
27 namespace noding {
28 class SegmentString;
32 namespace geos {
33 namespace noding { // geos.noding
36 /** \brief
37 * Computes all intersections between segments in a set of SegmentString.
39 * Intersections found are represented as {@link SegmentNode}s and added to the
40 * {@link SegmentString}s in which they occur.
41 * As a final step in the noding a new set of segment strings split
42 * at the nodes may be returned.
44 * Last port: noding/Noder.java rev. 1.8 (JTS-1.7)
46 * TODO: this was really an interface, we should avoid making it a Base class
49 class GEOS_DLL Noder {
50 public:
51 /** \brief
52 * Computes the noding for a collection of {@link SegmentString}s.
54 * Some Noders may add all these nodes to the input SegmentStrings;
55 * others may only add some or none at all.
57 * @param segStrings a collection of {@link SegmentString}s to node
59 virtual void computeNodes(std::vector<SegmentString*>* segStrings)=0;
61 /** \brief
62 * Returns a {@link Collection} of fully noded {@link SegmentStrings}.
63 * The SegmentStrings have the same context as their parent.
65 * @return a newly allocated std::vector of const SegmentStrings.
66 * Caller is responsible to delete container and elements.
68 virtual std::vector<SegmentString*>* getNodedSubstrings() const=0;
70 virtual ~Noder() {}
72 protected:
73 Noder(){}
76 } // namespace geos.noding
77 } // namespace geos
79 //#ifdef GEOS_INLINE
80 //# include "geos/noding/Noder.inl"
81 //#endif
83 #endif // GEOS_NODING_NODER_H