22#ifndef GEOS_NODING_NODEDSEGMENTSTRING_H
23#define GEOS_NODING_NODEDSEGMENTSTRING_H
25#include <geos/export.h>
26#include <geos/noding/NodableSegmentString.h>
27#include <geos/geom/CoordinateSequence.h>
28#include <geos/algorithm/LineIntersector.h>
29#include <geos/noding/SegmentNode.h>
30#include <geos/noding/SegmentNodeList.h>
31#include <geos/noding/SegmentString.h>
33#include <geos/geom/Coordinate.h>
39#pragma warning(disable: 4251 4355)
63 static void getNodedSubstrings(II from, II too_far,
64 SegmentString::NonConstVect* resultEdgelist)
66 for (II i=from; i != too_far; ++i)
75 static void getNodedSubstrings(C *segStrings,
76 SegmentString::NonConstVect* resultEdgelist)
78 getNodedSubstrings(segStrings->begin(), segStrings->end(), resultEdgelist);
81 static void getNodedSubstrings(
const SegmentString::NonConstVect& segStrings,
82 SegmentString::NonConstVect* resultEdgeList);
86 const SegmentString::NonConstVect& segStrings);
99 : NodableSegmentString(newContext)
120 std::size_t normalizedSegmentIndex = segmentIndex;
123 std::size_t nextSegIndex = normalizedSegmentIndex + 1;
124 if (nextSegIndex < size())
127 getCoordinate(
static_cast<unsigned int>(nextSegIndex));
131 if ( intPt->equals2D( nextPt ))
133 normalizedSegmentIndex = nextSegIndex;
138 SegmentNode * ei = getNodeList().add( *intPt, normalizedSegmentIndex);
146 virtual unsigned int size()
const
148 return static_cast<unsigned int>(pts->size());
155 virtual bool isClosed()
const;
157 virtual std::ostream& print(std::ostream& os)
const;
175 unsigned int segmentIndex,
int geomIndex);
185 unsigned int segmentIndex,
186 int geomIndex,
int intIndex);
196 unsigned int segmentIndex);
A LineIntersector is an algorithm that can both test whether two line segments intersect and compute ...
Definition LineIntersector.h:49
The internal representation of a list of coordinates inside a Geometry.
Definition CoordinateSequence.h:59
Coordinate is the lightweight class used to store coordinates.
Definition Coordinate.h:60
Represents a list of contiguous line segments, and supports noding the segments.
Definition NodedSegmentString.h:58
void addIntersection(const geom::Coordinate &intPt, unsigned int segmentIndex)
Add an SegmentNode for intersection intIndex.
static SegmentString::NonConstVect * getNodedSubstrings(const SegmentString::NonConstVect &segStrings)
Returns allocated object.
void addIntersection(algorithm::LineIntersector *li, unsigned int segmentIndex, int geomIndex, int intIndex)
Add an SegmentNode for intersection intIndex.
SegmentNode * addIntersectionNode(geom::Coordinate *intPt, std::size_t segmentIndex)
Definition NodedSegmentString.h:118
int getSegmentOctant(unsigned int index) const
Gets the octant of the segment starting at vertex index.
void addIntersections(algorithm::LineIntersector *li, unsigned int segmentIndex, int geomIndex)
Add {SegmentNode}s for one or both intersections found for a segment of an edge to the edge intersect...
NodedSegmentString(geom::CoordinateSequence *newPts, const void *newContext)
Definition NodedSegmentString.h:98
virtual geom::CoordinateSequence * getCoordinates() const
Return a pointer to the CoordinateSequence associated with this SegmentString.
A list of the SegmentNode present along a NodedSegmentString.
Definition SegmentNodeList.h:56
void addSplitEdges(std::vector< SegmentString * > &edgeList)
Represents an intersection point between two NodedSegmentString.
Definition SegmentNode.h:45
Provides classes for various kinds of spatial indexes.
Definition IndexedNestedRingTester.h:31
Classes to compute nodings for arrangements of line segments and line segment sequences.
Definition PreparedLineString.h:27
Basic namespace for all GEOS functionalities.
Definition IndexedNestedRingTester.h:25