00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020 #ifndef GEOS_OP_BUFFER_OFFSETCURVESETBUILDER_H
00021 #define GEOS_OP_BUFFER_OFFSETCURVESETBUILDER_H
00022
00023 #include <geos/export.h>
00024
00025 #include <vector>
00026
00027
00028 namespace geos {
00029 namespace geom {
00030 class Geometry;
00031 class CoordinateSequence;
00032 class GeometryCollection;
00033 class Point;
00034 class LineString;
00035 class Polygon;
00036 }
00037 namespace geomgraph {
00038 class Label;
00039 }
00040 namespace noding {
00041 class SegmentString;
00042 }
00043 namespace operation {
00044 namespace buffer {
00045 class OffsetCurveBuilder;
00046 }
00047 }
00048 }
00049
00050 namespace geos {
00051 namespace operation {
00052 namespace buffer {
00053
00064 class GEOS_DLL OffsetCurveSetBuilder {
00065
00066 private:
00067
00068
00069
00070 std::vector<geomgraph::Label*> newLabels;
00071
00072 const geom::Geometry& inputGeom;
00073
00074 double distance;
00075
00076 OffsetCurveBuilder& curveBuilder;
00077
00081 std::vector<noding::SegmentString*> curveList;
00082
00095 void addCurve(geom::CoordinateSequence *coord, int leftLoc,
00096 int rightLoc);
00097
00098 void add(const geom::Geometry& g);
00099
00100 void addCollection(const geom::GeometryCollection *gc);
00101
00105 void addPoint(const geom::Point *p);
00106
00107 void addLineString(const geom::LineString *line);
00108
00109 void addPolygon(const geom::Polygon *p);
00110
00129 void addPolygonRing(const geom::CoordinateSequence *coord,
00130 double offsetDistance, int side, int cwLeftLoc,
00131 int cwRightLoc);
00132
00142 bool isErodedCompletely(geom::CoordinateSequence *ringCoord,
00143 double bufferDistance);
00144
00163 bool isTriangleErodedCompletely(geom::CoordinateSequence *triangleCoord,
00164 double bufferDistance);
00165
00166
00167 OffsetCurveSetBuilder(const OffsetCurveSetBuilder& other);
00168 OffsetCurveSetBuilder& operator=(const OffsetCurveSetBuilder& rhs);
00169
00170 public:
00171
00173 OffsetCurveSetBuilder(const geom::Geometry& newInputGeom,
00174 double newDistance, OffsetCurveBuilder& newCurveBuilder);
00175
00177 ~OffsetCurveSetBuilder();
00178
00188 std::vector<noding::SegmentString*>& getCurves();
00189
00191
00195 void addCurves(const std::vector<geom::CoordinateSequence*>& lineList,
00196 int leftLoc, int rightLoc);
00197
00198 };
00199
00200
00201
00202 }
00203 }
00204 }
00205
00206 #endif // ndef GEOS_OP_BUFFER_OFFSETCURVESETBUILDER_H
00207
00208
00209
00210
00211
00212
00213
00214
00215
00216
00217