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_SINGLEPASSNODER_H
16 #define GEOS_NODING_SINGLEPASSNODER_H
18 #include <geos/export.h>
22 #include <geos/inline.h>
24 #include <geos/noding/Noder.h>
26 // Forward declarations
30 class SegmentIntersector
;
35 namespace noding
{ // geos.noding
39 * Base class for {@link Noder}s which make a single
40 * pass to find intersections.
41 * This allows using a custom {@link SegmentIntersector}
42 * (which for instance may simply identify intersections, rather than
45 * Last port: noding/SinglePassNoder.java rev. 1.3 (JTS-1.7)
47 * TODO: Noder inheritance (that's just an interface!)
50 class GEOS_DLL SinglePassNoder
: public Noder
{ // implements Noder
55 SegmentIntersector
* segInt
;
59 SinglePassNoder(SegmentIntersector
* nSegInt
=NULL
): segInt(nSegInt
) {}
61 virtual ~SinglePassNoder() {}
64 * Sets the SegmentIntersector to use with this noder.
65 * A SegmentIntersector will normally add intersection nodes
66 * to the input segment strings, but it may not - it may
67 * simply record the presence of intersections.
68 * However, some Noders may require that intersections be added.
72 virtual void setSegmentIntersector(SegmentIntersector
* newSegInt
) {
77 * Computes the noding for a collection of {@link SegmentString}s.
79 * @param segStrings a collection of {@link SegmentString}s to node
81 virtual void computeNodes(std::vector
<SegmentString
*>* segStrings
)=0;
84 * Returns a {@link Collection} of fully noded {@link SegmentStrings}.
85 * The SegmentStrings have the same context as their parent.
87 * @return a Collection of SegmentStrings
89 virtual std::vector
<SegmentString
*>* getNodedSubstrings() const=0;
93 } // namespace geos.noding
97 //# include "geos/noding/SinglePassNoder.inl"
100 #endif // GEOS_NODING_SINGLEPASSNODER_H
102 /**********************************************************************
104 * Revision 1.2 2006/03/24 09:52:41 strk
105 * USE_INLINE => GEOS_INLINE
107 * Revision 1.1 2006/03/09 16:46:49 strk
108 * geos::geom namespace definition, first pass at headers split
110 **********************************************************************/